:root {
    --primary-bg: #0f172a;
    --card-bg: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #38bdf8;
    --gradient-start: #1e293b;
    --gradient-end: #0f172a;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem;
    line-height: 1.5;
}

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

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

.location-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
}

.location-badge svg {
    color: var(--accent);
}

.refresh-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 0.25rem;
}

.refresh-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    transform: rotate(180deg);
}

.refresh-btn:active {
    transform: rotate(180deg) scale(0.9);
}

.city-selector {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    outline: none;
}

.city-selector:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.city-selector:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.city-selector option {
    background: var(--primary-bg);
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
}

/* Glassmorphism Card Style */
.weather-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hero Section */
.current-weather {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.weather-card.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero-info {
    flex: 1;
}

.today-label {
    display: inline-block;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.hero .condition {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.high-low {
    display: flex;
    gap: 1rem;
    font-size: 1.1rem;
}

.hero-icon {
    font-size: 6rem;
    margin-left: 2rem;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.4));
}

/* Weekly Forecast */
.weekly-forecast h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-secondary);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.forecast-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--card-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.forecast-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
}

.forecast-date {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.forecast-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.forecast-temp {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    font-weight: 600;
}

.max-temp {
    color: var(--text-primary);
}

.min-temp {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    opacity: 0.6;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
    .location-controls {
        width: 100%;
        padding: 0 1rem;
    }

    .location-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .city-selector {
        width: 100%;
        max-width: 280px;
    }

    .weather-card.hero {
        flex-direction: column;
        text-align: center;
        padding: 2.5rem 1.5rem;
    }

    .hero-icon {
        margin-left: 0;
        margin-top: 1.5rem;
    }

    .high-low {
        justify-content: center;
    }

    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
