:root {
    --celsius-gradient: linear-gradient(to right, #06b6d4, #2563eb);
    --fahrenheit-gradient: linear-gradient(to right, #f97316, #ef4444);
    --celsius-glow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    --fahrenheit-glow: 0 8px 32px 0 rgba(249, 115, 22, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nova Round', sans-serif;
    user-select: none;
    overflow-wrap: break-word;
}

/* Use Orbitron for headers and numbers for a sci-fi/weather station look */
h1, h2, #temperature, .unit-toggle, #current-time {
    font-family: 'Orbitron', sans-serif;
}

/* Global constraint for media */
img, canvas, svg {
    max-width: 100%;
    height: auto;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    color: #1f2937;
}

/* Parallax Background Layers */
.parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    z-index: -2;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.parallax-bg.active {
    opacity: 1;
    z-index: -1;
}

.parallax-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgb(255 255 255 / 1%));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--celsius-glow);
    padding: 40px;
    width: 100%;
    max-width: 600px;
    transition: all 0.5s ease;
    margin: auto 0;
    position: relative;
}

/* Focus Mode: Dim everything except search */
body.search-focus .glass-card > *:not(.search-section) {
    opacity: 0.4;
    filter: blur(3px);
    transition: all 0.4s ease;
}

/* Warm Glow for Imperial Mode */
.glass-card.is-imperial {
    box-shadow: var(--fahrenheit-glow);
    border-color: rgba(249, 115, 22, 0.3);
}

@media (min-width: 1024px) {
    .glass-card {
        max-width: 1200px;
    }
    
    .content-grid {
        display: grid;
        grid-template-columns: 1fr 1.5fr;
        gap: 40px;
        align-items: start;
    }

    .left-column, .right-column {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0; /* Prevents grid blowout from canvas/scrollables */
    }
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo .material-icons {
    font-size: 40px;
    color: #2563eb;
}

.logo h1 {
    color: #111827;
}

/* --- Header Controls (Share & Unit) --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex; 
    justify-content: center;
    align-items: center;
    cursor: pointer;
    color: #1f2937;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    flex-shrink: 0;
}

.share-btn:hover {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    border-color: transparent;
}

.share-btn .material-icons {
    font-size: 20px;
}

/* --- Unit Toggle Redesign --- */
.unit-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.switch {
    position: relative;
    display: inline-block;
    width: 68px;
    height: 34px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--celsius-gradient);
    transition: 0.4s;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Imperial Background Overlay for Cross-fade */
.slider::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--fahrenheit-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.glass-card.is-imperial .slider::after {
    opacity: 1;
}

/* The Knob */
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    /* Bouncy Transition */
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55), width 0.2s;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Move Knob */
input:checked + .slider:before {
    transform: translateX(34px);
}

/* Elastic Stretch on Click */
.switch:active .slider:before {
    width: 32px;
    border-radius: 20px;
}

/* Icons inside Track */
.toggle-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 1;
    pointer-events: none;
}

.icon-snowflake {
    left: 8px;
}

.icon-sun {
    right: 8px;
}

/* --- End Unit Toggle --- */

/* Search Section */
.search-section {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 20;
    margin: 0 auto 30px auto;
}

.search-box {
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    gap: 5px;
    position: relative;
    z-index: 10;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Focus Mode Expansion */
.search-box.focus-mode {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    border-color: rgba(255, 255, 255, 0.8);
}

.search-wrapper {
    flex: 1;
    position: relative;
    min-width: 0;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    padding: 10px 20px;
    color: #1f2937;
    font-size: 16px;
}

/* Autocomplete Suggestions */
.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-top: 5px;
    list-style: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    max-height: 200px;
    overflow-y: auto;
    display: none;
}

.suggestions-list.show {
    display: block;
}

.suggestions-list li {
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.suggestions-list li:hover {
    background: #eff6ff;
}

.search-box button {
    background: #2563eb;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
    flex-shrink: 0;
}

.search-box button:hover {
    background: #1d4ed8;
}

/* Search Icon SVG Transition */
.search-icon-svg {
    transition: transform 0.3s ease;
}

.search-box.focus-mode .search-icon-svg {
    transform: rotate(90deg);
}

/* Favorites */
.favorites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 30px;
}

.fav-chip {
    background: rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
}

.fav-chip:hover {
    background: #2563eb;
    color: white;
}

.fav-chip .remove-fav {
    font-size: 14px;
    opacity: 0.7;
}

.fav-chip .remove-fav:hover {
    opacity: 1;
}

/* Current Weather */
.current-weather {
    text-align: center;
    margin-bottom: 30px;
}

.city-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 24px;
    transition: color 0.3s;
    position: relative;
}

/* Heart Animation */
@keyframes heartBurst {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(0.8);
    }
    60% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.fav-btn.animating {
    animation: heartBurst 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fav-btn.active {
    color: #ff4b4b;
}

/* Spark Particles */
.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff4b4b;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
}

.temp-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

#temperature {
    font-size: 64px;
    font-weight: 600;
    color: #111827;
}

#weather-icon {
    width: 100px;
    height: 100px;
}

#description {
    font-size: 20px;
    text-transform: capitalize;
    margin-top: -10px;
    color: #4b5563;
}

.countdown-text {
    font-size: 0.9rem;
    color: #2563eb;
    margin-top: 5px;
    font-weight: 500;
}

/* Date and Time Styles */
.date-time-info {
    text-align: center;
    margin: 10px 0;
}

#current-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

#current-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    margin-top: 5px;
    letter-spacing: 1px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.3);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, background 0.3s ease;
}

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

.detail-item .material-icons {
    font-size: 28px;
    color: #2563eb;
}

.detail-item p {
    font-size: 12px;
    color: #4b5563;
}

.detail-item span {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Air Quality */
.aqi-container {
    margin-top: 20px;
}

.aqi-container h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #111827;
}

.aqi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.aqi-grid .detail-item {
    padding: 10px;
    gap: 10px;
}

/* Hazard Interpretation Layer Styles */
.hazard-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.hazard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hazard-content strong {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.hazard-content p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.9;
}

/* Severity Levels */
.hazard-caution {
    background: rgba(253, 224, 71, 0.2); /* Yellow */
    border-color: rgba(253, 224, 71, 0.5);
    color: #854d0e;
}

.hazard-caution .hazard-icon {
    color: #eab308;
}

.hazard-danger {
    background: rgba(249, 115, 22, 0.2); /* Orange */
    border-color: rgba(249, 115, 22, 0.5);
    color: #9a3412;
}

.hazard-danger .hazard-icon {
    color: #f97316;
}

.hazard-severe {
    margin: 7px;
    background: rgba(239, 68, 68, 0.2); /* Red */
    border-color: rgba(239, 68, 68, 0.5);
    color: #7f1d1d;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.hazard-severe .hazard-icon {
    color: #ef4444;
}

/* Night mode adjustments for text readability */
body.night-mode .hazard-caution {
    color: #fef08a;
}

body.night-mode .hazard-danger {
    color: #fdba74;
}

body.night-mode .hazard-severe {
    color: #fca5a5;
}

/* Precipitation Probability Styles */
.precip-container {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    color: #1f2937;
}

.precip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 5px;
}

.precip-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 1rem;
    color: #2563eb;
}

.precip-trend {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

.trend-increasing {
    background: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.trend-decreasing {
    background: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.trend-steady {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
}

.precip-phrase {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.precip-context {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.precip-explanation {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 8px;
    border-radius: 8px;
    margin-top: 8px;
    font-style: italic;
    opacity: 0.9;
}

.precip-disclaimer {
    font-size: 0.75rem;
    margin-top: 5px;
    opacity: 0.7;
}

/* Night mode support for precip container */
body.night-mode .precip-container {
    background: rgba(30, 41, 59, 0.4);
    color: #e2e8f0;
}

body.night-mode .precip-title {
    color: #60a5fa;
}

body.night-mode .precip-explanation {
    background: rgba(0, 0, 0, 0.2);
}

/* Chart Section */
.chart-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 20px;
    position: relative;
    width: 100%;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

.chart-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.chart-controls {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.4);
    padding: 3px;
    border-radius: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.chart-btn {
    background: transparent;
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #4b5563;
    transition: all 0.2s;
}

.chart-btn.active {
    background: #2563eb;
    color: white;
}

.canvas-wrapper {
    height: 250px;
    width: 100%;
    position: relative;
}

/* Hourly Forecast */
.hourly-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.5) transparent;
}

.hourly-scroll::-webkit-scrollbar {
    height: 6px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background-color: rgba(37, 99, 235, 0.5);
    border-radius: 3px;
}

.hourly-item {
    background: rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(5px);
}

.hourly-item img {
    width: 40px;
    height: 40px;
}

.h-time {
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 5px;
}

.h-temp {
    font-weight: bold;
    color: #111827;
}

/* Wind Map Container - Enhanced */
.wind-map-container {
    background: rgba(255, 255, 255, 0.1); /* More transparent */
    border-radius: 20px; /* Softer corners */
    padding: 0; /* Remove padding to let canvas fill */
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15); /* Deeper shadow */
    backdrop-filter: blur(8px);
    height: 250px; /* Slightly taller */
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.wind-map-container h3 {
    position: absolute;
    top: 15px;
    left: 20px;
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
    z-index: 10;
    background: rgba(255, 255, 255, 0.6);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

body.night-mode .wind-map-container h3 {
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.6);
}

#windMapCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 20px;
}

/* Forecast */
.forecast-container h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #111827;
}

.forecast-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.3);
    padding: 10px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease, background 0.3s ease;
}

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

.forecast-item .f-day {
    font-weight: 600;
    font-size: 0.9rem;
    color: #374151;
}

.forecast-item img {
    width: 40px;
    height: 40px;
}

.forecast-item .f-temp {
    font-weight: bold;
    color: #111827;
}

.forecast-item .f-desc {
    font-size: 0.7rem;
    color: #4b5563;
}

.pop-badge {
    font-size: 0.7rem;
    background: rgba(37, 99, 235, 0.2);
    color: #2563eb;
    padding: 2px 6px;
    border-radius: 10px;
    margin-top: 4px;
    font-weight: 600;
}

/* Skeleton Loader - Shimmer Effect */
.skeleton-box {
    background: #e0e0e0;
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.1) 8%, rgba(255, 255, 255, 0.3) 18%, rgba(255, 255, 255, 0.1) 33%);
    background-size: 200% 100%;
    border-radius: 15px;
    animation: shimmer 1.5s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.error {
    text-align: center;
    color: #ef4444;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.retry-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.retry-btn:hover {
    background: #dc2626;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex; 
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    background: rgba(31, 41, 55, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    font-size: 0.9rem;
}

.toast.show {
    transform: translateX(0);
}

@media (max-width: 480px) {
    .glass-card {
        padding: 20px;
    }
    
    #temperature {
        font-size: 48px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }

    .header-top {
        flex-direction: column;
        gap: 15px;
    }

    .header-controls {
        width: 100%;
        justify-content: center;
    }
}

/* Flag Styles */
.country-flag {
    height: 28px;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-flag {
    width: 24px;
    height: auto;
    margin-right: 12px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* API Attribution */
.api-attribution {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #4b5563;
    font-weight: 600;
}

.api-attribution img {
    height: 25px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.api-attribution img:hover {
    opacity: 1;
}

/* Wind Forecast List (The "Chart") */
#wind-list {
    list-style: none;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px; /* Padding for shadow/scroll */
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.5) transparent;
}

#wind-list::-webkit-scrollbar {
    height: 6px;
}

#wind-list::-webkit-scrollbar-thumb {
    background-color: rgba(37, 99, 235, 0.5);
    border-radius: 3px;
}

.wind-item {
    text-align: center;
    min-width: 90px;
    padding: 15px 10px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.wind-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
}

.direction-icon {
    width: 32px;
    height: 32px;
    margin: 8px auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Night mode for wind items */
body.night-mode .wind-item {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.4));
    border-color: rgba(255, 255, 255, 0.1);
}

/* Enhanced Weather Icons - Vibrant Tinting & Glow */
#weather-icon,
.hourly-item img,
.forecast-item img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transition: filter 0.4s ease;
}

/* Size adjustments */
#weather-icon {
    width: 120px;
    height: 120px;
}

.hourly-item img,
.forecast-item img {
    width: 50px;
    height: 50px;
}

/* Color tints based on weather main condition (applied via JS class) */
.icon-tint-clear {
    filter: hue-rotate(180deg) saturate(1.2) brightness(1.1) drop-shadow(0 4px 12px rgba(59, 130, 246, 0.4));
} /* Cyan-blue glow for clear */
.icon-tint-clouds {
    filter: saturate(0.8) brightness(1.2) drop-shadow(0 4px 8px rgba(255, 255, 255, 0.4));
}
.icon-tint-rain,
.icon-tint-drizzle {
    filter: hue-rotate(200deg) saturate(1.3) drop-shadow(0 4px 12px rgba(59, 130, 246, 0.5));
} /* Blue tint */
.icon-tint-thunderstorm {
    filter: hue-rotate(270deg) saturate(1.4) brightness(0.9) drop-shadow(0 4px 16px rgba(147, 51, 234, 0.6));
} /* Purple electric glow */
.icon-tint-snow {
    filter: brightness(1.3) saturate(1.2) drop-shadow(0 4px 12px rgba(147, 197, 253, 0.6));
} /* Icy blue-white */
.icon-tint-fog,
.icon-tint-mist,
.icon-tint-haze {
    filter: brightness(1.1) saturate(0.6) drop-shadow(0 4px 8px rgba(156, 163, 175, 0.4));
} /* Grayish */
.icon-tint-night {
    filter: hue-rotate(220deg) brightness(1.1) saturate(1.1);
} /* Cooler moonlit tone */

/* Imperial mode - warmer overall tint for icons */
.glass-card.is-imperial #weather-icon,
.glass-card.is-imperial .hourly-item img,
.glass-card.is-imperial .forecast-item img {
    filter: hue-rotate(30deg) saturate(1.3) brightness(1.05) !important;
}

/* --- New Credit Section & Icon Gradients --- */

.credit-section {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.credit-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(to right, #e2e8f0, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 0;
    letter-spacing: 0.5px;
}

.credit-name {
    background: linear-gradient(135deg, #06b6d4, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    text-transform: uppercase;
    padding: 0 4px;
}

.credit-github {
    text-decoration: none;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(3deg, #f472b6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: transform 0.3s ease, filter 0.3s ease;
    font-weight: 700;
}

.credit-github:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.credit-github .material-icons {
    font-size: 1.1rem;
    background: inherit;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Apply Gradients to Existing Icons */

/* General Material Icons */
.material-icons {
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Header Logo Icon */
.logo .material-icons {
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Detail Items Icons (Sunrise, Wind, etc.) */
.detail-item .material-icons {
    background: linear-gradient(135deg, #facc15, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Air Quality Icons */
.aqi-grid .detail-item .material-icons {
    background: linear-gradient(135deg, #34d399, #059669);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Favorite Button */
.fav-btn.material-icons {
    background: linear-gradient(135deg, #9ca3af, #4b5563);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fav-btn.active.material-icons {
    background: linear-gradient(135deg, #ef4444, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Share Button Icon */
.share-btn .material-icons {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Night Mode Text Visibility --- */
body.night-mode #description,
body.night-mode #current-date {
    color: #e0f2fe;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    transition: color 0.5s ease, text-shadow 0.5s ease;
}

body.night-mode #city-name,
body.night-mode #temperature,
body.night-mode #current-time,
body.night-mode .unit-toggle {
    color: #f0f9ff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

body.night-mode .detail-item p,
body.night-mode .forecast-item .f-day,
body.night-mode .hourly-item .h-time {
    color: #cbd5e1;
}

body.night-mode .detail-item span,
body.night-mode .forecast-item .f-temp,
body.night-mode .hourly-item .h-temp {
    color: #f1f5f9;
}
