/* ========================================
   HAVADURUM.COM - BEAUTY & INTELLIGENCE
   Modern Weather Platform with Glassmorphism
   ======================================== */

/* ===== CSS VARIABLES ===== */
:root {
    /* Brand Colors */
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --danger: #f5576c;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);

    /* Text */
    --text-dark: #2d3748;
    --text-muted: #718096;
    --text-light: #ffffff;

    /* Spacing */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
}

/* ===== DYNAMIC WEATHER BACKGROUNDS ===== */
body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
    overflow-y: auto;
    /* Always show vertical scrollbar space to prevent layout shift */
    width: 100%;
    position: relative;
}

/* Background Layer to prevent breaking fixed elements (like Weather Assistant) */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: background 0.8s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    /* Default */
}

/* Default - Homepage/Neutral */
body {
    /* base background moved to ::before */
}

/* Sunny Weather - Warm & Vibrant */
body.weather-sunny::before {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 30%, #ffd89b 70%, #19547b 100%);
    animation: sunnyPulse 8s ease-in-out infinite alternate;
}

@keyframes sunnyPulse {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.1);
    }

    100% {
        filter: brightness(1);
    }
}

/* Rainy Weather - Dark & Moody */
body.weather-rainy::before {
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 30%, #4a5568 70%, #2d3748 100%);
    animation: rainGradient 5s ease infinite alternate;
}

@keyframes rainGradient {
    0% {
        filter: brightness(0.9);
    }

    50% {
        filter: brightness(0.7);
    }

    100% {
        filter: brightness(0.9);
    }
}

/* Cloudy Weather - Cool & Muted */
body.weather-cloudy::before {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 50%, #718096 100%);
}

/* Snowy Weather - Cold & Crisp */
body.weather-snowy::before {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 50%, #a0aec0 100%);
    animation: snowyShimmer 6s ease-in-out infinite alternate;
}

@keyframes snowyShimmer {
    0% {
        filter: brightness(1.1);
    }

    50% {
        filter: brightness(1);
    }

    100% {
        filter: brightness(1.1);
    }
}

/* Night Mode - Dark & Mysterious */
body.weather-night::before {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 50%, #4a5568 100%);
}

/* Night + Sunny */
body.weather-sunny.weather-night::before {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
}

/* Night + Rainy */
body.weather-rainy.weather-night::before {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #1a202c 100%);
}

/* Night + Snowy */
body.weather-snowy.weather-night::before {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #2980b9 100%);
}

/* ===== RESET & BASE ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===== GLASSMORPHISM UTILITIES ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== HEADER ===== */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

nav a {
    margin-left: 25px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    opacity: 0.9;
}

nav a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.9) 0%, rgba(245, 87, 108, 0.9) 100%);
    border-radius: var(--radius-lg);
    padding: 60px;
    color: white;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(245, 87, 108, 0.3);
    backdrop-filter: blur(10px);
    animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: none;
}

/* ===== STATS GRID ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(15px);
}

.stat-card:nth-child(1),
.stat-card:nth-child(5) {
    padding: 40px 30px;
}

.stat-card .number {
    font-size: 42px;
    font-weight: 800;
    display: block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 8px;
    font-weight: 500;
}

/* ===== WEATHER CARD ===== */
.weather-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 45px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.weather-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.weather-info h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.weather-desc {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

.temp-big {
    font-size: 80px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ===== WEATHER DETAILS GRID ===== */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.detail-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 18px;
    transition: all 0.3s;
}

.detail-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.detail-item h4 {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-item .value {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== RECOMMENDATIONS ===== */
.section-header {
    font-size: 36px;
    font-weight: 800;
    margin: 60px 0 30px;
    color: white;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.recommendations {
    margin-top: 50px;
}

.recommendations h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 25px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.rec-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary);
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

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

.rec-card.priority-high {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 87, 108, 0.05) 100%);
}

.rec-card.priority-medium {
    border-left-color: var(--accent);
}

.rec-card.priority-low {
    border-left-color: #4facfe;
}

.rec-card .icon {
    font-size: 40px;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.rec-card h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.rec-card p {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.7;
}

/* ===== CITY GRID ===== */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.city-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
}

.city-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}


/* ===== BREADCRUMB ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s;
    background: rgba(102, 126, 234, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 0;
    /* Reset nav a margin */
}

.breadcrumb a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

.breadcrumb .sep {
    color: #cbd5e0;
    font-weight: 400;
}

.breadcrumb .current {
    color: var(--text-dark);
    padding: 4px 0;
}

/* ===== TIME RANGE BAR ===== */
.range-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 15px 5px;
    scrollbar-width: thin;
}

.range-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    min-width: 130px;
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.range-card:hover {
    transform: translateY(-5px);
    background: #fff;
    border-color: var(--primary);
}

.range-card.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.range-card .icon {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.range-card .label {
    font-size: 14px;
    font-weight: 600;
}

.range-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.5);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ===== FORECAST GRID ===== */
.forecast-container {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.forecast-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.forecast-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.forecast-item .date {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.forecast-item .time {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.forecast-item .temp {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.forecast-item .icon-mini {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    display: block;
}

.forecast-item .desc {
    font-size: 12px;
    color: #4a5568;
}

/* ===== MAP WRAPPER ===== */
.map-wrapper {
    margin-top: 25px;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 350px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== SECTION HEADER ===== */
.section-header {
    font-size: 36px;
    font-weight: 800;
    margin: 60px 0 30px;
    color: white;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* ===== SEARCH ===== */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto 25px;
}

.search-input {
    width: 100%;
    padding: 20px 25px;
    border-radius: 20px;
    border: none;
    font-size: 18px;
    outline: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.search-input:focus {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.hero-subtitle {
    text-align: center;
    font-size: 16px;
    opacity: 0.95;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    display: none;
}

.search-item {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: var(--text-dark);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #f7fafc;
}

.search-item .name {
    font-weight: 600;
    font-size: 15px;
}

.search-item .type {
    font-size: 11px;
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ===== ADS ===== */
.ad-slot {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    color: white;
    font-weight: 600;
    margin: 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ad-leaderboard {
    min-height: 90px;
    width: 100%;
    max-width: 728px;
    margin: 0 auto 30px;
}

/* ===== SHARE SECTION ===== */
.share-section {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.copy {
    background: #718096;
}

/* ===== CUSTOM MESSAGE ===== */
.custom-msg-box {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.input-group {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    outline: none;
}

.input-group button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

/* ===== SEO BLOCK ===== */
.seo-block {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 35px;
    margin-top: 40px;
    border-top: 5px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== FOOTER ===== */
footer {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px 0 20px;
    margin-top: 60px;
    color: white;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

footer p {
    margin: 5px 0;
    text-align: center !important;
    width: 100% !important;
}

footer div {
    margin-top: 15px;
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 15px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    opacity: 0.8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}

.footer-bottom p {
    margin: 0;
    text-align: center;
    width: 100%;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
    margin: 0 5px;
}

/* ===== STORY CARDS ===== */
.stories-container {
    display: flex;
    gap: 15px;
    padding: 10px 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    margin-bottom: 10px;
    position: relative;
    z-index: 100;
    /* Ensure it's above other elements */
}

.stories-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    min-width: 70px;
    transition: transform 0.2s;
}

.story-item:hover {
    transform: translateY(-2px);
}

.story-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 3px solid transparent;
    /* Dynamic color via inline style */
    padding: 3px;
    position: relative;
    background-clip: content-box;
    /* Ensure border doesn't overlap content */
}

.story-icon {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.story-title {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.story-ring,
.story-icon,
.story-title {
    pointer-events: none;
    /* Let clicks pass through to .story-item */
}

/* Story Modal Overlay */
.story-modal {
    display: none;
    /* Controlled by JS and .active */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 10000 !important;
    background: rgba(0, 0, 0, 0.95) !important;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;

    /* Centering logic */
    display: none;
    align-items: center;
    justify-content: center;
}

.story-modal.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Story Content Card */
.story-content {
    position: relative;
    width: 90%;
    max-width: 380px;
    height: auto;
    max-height: 85vh;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    color: white;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.story-modal.active .story-content {
    transform: scale(1);
}

.story-modal.active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ===== ANIMATED WEATHER ICONS ===== */
.weather-icon-anim {
    width: 60px;
    height: 60px;
}

.mini-icon {
    width: 40px !important;
    height: 40px !important;
    margin: 0 auto;
}

/* SUNNY */
.anim-sunny {
    background: radial-gradient(circle, #f1c40f 40%, transparent 40%);
    border-radius: 50%;
    box-shadow: 0 0 20px #f1c40f;
    animation: sunPulse 2s infinite;
}

.anim-sunny::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    background: repeating-conic-gradient(from 0deg, rgba(241, 196, 15, 0.4) 0deg 10deg, transparent 10deg 20deg);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: sunSpin 10s linear infinite;
}

@keyframes sunPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px #f1c40f;
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 40px #f1c40f;
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px #f1c40f;
    }
}

@keyframes sunSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* CLOUDY - Using emoji for clarity */
.anim-cloudy {
    background: transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anim-cloudy::before {
    content: '☁️';
    font-size: 50px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: cloudFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Fix for mini-icon cloud */
.mini-icon.anim-cloudy::before {
    font-size: 30px;
}

@keyframes cloudFloat {
    0% {
        transform: translateY(0);
    }


    50% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
    }
}

/* RAINY */
.anim-rainy {
    /* Main container is mostly transparent, cloud is pseudo */
    background: transparent;
    position: relative;
    /* margin: 0 auto; */
}

/* Cloud base */
.anim-rainy::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 30px;
    background: #bdc3c7;
    border-radius: 20px;
    transform: translate(-50%, -80%);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Cloud Fluff */
.anim-rainy::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    background: #bdc3c7;
    border-radius: 50%;
    transform: translate(-30%, -160%);
    box-shadow: 20px 5px 0 2px #bdc3c7;
    z-index: 2;
}

/* Raindrops Container (New Element needed, but simulating with shadow for now to avoid HTML change if possible) 
   Actually, the previous CSS was trying to do drops with ::after but it conflicted with the cloud.
   Let's use a simpler approach for the icon to be safe without changing HTML structure if we can avoid it.
   
   Wait, the HTML is just <div class="weather-icon-anim anim-rainy"></div>
   We only have ::before and ::after. 
   ::before -> Cloud 
   ::after -> Raindrops
*/

.anim-rainy::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 10px;
    background: #3498db;
    border-radius: 2px;
    transform: translate(-10px, 10px);
    box-shadow: 15px 5px 0 #3498db, -5px 10px 0 #3498db;
    animation: rainDrop 1s linear infinite;
    z-index: 1;
}

/* MINI ICON FIXES */
.mini-icon.anim-rainy::before {
    width: 35px;
    height: 18px;
    transform: translate(-50%, -50%);
}

.mini-icon.anim-rainy::after {
    width: 3px;
    height: 6px;
    transform: translate(-10px, 5px);
    box-shadow: 10px 3px 0 #3498db, -3px 6px 0 #3498db;
}

@keyframes rainDrop {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(15px);
        opacity: 0;
    }
}

/* SNOWY */
.anim-snowy {
    background: transparent;
    border-radius: 20px;
    position: relative;
    /* margin: 0 auto; */
}

/* Snowflake 1 (Main) */
.anim-snowy::before {
    content: '❄';
    position: absolute;
    top: 50%;
    left: 50%;
    color: #ecf0f1;
    font-size: 40px;
    transform: translate(-50%, -60%);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 2;
    animation: snowSpin 5s linear infinite;
}

/* Snowflake 2 (Falling) */
.anim-snowy::after {
    content: '❄';
    position: absolute;
    top: 50%;
    left: 50%;
    color: white;
    font-size: 14px;
    transform: translate(-20px, 10px);
    animation: snowFall 2s linear infinite;
    text-shadow: 30px 5px 0 white, -15px 15px 0 white;
    z-index: 1;
}

@keyframes snowSpin {
    from {
        transform: translate(-50%, -60%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -60%) rotate(360deg);
    }
}

/* MINI ICON FIXES FOR SNOWY */
.mini-icon.anim-snowy::before {
    font-size: 24px;
    /* Smaller main flake */
}

.mini-icon.anim-snowy::after {
    font-size: 10px;
    /* Smaller falling flakes */
    text-shadow: 15px 3px 0 white, -8px 8px 0 white;
    /* Closer spacing */
}

@keyframes snowFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(20px) rotate(180deg);
        opacity: 0;
    }
}

.story-content {
    width: 90%;
    max-width: 380px;
    height: 70vh;
    border-radius: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    color: white;
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.3s ease;
}

@keyframes scaleUp {
    from {
        transform: scale(0.9);
    }

    to {
        transform: scale(1);
    }
}

.story-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.story-body .big-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: bounce 2s infinite;
}

/* Fix: Weather animations inside modal should be constrained */
.story-body .big-icon .weather-icon-anim {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto;
}

/* Adjust pseudo-elements for modal size */
.story-body .big-icon .anim-cloudy::after {
    top: -12px;
    right: 8px;
    width: 25px;
    height: 25px;
    box-shadow: -12px 4px 0 4px #ecf0f1;
}

.story-body .big-icon .anim-rainy::before {
    width: 70px;
    height: 35px;
}

.story-body .big-icon .anim-rainy::after {
    width: 5px;
    height: 12px;
    box-shadow: 18px 6px 0 #3498db, -6px 12px 0 #3498db;
}

.story-body .big-icon .anim-snowy::before {
    font-size: 50px;
}

.story-body .big-icon .anim-snowy::after {
    font-size: 18px;
    text-shadow: 35px 6px 0 white, -18px 18px 0 white;
}

.story-body h2 {
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
}

.story-body p {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.9;
}

.close-story {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    z-index: 10;
}

.close-story:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.story-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.story-progress-bar .progress {
    height: 100%;
    background: white;
    width: 0;
}

.story-modal.active .progress {
    animation: progress 5s linear forwards;
}

@keyframes progress {
    to {
        width: 100%;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        padding: 40px 30px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .temp-big {
        font-size: 60px;
    }

    .weather-main {
        flex-direction: column;
        text-align: center;
    }

    .rec-grid {
        grid-template-columns: 1fr;
    }

    nav a {
        margin-left: 15px;
        font-size: 14px;
    }
}

/* ===== MICRO-ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== WEATHER ASSISTANT ===== */
/* Chat Bubble */
#weather-assistant-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

#weather-assistant-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.6);
}

#weather-assistant-bubble.hidden {
    opacity: 0;
    pointer-events: none;
}

#weather-assistant-bubble.bounce {
    animation: bubbleBounce 1s ease;
}

@keyframes bubbleBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-10px);
    }

    50% {
        transform: translateY(0);
    }

    75% {
        transform: translateY(-5px);
    }
}

.assistant-icon {
    font-size: 28px;
    position: relative;
    z-index: 2;
}

.assistant-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.6;
    animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Chat Window */
#weather-assistant-window {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1001;
}

#weather-assistant-window.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* Weather Card */
.weather-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    margin-top: 20px;
    /* Separator from stories */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 20px;
    /* Reduced gap */
}

.assistant-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.assistant-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
}

.assistant-title .icon {
    font-size: 24px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.assistant-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.message.user {
    flex-direction: row-reverse;
}

.message .avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.message .text {
    background: #f5f7fa;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dark);
}

.message.user .text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.assistant-quick-replies {
    padding: 0 20px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-reply {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.quick-reply:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.assistant-input {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.assistant-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

.assistant-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.assistant-input button {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.assistant-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Wisdom Grid - Knowledge Base Section */
.wisdom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.wisdom-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 35px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.wisdom-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0.8;
}

.wisdom-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.wisdom-card .icon {
    font-size: 40px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    background: rgba(255, 255, 255, 0.1);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wisdom-card h3 {
    font-size: 22px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.wisdom-card p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin: 0;
}

.info-footer-text {
    text-align: center;
    max-width: 850px;
    margin: 50px auto;
    padding: 35px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 16px;
    color: #ffffff;
    line-height: 1.8;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-footer-text p {
    margin: 0;
    opacity: 0.95;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #weather-assistant-window {
        width: calc(100% - 40px);
        height: calc(100% - 40px);
        bottom: 20px;
        right: 20px;
    }

    #weather-assistant-bubble {
        bottom: 20px;
        right: 20px;
    }

    .section-header {
        font-size: 28px;
        margin: 40px 0 20px;
    }

    .wisdom-card {
        padding: 25px;
    }

    .wisdom-card .icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .info-footer-text {
        margin: 30px 10px;
        padding: 25px;
        font-size: 14px;
    }
}