:root {
    --glass: rgba(10, 25, 47, 0.6); 
    --glass-border: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --danger: #ff4d4d;
    --wind-speed: #82ccdd;
    --wind-gust: #ff7675;
    --front-alert: #fad390;
}

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

body {
    min-height: 100vh; 
    color: var(--text); 
    padding: 20px; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    position: relative;
    background-color: #0a192f; 
    user-select: none;
    -webkit-user-select: none; /* Safari/Chrome fix */
    -moz-user-select: none;    /* Firefox fix */
    -ms-user-select: none;     /* IE/Edge fix */
    /* Itt NINCS több háttérkép vagy attachment! */
}

/* --- EGYSÉGES GÖRGETŐSÁV MINDEN ELEMRE --- */

/* 1. A görgetősáv alapmérete mindenhol */
*::-webkit-scrollbar {
    width: 6px !important;    /* Vékonyabb sáv az elegancia jegyében */
    height: 6px !important;   /* Vízszintes sáv magassága (óra/nap listákhoz) */
}

/* 2. A sáv háttere (track) mindenhol */
*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1) !important;
    border-radius: 10px;
}

/* 3. A csúszka (thumb) stílusa mindenhol */
*::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s ease;
}

/* 4. Interakció (hover) */
*::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 211, 144, 0.4) !important; /* Narancsos FrontoraCast fény */
}

/* 5. Sarok elem eltüntetése */
*::-webkit-scrollbar-corner {
    background: transparent !important;
}

/* Ónos eső speciális riasztási stílus */
.freezing-rain-alert {
    background: rgba(255, 0, 0, 0.3) !important;
    border: 2px solid #ff0000 !important;
    animation: pulse-red 1.5s infinite !important;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* Kifejezetten a vízszintesen görgethető konténerek kényszerítése */
.hourly-container, 
.daily-list, 
.pressure-list, 
.pollen-matrix, 
.diag-bars,
#main-scroll-container {
    scrollbar-width: thin; /* Firefox támogatás */
    scrollbar-color: rgba(255, 255, 255, 0.2) rgba(0, 0, 0, 0.1);
}

/* --- GÖRGETŐSÁV VÉGE --- */

.pollen-item {
    min-width: 120px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    text-align: center;
    margin-right: 10px;
}

.pollen-bar {
    height: 6px;
    width: 100%;
    border-radius: 3px;
    margin: 8px 0;
    background: #444;
}

/* Színkódok a szintekhez */
.p-low { background: #55efc4; }      /* Alacsony - Zöld */
.p-med { background: #ffeaa7; }      /* Közepes - Sárga */
.p-high { background: #fab1a0; }     /* Magas - Narancs */
.p-vhigh { background: #ff7675; }    /* Nagyon magas - Piros */

/* Alapstílus (Asztali nézet) */
.fullscreen-btn {
    position: fixed;
    top: 20px;
    right: 140px; /* A beállítások és a frissítés gomb mellé igazítva */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.today-marker {
    border: 1px solid var(--front-alert) !important;
    border-radius: 28px;
    background: rgba(255, 211, 144, 0.05);
}

.past-day {
    filter: saturate(0.5); /* Kicsit fakóbb színek a múltnak */
}

/* ELREJTÉS MOBILON ÉS TABLETEN */
@media (max-width: 1024px) {
    .fullscreen-btn {
        display: none !important;
    }
    /* Mobilon kicsit lejjebb tolhatjuk a panelt, ha útban van a notch-nak */
    .control-panel {
        top: 20px;
        right: 15px;
        gap: 10px;
    }
}

.front-label {
    background: #e67e22;
    color: white; 
    padding: 2px 10px; 
    border-radius: 6px;
    font-size: 0.7rem; 
    font-weight: bold; 
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    line-height: 1.1;
    text-align: left;
    margin-top: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    animation: pulse-front 2s infinite;
    box-shadow: 0 0 10px rgba(230, 126, 34, 0.4);
}

.day-title-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-weight: bold;
}

.today-badge-inline {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    background: #ffdb58;
    color: #1f2a44;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

@keyframes pulse-front { 
    0% { transform: scale(1); background: #e67e22; }
    50% { transform: scale(1.05); background: #d35400; }
    100% { transform: scale(1); background: #e67e22; }
}

.footer {
    margin-top: 20px; margin-bottom: 30px; font-size: 0.8rem; opacity: 0.6; text-align: center; width: 100%;
}

.footer-links {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-source-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    background: rgba(13, 27, 51, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
    opacity: 1;
}

.footer-source-link:hover {
    background: rgba(13, 27, 51, 0.82);
    border-color: rgba(255, 255, 255, 0.42);
    transform: translateY(-1px);
}

.footer-source-link:focus-visible {
    outline: 2px solid rgba(255, 219, 88, 0.9);
    outline-offset: 2px;
}

.footer-privacy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.footer-privacy-link:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.footer-privacy-link:focus-visible {
    outline: 2px solid rgba(255, 219, 88, 0.9);
    outline-offset: 2px;
}

.cookie-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 12000;
    display: flex;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.cookie-banner-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
}

.cookie-banner-content {
    width: min(760px, 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(10, 25, 47, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.cookie-banner-text {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: left;
}

.cookie-banner-link {
    color: #ffdb58;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 219, 88, 0.55);
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.cookie-btn:hover {
    transform: translateY(-1px);
}

.cookie-btn-primary {
    background: #ffdb58;
    color: #1f2a44;
}

.cookie-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}

#weather-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* Kicsit növeljük meg a magasságát, hogy biztosan kitöltse a felső sávot is */
    height: 100vh; 
    z-index: 1;
    pointer-events: none;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.glass-card {
    background: var(--glass); 
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    border: 1px solid var(--glass-border); 
    border-radius: 28px; 
    /* A korábbi 30px-ről vegyük lejjebb, hogy a keskenyebb kártyán több hely maradjon a tartalomnak */
    padding: 20px; 
    margin-bottom: 25px;
    width: 100%; 
    /* Itt a lényeg: 850px-ről levesszük 600px-re (vagy ízlés szerint 550px-re) */
    max-width: 600px; 
    position: relative; 
    z-index: 10;
    background: rgba(10, 25, 47, 0.6); 
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Animáció a kártyák megjelenéséhez (opcionális, de szép) */
    transition: max-width 0.3s ease, padding 0.3s ease;
}

/* Frissítés gomb stílusa */
.refresh-btn {
    position: fixed; 
    top: 20px; 
    left: 20px; 
    background: var(--glass); 
    border: 1px solid var(--glass-border);
    color: white; 
    padding: 18px; 
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 100; 
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

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

/* Forgó animáció frissítéskor */
.spinning svg {
    animation: spin 1s linear infinite;
}

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

.settings-btn {
    position: fixed; top: 20px; right: 20px; background: var(--glass); border: 1px solid var(--glass-border);
    color: white; padding: 18px; border-radius: 50%; cursor: pointer; z-index: 100; font-size: 1.2rem;
}

#settings-panel {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95); backdrop-filter: blur(20px); z-index: 1000;
    flex-direction: column; align-items: center; justify-content: flex-start; padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 40px;
    padding-bottom: 40px;
}

h1#location-name { font-size: 2.5rem; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.location-name-loading {
    font-size: 1.2rem !important;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 0.02em;
}
.temp-main { font-size: 6.5rem; font-weight: bold; margin: 10px 0; }

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

#current-icon {
    font-size: 5.5rem; margin: 10px 0; color: #ffdb58;
    display: inline-block; animation: floating 4s ease-in-out infinite;
}

.details-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; /* 15px helyett 10px a helytakarékosság miatt */
    margin-top: 20px; 
    background: rgba(255,255,255,0.05); /* Kicsit halványítottunk rajta */
    padding: 12px; 
    border-radius: 20px;
}

.wind-detail { grid-column: span 2; font-weight: bold; }

.hourly-container { display: flex; overflow-x: auto; gap: 15px; padding: 15px 0; scrollbar-width: thin; }
.hourly-item {
    min-width: 150px; text-align: center; background: rgba(255,255,255,0.05);
    padding: 20px 10px; border-radius: 22px; font-size: 0.95rem; position: relative; overflow: hidden; border: 1px solid var(--glass-border);
}

.wind-speed-bar { 
    position: absolute; 
    left: 0; 
    bottom: 4px; 
    height: 3px; 
    background: #f39c12; /* Narancs szélsebesség */
    border-radius: 0 2px 2px 0; 
    opacity: 0.6; 
    z-index: 1; 
}
.wind-gust-bar { 
    position: absolute; 
    left: 0; 
    bottom: 0; 
    height: 4px; 
    background: #ff4d4d; /* Piros széllökés */
    border-radius: 0 2px 2px 0; 
    opacity: 0.8; 
    z-index: 2; 
}
.prob-bar { position: absolute; left: 0; bottom: 0; width: 5px; background: #4a90e2; opacity: 0.8; transition: height 0.6s; }
.amount-bar { position: absolute; right: 0; bottom: 0; width: 5px; background: #00d2ff; opacity: 0.8; transition: height 0.6s; }
.pressure-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #4fa3ff; opacity: 0.5; }

.daily-item {
    display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 2.5fr; align-items: center;
    padding: 20px 15px; border-bottom: 1px solid rgba(255,255,255,0.1); cursor: pointer; transition: background 0.3s;
    position: relative; overflow: hidden;
}
.daily-item:hover { background: rgba(255,255,255,0.05); }

.daily-details { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out; background: rgba(0,0,0,0.2); }
.daily-details.open { max-height: 400px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.1); }

.wind-alert {
    background: var(--danger); color: white; padding: 2px 8px; border-radius: 6px;
    font-size: 0.7rem; font-weight: bold; animation: pulse 2s infinite; display: inline-block; margin-top: 5px;
}
.wind-only-alert {
    background: #4a90e2; color: white; padding: 2px 8px; border-radius: 6px;
    font-size: 0.7rem; font-weight: bold; display: inline-block; margin-top: 5px;
}

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

.daily-temp-box { font-size: 1.6rem; font-weight: bold; text-align: center; color: #ffdb58; }
.daily-temp-min { font-size: 1rem; opacity: 0.8; color: #fff; display: block; }

.daily-info { text-align: right; font-size: 0.85rem; z-index: 2; line-height: 1.4; }
.daily-summary, .hourly-summary { font-size: 0.85rem; font-style: italic; color: #d1d1d1; margin-bottom: 5px; }
.hourly-summary { line-height: 1.2; height: 2.4em; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.daily-extra-data { font-size: 0.75rem; opacity: 0.7; margin-top: 4px; display: block; color: #add8e6; }

input { font-size: 1.1rem; width: 100%; max-width: 350px; padding: 15px; border-radius: 12px; border: none; margin-bottom: 15px; }
.action-btn { font-size: 1.1rem; width: 100%; max-width: 350px; padding: 15px; border-radius: 12px; border: none; cursor: pointer; font-weight: bold; }

/* Napi elorejelzes fejlec kapcsolo */
.card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}
.card-header-row h3 { margin: 0; }
.mini-toggle-btn {
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}
.mini-toggle-btn:hover { background: rgba(255,255,255,0.12); }

/* Vizualis jelzes es drag scroll vizszintes listakhoz */
.hourly-container,
.h-scroll {
    position: relative;
    cursor: grab;
}
.hourly-container:active,
.h-scroll:active { cursor: grabbing; }

.scroll-hint-badge {
    position: absolute;
    right: 10px;
    bottom: 6px;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 4;
    pointer-events: none;
}
.show-scroll-hint .scroll-hint-badge {
    opacity: 0.9;
    transform: translateY(0);
}

/* Varos autocomplete */
.city-autocomplete {
    position: relative;
    width: 100%;
    max-width: 350px;
}

#city-suggestions {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: rgba(10, 15, 25, 0.98);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 1100;
    display: none;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

.city-suggestion {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.city-suggestion:last-child { border-bottom: none; }
.city-suggestion:hover,
.city-suggestion.active { background: rgba(255,255,255,0.08); }
.city-suggestion small {
    display: block;
    margin-top: 2px;
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Effekt konténer */
#weather-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100 !important; /* Minden felett kell legyen */
    overflow: hidden;
    /* iPhone fix: kényszerített hardveres gyorsítás */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Eső animációja - Gyors */
@keyframes rainFall {
    from { transform: translateY(-20px); }
    to { transform: translateY(100vh); }
}

.rain-drop {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.8);
    width: 2px;
    height: 15px;
    top: -20px;
    animation: rainFall 0.8s linear infinite; /* Fix sebesség alapnak, a JS ezt felülírja */
    box-shadow: 0 0 5px rgba(0, 150, 255, 0.5);
    pointer-events: none;
}

/* Hó animációja - Lassú és kicsit imbolygó */
@keyframes snowFall {
    0% { transform: translateY(-10px) translateX(0); }
    25% { transform: translateY(25vh) translateX(15px); }
    50% { transform: translateY(50vh) translateX(-15px); }
    75% { transform: translateY(75vh) translateX(15px); }
    100% { transform: translateY(100vh) translateX(0); }
}

.snow-flake {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    top: -10px;
    animation: snowFall 5s linear infinite; /* A hó sokkal lassabb */
    filter: blur(1px);
    pointer-events: none;
    box-shadow: 0 0 10px white;
}

/* Szellevelfujas effekt */
@keyframes windLeafSweep {
    0% {
        transform: translateX(-12vw) translateY(0) rotate(0deg);
        opacity: 0;
    }
    8% { opacity: 0.9; }
    50% {
        transform: translateX(55vw) translateY(-24px) rotate(190deg);
        opacity: 0.9;
    }
    100% {
        transform: translateX(110vw) translateY(26px) rotate(390deg);
        opacity: 0;
    }
}

.wind-leaf {
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    pointer-events: none;
    will-change: transform, opacity;
    animation-name: windLeafSweep;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.wind-leaf svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.35));
}
/* Köd effekt */
.fog-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: line-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: opacity 2s ease, filter 0.1s ease; /* A szűrőhöz kell a gyors átmenet */
    animation: fog-move 20s linear infinite;
}

@keyframes fog-move {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Gombok gyűjtődoboza */
/* A gombok fix helyzete mobilon és asztalin is */
.control-panel {
    position: fixed;
    top: 20px; /* Egységes távolság felülről */
    right: 20px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

/* Egységes gomb stílus */
.control-btn svg {
    width: 24px;
    height: 24px;
    pointer-events: none; /* Ne zavarjon be a kattintásba */
}

.control-btn.refresh-btn {
    position: fixed !important;
    top: 20px !important;
    left: 20px !important;
    right: auto !important;
}

.control-btn {
    width: 50px !important;    /* Fix szélesség */
    height: 50px !important;   /* Fix magasság */
    min-width: 50px;
    min-height: 50px;
    border-radius: 50% !important; /* Legyen mind kerek */
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    cursor: pointer;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0 !important;
    position: relative !important; /* Felülírjuk a fix pozíciókat */
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.1);
}

.control-btn:active {
    transform: translateY(0);
}

#about-content {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
    
    /* GÖRGETÉS KÉNYSZERÍTÉSE */
    flex-grow: 1; /* Kitölti a rendelkezésre álló helyet */
    overflow-y: auto !important; /* Itt legyen a görgetősáv */
    overflow-x: hidden;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Ez biztosítja, hogy mobilokon is sima legyen a görgetés */
    -webkit-overflow-scrolling: touch; 
}

/* Egyedi görgetősáv, hogy látszódjon sötét háttéren */
#about-content::-webkit-scrollbar {
    width: 8px;
}
#about-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}
#about-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,0.1);
}
#about-modal .glass-card {
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* A kártya ne legyen nagyobb a képernyőnél */
    overflow: hidden !important; /* A kártya maga NE görögjön */
}

/* A teljes névjegy konténer */
.about-container {
    max-width: 800px;
    width: 100%;
    height: 100%; /* Kitölti a paddingen belüli helyet */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Megakadályozza a teljes oldal görgetését */
}

.about-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-shrink: 0; /* Ez nem mehet össze */
}

/* A fülek sora */
.about-tabs-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 0; /* A tartalom padding-je adja majd a távolságot */
    flex-shrink: 0; /* Ez sem mehet össze */
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* A KRITIKUS RÉSZ: A görgethető tartalom */
.about-scroll-content {
    background: rgba(255,255,255,0.05);
    border-radius: 0 0 20px 20px; /* Csak alul kerekített */
    padding: 25px;
    line-height: 1.8;
    color: #d1d1d1;
    flex-grow: 1; /* Elfoglalja az összes maradék helyet */
    overflow-y: auto; /* Csak itt van görgetés! */
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none; /* Ne legyen dupla vonal a fül alatt */
}

.about-footer {
    text-align: center;
    padding-top: 20px;
    flex-shrink: 0;
}

.close-about-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid white;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.back-btn {
    margin-top: 15px;
    padding: 12px 35px;
    border-radius: 25px;
    background: #4a90e2;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

/* Napsugár konténer */
.sun-rays {
    position: absolute;
    top: -100px;
    right: -100px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 223, 0, 0.4) 0%, transparent 70%);
    z-index: -1;
}

.ray {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3000px;
    height: 40px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent);
    transform-origin: left center;
    clip-path: polygon(0 50%, 100% 0, 100% 100%);
    animation: rays-rotate 60s linear infinite;
}

@keyframes cloudDrift {
    from { transform: translateX(-150px); }
    to { transform: translateX(calc(100vw + 150px)); }
}

.svg-cloud {
    position: absolute;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.5));
    transition: fill 2s ease;
}

@keyframes rays-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Egy kis extra csillogás a napsugaraknak */
.sun-glare {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Erősebb sárgás fény, hogy áttörjön a felhőkön */
    background: radial-gradient(circle at 90% 10%, rgba(255, 200, 0, 0.3) 0%, transparent 60%);
    pointer-events: none;
    z-index: 101;
}

/* Hatternyito mod: dupla kattintasra a kartyak elrejthetok */
.glass-card,
.footer {
    transition: opacity 0.28s ease, transform 0.28s ease;
}

body.cards-hidden .glass-card,
body.cards-hidden .footer {
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
}

/* Névjegy specifikus stílusok */
#about-screen {
    animation: fadeIn 0.3s ease-out;
}

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

.about-tab-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
    font-size: 0.9rem;
}

.about-tab-btn.active {
    background: #4a90e2;
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.about-tab-btn:hover:not(.active) {
    background: rgba(255,255,255,0.15);
}

/* Rejtsük el az eredeti kártyákat, ha a névjegy nyitva van, 
   hogy biztosan ne vigye el az erőforrást a blur */
body:has(#about-screen[style*="display: flex"]) .glass-card {
    visibility: hidden;
}

#toast-message {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 77, 77, 0.45); /* Pirosas, de áttetsző */
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10000;
    font-weight: bold;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.toast-hidden {
    bottom: -100px !important;
    opacity: 0;
}

.toast-visible {
    bottom: 30px !important;
    opacity: 1;
}

.saved-location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.saved-location-item:hover { background: rgba(255, 255, 255, 0.2); }
.delete-loc-btn {
    color: #ff4d4d;
    padding: 5px;
    cursor: pointer;
    font-size: 1.1rem;
}

.diag-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 5px;
}
.diag-label {
    width: 100px;
    font-size: 0.7rem;
    opacity: 0.8;
}
.diag-bars {
    display: flex;
    flex-grow: 1;
    justify-content: space-around;
    align-items: flex-end;
    height: 45px;
}
.diag-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 30px;
}

#diagnostic-container {
    padding-top: 20px; /* Hely a döntött dátumoknak */
}

.diag-bar {
    width: 8px;
    border-radius: 4px;
    transition: height 0.3s ease;
}
.diag-val {
    font-size: 0.6rem;
    margin-top: 4px;
    opacity: 0.5;
}

/* Mobil specifikus finomítások */
@media screen and (max-width: 768px) {
    body {
        /* Fix háttérkép: nem mozog görgetéskor */
        background-attachment: fixed !important;
        background-position: center center !important;
        background-size: cover !important;
    }
    
    .control-panel {
            top: 20px; /* Maradjon szinkronban a bal oldallal */
        }
    
    /* Felhők és köd réteg elrejtése mobilon */
    #cloud-container, #fog-layer, .sun-glare {
            display: none !important;
        }
    
    /* Az effektusok (eső, hó, villám) maradnak, 
       de biztosítjuk, hogy fixen a viewport-on maradjanak */
    #weather-effects {
        position: fixed;
        width: 100vw;
        height: 100vh;
        z-index: 100;
    }
    #cloud-container, #fog-layer {
            display: none !important;
        }
    
    body {
            background-attachment: scroll !important;
        }
}

/* Kényszerített szín a Notch mögé */
#fixed-bg-layer, #weather-overlay, #time-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* Biztosítjuk, hogy a felső 100px-en is legyen szín */
    padding-top: 100px; 
    margin-top: 0;
}

#fixed-bg-layer {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

@media screen and (max-width: 768px) {
    #fixed-bg-layer {
        background-size: cover !important;
        background-position: center center !important;
    }
}

#main-scroll-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    /* 110px helyet hagyunk felül, így a városnév kényelmesen elfér a gombok ALATT */
    padding-top: 110px; 
    z-index: 10;
    -webkit-overflow-scrolling: touch;
}

#main-scroll-container::-webkit-scrollbar {
    display: none;
}

#pressure-list, #uv-list, #aqi-list {
    overflow-y: hidden !important;
    touch-action: pan-x !important;
    overscroll-behavior-y: contain !important;
}

/* Kikapcsoljuk a body görgetését, hogy ne legyen "dupla" mozgás */
html, body {
    overflow: hidden !important;
    height: 100%;
}
