* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('images/weather-bg.svg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    color: #333;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: 300;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

input {
    padding: 12px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    min-width: 250px;
}

input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

button {
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(0);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
    font-weight: 600;
}

.temperature {
    font-size: 3rem;
    font-weight: 300;
    color: #667eea;
    margin: 10px 0;
}



.weather-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    font-size: 0.9rem;
}

.detail i {
    color: #667eea;
    font-size: 1.2rem;
}

.forecast {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.forecast-day {
    text-align: center;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
}

.forecast-day small {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.forecast-day .temp {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
}

.forecast-day img {
    width: 40px;
    height: 40px;
    margin: 5px auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s ease;
}

.forecast-day img:hover {
    transform: scale(1.05);
}

#loading {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 1.2rem;
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.weather-icon {
    width: 80px;
    height: 80px;
    margin: 10px auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.weather-icon:hover {
    transform: scale(1.1);
    animation: pulse 1s ease-in-out infinite;
}

.hidden {
    display: none;
}

.error {
    background: rgba(255, 107, 107, 0.1);
    color: #d63031;
    padding: 15px;
    border-radius: 10px;
    margin: 10px 0;
    border-left: 4px solid #d63031;
}

.remove-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 107, 107, 0.1);
    color: #d63031;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    background: #d63031;
    color: white;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
        align-items: center;
    }
    
    input {
        min-width: 200px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }
    
    .forecast {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
}