/* =====================================================
   WETTER EUROPA — Stylesheet
   Automatischer Dark/Light Mode via prefers-color-scheme
   ===================================================== */

/* ---- CSS-Variablen ---- */
:root {
    --bg-primary:       #f0f4f8;
    --bg-secondary:     #ffffff;
    --bg-card:          #ffffff;
    --bg-header:        #1a73e8;
    --bg-header-text:   #ffffff;
    --text-primary:     #1a202c;
    --text-secondary:   #4a5568;
    --text-muted:       #718096;
    --border:           #e2e8f0;
    --accent:           #1a73e8;
    --accent-hover:     #1558b0;
    --forecast-bg:      #f7fafc;
    --forecast-hover:   #edf2f7;
    --shadow:           0 2px 12px rgba(0,0,0,0.08);
    --shadow-card:      0 4px 20px rgba(0,0,0,0.1);
    --radius:           12px;
    --radius-sm:        8px;
    --today-border:     #1a73e8;
    --today-bg:         #ebf3ff;
    --spinner-color:    #1a73e8;
    --footer-bg:        #e2e8f0;
    --footer-text:      #718096;
    --badge-bg:         #e8f0fe;
    --badge-text:       #1a73e8;
    --divider-color:    #e2e8f0;
    --hint-bg:          rgba(255,255,255,0.85);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary:       #0f1117;
        --bg-secondary:     #1a1d27;
        --bg-card:          #1e2130;
        --bg-header:        #111827;
        --bg-header-text:   #f0f4f8;
        --text-primary:     #e2e8f0;
        --text-secondary:   #a0aec0;
        --text-muted:       #718096;
        --border:           #2d3748;
        --accent:           #4299e1;
        --accent-hover:     #63b3ed;
        --forecast-bg:      #1a1d27;
        --forecast-hover:   #252839;
        --shadow:           0 2px 12px rgba(0,0,0,0.4);
        --shadow-card:      0 4px 20px rgba(0,0,0,0.5);
        --today-border:     #4299e1;
        --today-bg:         #1a2744;
        --spinner-color:    #4299e1;
        --footer-bg:        #111827;
        --footer-text:      #4a5568;
        --badge-bg:         #1a2744;
        --badge-text:       #63b3ed;
        --divider-color:    #2d3748;
        --hint-bg:          rgba(30,33,48,0.9);
    }
}

/* ---- Reset & Basis ---- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
}

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

/* ---- Layout ---- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: var(--bg-header);
    color: var(--bg-header-text);
    padding: calc(0.75rem + env(safe-area-inset-top)) 1.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    z-index: 1000;
    flex-wrap: wrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.logo {
    font-size: 1.6rem;
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.header-right {
    margin-left: auto;
    flex-shrink: 0;
}

.last-update {
    font-size: 0.75rem;
    opacity: 0.75;
    white-space: nowrap;
}

/* ---- Suche ---- */
.search-container {
    position: relative;
    flex: 1;
    max-width: 420px;
    min-width: 200px;
}

.search-input {
    width: 100%;
    padding: 0.55rem 2.8rem 0.55rem 1rem;
    border: 2px solid transparent;
    border-radius: 50px;
    background: rgba(255,255,255,0.15);
    color: var(--bg-header-text);
    font-size: 0.9rem;
    outline: none;
    transition: background 0.2s, border-color 0.2s;
}

.search-input::placeholder { color: rgba(255,255,255,0.6); }

.search-input:focus {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--bg-header-text);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.search-btn:hover { opacity: 1; }

.search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    z-index: 2000;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
}

.search-results li {
    padding: 0.65rem 1rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.search-results li:last-child { border-bottom: none; }
.search-results li:hover { background: var(--forecast-hover); }

.search-results .result-country {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: 0.4rem;
}

/* ---- Main-Layout ---- */
.app-main {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* ---- Karte ---- */
.map-wrapper {
    flex: 1;
    position: relative;
    min-height: 400px;
}

#map {
    width: 100%;
    height: 100%;
}

.map-hint {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--hint-bg);
    color: var(--text-secondary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 500;
    white-space: nowrap;
    box-shadow: var(--shadow);
}

.map-toggle-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 500;
    background: var(--hint-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
    transition: background 0.2s;
    color: var(--text-primary);
}
.map-toggle-btn:hover {
    background: var(--forecast-hover);
}

.map-locate-btn {
    position: absolute;
    top: 3rem;
    right: 0.6rem;
    z-index: 500;
    background: var(--hint-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    backdrop-filter: blur(4px);
    transition: background 0.2s;
    color: var(--text-primary);
}
.map-locate-btn:hover {
    background: var(--forecast-hover);
}
.map-locate-btn.locating {
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* ---- Wetter-Panel ---- */
.weather-panel {
    width: 360px;
    min-width: 300px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ---- States ---- */
.welcome-state,
.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 1rem;
    text-align: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.welcome-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.welcome-state h2 {
    font-size: 1rem;
    color: var(--text-primary);
}

.welcome-state p {
    font-size: 0.82rem;
    line-height: 1.4;
    max-width: 240px;
}

@media (max-width: 768px) {
    .welcome-state h2 { display: none; }
    .welcome-state p  { font-size: 0.8rem; }
    .welcome-icon     { font-size: 1.4rem; }
}

.error-icon {
    font-size: 2.5rem;
}

.retry-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s;
}
.retry-btn:hover { background: var(--accent-hover); }

/* ---- Spinner ---- */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--spinner-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ---- Drag Handle ---- */
.drag-handle {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 0.6rem 0 0.2rem;
    cursor: grab;
    touch-action: none;
    flex-shrink: 0;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle-bar {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .drag-handle {
        display: flex;
    }
}

/* ---- Wetter-Inhalt ---- */
.weather-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Aktuelles Wetter */
.current-weather {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.location-info h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.country-badge {
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
}

.current-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-icon-large {
    font-size: 3.5rem;
    line-height: 1;
}

.current-temp-block {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.current-temp {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.current-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.current-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.detail-item {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.detail-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ---- Stündliche Vorhersage ---- */
.hourly-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}
.hourly-scroll::-webkit-scrollbar { display: none; }

.hourly-strip {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0.1rem;
    width: max-content;
}

.hourly-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    background: var(--forecast-bg);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.6rem;
    min-width: 52px;
    cursor: default;
    border: 2px solid transparent;
    transition: background 0.15s;
}

.hourly-card:hover { background: var(--forecast-hover); }

.hourly-card.current-hour {
    border-color: var(--today-border);
    background: var(--today-bg);
}

.hourly-time {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.hourly-card.current-hour .hourly-time {
    color: var(--accent);
}

.hourly-icon { font-size: 1.2rem; line-height: 1; }

.hourly-temp {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}

.hourly-precip {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
}

/* Divider */
.section-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--divider-color);
}

/* 7-Tage-Vorhersage */
.forecast-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.forecast-card {
    background: var(--forecast-bg);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: 80px 2rem 1fr auto;
    align-items: center;
    gap: 0.75rem;
    cursor: default;
    transition: background 0.15s;
    border: 2px solid transparent;
}

.forecast-card:hover {
    background: var(--forecast-hover);
}

.forecast-card.today {
    border-color: var(--today-border);
    background: var(--today-bg);
}

.forecast-day {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.forecast-card.today .forecast-day {
    color: var(--accent);
    font-weight: 700;
}

.forecast-icon {
    font-size: 1.4rem;
    text-align: center;
}

.forecast-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.forecast-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.forecast-precip {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.forecast-temps {
    text-align: right;
    white-space: nowrap;
}

.temp-max {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.temp-min {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-left: 0.3rem;
}

/* ---- Footer ---- */
.app-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 0.6rem 1.5rem;
    font-size: 0.78rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
    .app-footer {
        display: none;
    }
}

/* ---- Utility ---- */
.hidden {
    display: none !important;
}

/* ---- Panel-Hidden Modus (Toggle auf Mobile) ---- */
body.panel-hidden .weather-panel {
    display: none !important;
}

body.panel-hidden .map-wrapper {
    flex: 1 !important;
    height: auto !important;
    min-height: 0 !important;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        height: 100dvh;
    }

    .app-main {
        flex-direction: column;
        flex: 1;
        overflow: hidden;
        min-height: 0;
    }

    .map-wrapper {
        flex: none !important;
        height: 55vh;
        min-height: 0 !important;
        transition: height 0.3s ease;
    }

    .weather-panel {
        width: 100%;
        min-width: unset;
        border-left: none;
        border-top: 1px solid var(--border);
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }

    .app-header {
        gap: 0.75rem;
    }

    .search-container {
        min-width: 150px;
    }

    .last-update {
        display: none;
    }

    .forecast-card {
        grid-template-columns: 65px 1.8rem 1fr auto;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1rem;
    }

    .weather-content {
        padding: 1rem;
    }
}

/* ---- Leaflet Anpassungen ---- */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-card) !important;
}

.weather-marker-popup {
    text-align: center;
    font-family: inherit;
    min-width: 120px;
}

.weather-marker-popup .popup-city {
    font-weight: 700;
    font-size: 1rem;
    color: #1a202c;
}

.weather-marker-popup .popup-temp {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a73e8;
}

.weather-marker-popup .popup-icon {
    font-size: 2rem;
    line-height: 1;
}

/* =====================================================
   TABS
   ===================================================== */

/* Panel braucht kein eigenes Scrollen mehr — Tabs übernehmen das */
.weather-panel {
    overflow: hidden !important;
}

.tab-bar {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: var(--bg-secondary);
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn {
    flex: 0 0 auto;
    min-width: 64px;
    padding: 0.55rem 0.5rem 0.45rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 600;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: color 0.2s, border-color 0.2s;
    line-height: 1.2;
}

.tab-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.tab-label { white-space: nowrap; font-size: 0.65rem; }

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    flex-direction: column;
}

.tab-content.active { display: flex; }

/* Wetter-Tab: weather-content bekommt eigenes Padding */
#tab-wetter .weather-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Scrollbar in Tabs */
.tab-content::-webkit-scrollbar { width: 4px; }
.tab-content::-webkit-scrollbar-track { background: transparent; }
.tab-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* States in anderen Tabs */
#tab-luft .welcome-state,
#tab-mond .welcome-state,
#tab-uv .welcome-state {
    flex: 1;
    justify-content: center;
}

/* =====================================================
   LUFT & POLLEN
   ===================================================== */

.luft-wrapper {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aqi-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow);
}

.aqi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.aqi-subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
}

.aqi-label-text {
    font-size: 1rem;
    font-weight: 700;
}

.aqi-value-big {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}

.aqi-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #22c55e 0%, #eab308 40%, #f97316 65%, #ef4444 80%, #a855f7 100%);
    position: relative;
    margin: 0.5rem 0 0.35rem;
}

.aqi-pointer {
    position: absolute;
    top: -5px;
    width: 18px;
    height: 18px;
    background: var(--bg-card);
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    transition: left 0.4s ease;
}

.aqi-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.pollutant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.pollutant-item {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
}

.pollutant-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pollutant-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

.pollen-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
}

.pollen-card-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.pollen-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border);
}

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

.pollen-name {
    font-size: 0.85rem;
    width: 72px;
    flex-shrink: 0;
    color: var(--text-primary);
}

.pollen-bar-wrap {
    flex: 1;
    background: var(--bg-primary);
    border-radius: 3px;
    height: 6px;
    overflow: hidden;
}

.pollen-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.pollen-level-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}

/* =====================================================
   MOND
   ===================================================== */

.mond-wrapper {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.moon-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.moon-emoji-big {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 0.6rem;
    display: block;
}

.moon-phase-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.moon-illumination {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.moon-next-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.moon-next-item {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.5rem;
    text-align: center;
}

.moon-next-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.moon-next-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.moon-calendar-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow);
}

.moon-cal-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
    text-align: center;
}

.moon-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.moon-cal-wd {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    padding: 2px 0 4px;
}

.moon-cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 1px;
    border-radius: 6px;
}

.moon-cal-day.today {
    background: var(--today-bg);
    outline: 1px solid var(--today-border);
}

.moon-cal-num {
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.moon-cal-icon {
    font-size: 0.95rem;
    line-height: 1;
}

/* =====================================================
   UV & SONNE
   ===================================================== */

.uv-wrapper {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.uv-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow);
}

.uv-value-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.uv-number {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1;
}

.uv-category {
    font-size: 1rem;
    font-weight: 700;
}

.uv-advice {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.uv-scale {
    display: flex;
    border-radius: 5px;
    overflow: hidden;
    height: 8px;
    margin: 0.5rem 0 0.35rem;
}

.uv-scale-seg { flex: 1; }

.uv-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.64rem;
    color: var(--text-muted);
}

.sun-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.1rem;
    box-shadow: var(--shadow);
}

.sun-arc-svg {
    width: 100%;
    height: 110px;
    display: block;
}

.sun-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.sun-stat {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.75rem;
}

.sun-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sun-stat-value {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

/* =====================================================
   WETTER-WARNUNGEN
   ===================================================== */

#warningsContainer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0;
}

.warning-card {
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
}

.warning-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.warning-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }

.warning-title {
    font-weight: 700;
    line-height: 1.3;
    font-size: 0.88rem;
}

.warning-desc {
    font-size: 0.78rem;
    opacity: 0.85;
    margin-bottom: 0.35rem;
    line-height: 1.4;
}

.warning-time {
    font-size: 0.72rem;
    opacity: 0.7;
    font-weight: 500;
}

/* ---- Luftdruck-Karte ---- */
.pressure-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.pressure-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pressure-label {
    font-size: 0.95rem;
    color: var(--text-muted);
}
.pressure-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}
.pressure-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---- Bio-Wetter ---- */
.bio-wrapper {
    padding: 12px 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bio-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--card-bg);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 4px;
}
.bio-card {
    border-radius: 12px;
    padding: 12px 14px;
}
.bio-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bio-icon {
    font-size: 1.2rem;
}
.bio-title {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.bio-level {
    font-size: 0.85rem;
    font-weight: 600;
}
.bio-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    padding-left: 28px;
    line-height: 1.4;
}
.bio-disclaimer {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    opacity: 0.7;
}

/* ---- Warn-Badges ---- */
.warn-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: auto;
    white-space: nowrap;
}
.warn-active { background: #ef4444; color: #fff; }
.warn-soon   { background: #f97316; color: #fff; }

/* ---- Bio 24h Vorschau ---- */
.bio-arrow {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 4px;
}
.bio-detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 10px 0 6px 28px;
}
.bio-hourly {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 0 4px 8px;
    scrollbar-width: none;
}
.bio-hourly::-webkit-scrollbar { display: none; }
.bio-hour-block {
    flex: 0 0 auto;
    width: 36px;
    padding: 6px 4px 4px;
    border-radius: 6px;
    text-align: center;
    cursor: default;
}
.bio-hour-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
}
