:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #4cc9f0;
    --text-light: #ffffff;
    --text-dark: #333333;
    --card-bg: rgba(255, 255, 255, 0.15);
    --card-border: rgba(255, 255, 255, 0.25);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: var(--text-light);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.5s ease;
    background-image: url('images/weatherbg.png');
    background-size: 100%;
    background-position: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
}

.app-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.app-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.search-container {
    margin-bottom: 30px;
}

.search {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    padding: 15px 25px;
    height: 60px;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.search input:focus {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.search button {
    border: 0;
    outline: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.search button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.search button i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.error {
    text-align: center;
    padding: 10px;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 10px;
    display: none;
}

.error p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1rem;
}

.weather {
    display: none;
}

.current-weather {
    margin-bottom: 40px;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.weather-icon {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.temperature-container {
    text-align: center;
}

.temp {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1;
}

.city {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.weather-description {
    font-size: 1.3rem;
    opacity: 0.9;
    text-transform: capitalize;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 16px;
    transition: var(--transition);
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.detail-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-icon img {
    width: 30px;
    height: 30px;
}

.detail-icon i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.detail-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.forecast {
    margin-top: 40px;
}

.forecast h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.forecast-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 15px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.forecast-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.forecast-day {
    font-weight: 600;
    font-size: 1.1rem;
}

.forecast-icon {
    width: 60px;
    height: 60px;
}

.forecast-temp {
    font-size: 1.3rem;
    font-weight: 600;
}

.forecast-desc {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: capitalize;
}

.app-footer {
    text-align: center;
    padding: 20px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        padding: 20px;
    }
    
    .app-header h1 {
        font-size: 2rem;
    }
    
    .temp {
        font-size: 3rem;
    }
    
    .city {
        font-size: 1.8rem;
    }
    
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .forecast-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
        border-radius: 20px;
    }
    
    .app-header h1 {
        font-size: 1.8rem;
    }
    
    .search {
        flex-direction: column;
        gap: 10px;
    }
    
    .search input {
        width: 100%;
    }
    
    .search-buttons {
        display: flex;
        gap: 10px;
        width: 100%;
    }
    
    .search button {
        flex: 1;
    }
    
    .weather-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .temp {
        font-size: 2.5rem;
    }
    
    .city {
        font-size: 1.5rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .forecast-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .forecast-item {
        padding: 15px 10px;
    }
}

/* Animation for loading */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.weather {
    animation: fadeIn 0.5s ease;
}

.forecast-item {
    animation: fadeIn 0.5s ease;
}