:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #101312;
    color: #f5f7f4;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: #101312;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #101312;
}

a,
button {
    touch-action: manipulation;
}

h1:focus {
    outline: none;
}

.weather-page {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 28px;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.hero-copy,
.location-panel,
.cockpit-card,
.hour-tile {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #171b19;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.hero-copy {
    min-height: 320px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-left: 4px solid #9ad8c2;
}

.hero-copy h1 {
    max-width: 820px;
    margin: 18px 0 12px;
    font-size: 3.6rem;
    line-height: 1.02;
    font-weight: 850;
}

.hero-copy p,
.location-panel p,
.cockpit-card p,
.hour-condition,
.section-heading span {
    color: #aeb8b1;
}

.hero-copy p {
    max-width: 680px;
    margin: 0;
    font-size: 1.12rem;
}

.location-panel {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 22px;
}

.location-panel h2,
.cockpit-card h2,
.forecast-section h2 {
    margin: 0;
    color: #f5f7f4;
}

.location-panel h2 {
    font-size: 1.45rem;
    line-height: 1.15;
}

.location-panel p {
    margin: 10px 0 0;
}

.location-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.state-alert {
    margin: 0 0 18px;
}

.source-chip {
    width: fit-content;
    border-color: rgba(154, 216, 194, 0.5) !important;
    background: rgba(154, 216, 194, 0.12) !important;
    color: #c8f5e2 !important;
}

.loading-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.skeleton-card {
    border-radius: 8px;
}

.dashboard-grid {
    margin-bottom: 18px;
}

.cockpit-card {
    height: 100%;
    padding: 22px;
}

.card-kicker {
    margin-bottom: 12px;
    color: #9ad8c2;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.current-weather {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
}

.condition-icon {
    display: inline-grid;
    min-width: 74px;
    height: 44px;
    place-items: center;
    margin-bottom: 16px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: #212720;
    color: #f5f7f4;
    font-weight: 800;
}

.condition-icon[data-condition="regen"],
.condition-icon[data-condition="gewitter"] {
    border-color: rgba(124, 199, 216, 0.42);
    color: #a9e8f5;
}

.condition-icon[data-condition="klar"] {
    border-color: rgba(255, 200, 87, 0.42);
    color: #ffd98a;
}

.condition-icon[data-condition="schnee"],
.condition-icon[data-condition="eis"] {
    border-color: rgba(210, 233, 238, 0.38);
    color: #d7f1f5;
}

.current-weather h2 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
}

.current-weather p {
    margin: 8px 0 0;
}

.temperature-stack {
    text-align: right;
}

.temperature-stack strong {
    display: block;
    color: #f5f7f4;
    font-size: 5rem;
    line-height: 0.95;
}

.temperature-stack span {
    color: #aeb8b1;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 26px;
}

.metric-tile {
    min-height: 104px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #121614;
}

.metric-tile span,
.metric-tile em,
.day-values span,
.confidence-row em {
    color: #aeb8b1;
    font-style: normal;
}

.metric-tile strong {
    display: block;
    margin: 7px 0 4px;
    color: #f5f7f4;
    font-size: 1.35rem;
    overflow-wrap: anywhere;
}

.next-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left-width: 4px;
}

.next-card h2 {
    font-size: 2.05rem;
    line-height: 1.08;
}

.decision-meta,
.decision-top,
.day-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.decision-meta {
    margin-top: 18px;
}

.decision-meta span {
    color: #f5f7f4;
    font-weight: 800;
}

.decision-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left-width: 4px;
}

.decision-card h3 {
    margin: 0;
    color: #f5f7f4;
    font-size: 1.08rem;
}

.decision-card strong {
    color: #f5f7f4;
    font-size: 1.3rem;
    line-height: 1.18;
}

.decision-card p {
    margin: 0;
    flex: 1;
}

.decision-light {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 16%, transparent);
}

.decision-value {
    color: #f5f7f4;
    font-weight: 800;
}

.status-green {
    border-left-color: #5dd39e !important;
    color: #5dd39e;
}

.status-yellow {
    border-left-color: #ffc857 !important;
    color: #ffc857;
}

.status-orange {
    border-left-color: #ef8354 !important;
    color: #ef8354;
}

.status-red {
    border-left-color: #ff6b6b !important;
    color: #ff6b6b;
}

.status-chip {
    color: #101312 !important;
    font-weight: 850 !important;
}

.status-chip.status-green {
    background: #5dd39e !important;
}

.status-chip.status-yellow {
    background: #ffc857 !important;
}

.status-chip.status-orange {
    background: #ef8354 !important;
}

.status-chip.status-red {
    background: #ff6b6b !important;
}

.status-chip.small {
    height: 26px;
    font-size: 0.75rem;
}

.forecast-section {
    margin: 28px 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.timeline-grid {
    display: grid;
    gap: 10px;
}

.timeline-grid.short {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timeline-grid.long {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hour-tile {
    min-height: 156px;
    padding: 16px;
}

.hour-tile.compact {
    min-height: 142px;
}

.hour-time {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.hour-time strong {
    color: #f5f7f4;
    font-size: 1.1rem;
}

.hour-time span {
    color: #9ad8c2;
    font-weight: 800;
}

.hour-condition {
    min-height: 40px;
    font-weight: 750;
}

.hour-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.hour-values span {
    min-height: 32px;
    padding: 7px 8px;
    border-radius: 8px;
    background: #111513;
    color: #dce4dd;
    font-size: 0.88rem;
}

.daily-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.day-card {
    min-height: 260px;
}

.day-card-top strong {
    color: #f5f7f4;
}

.day-card-top span {
    color: #ffc857;
    font-weight: 800;
}

.day-card p {
    min-height: 48px;
    margin: 12px 0;
}

.day-values {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.confidence-card {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.confidence-card h2 {
    margin: 0 0 10px;
}

.confidence-card p {
    margin: 0;
}

.confidence-list {
    display: grid;
    gap: 8px;
}

.confidence-row {
    display: grid;
    grid-template-columns: 64px 118px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: #121614;
}

.confidence-row span {
    color: #9ad8c2;
    font-weight: 800;
}

.confidence-row strong {
    color: #f5f7f4;
}

.blazor-error-boundary {
    margin: 24px;
    padding: 18px;
    border-radius: 8px;
    background: #7c2d2d;
    color: #fff;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
}

@media (max-width: 1180px) {
    .hero-section,
    .confidence-card {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 900px) {
    .weather-page {
        padding: 18px;
    }

    .hero-copy {
        min-height: 260px;
        padding: 24px;
    }

    .hero-copy h1 {
        font-size: 2.35rem;
    }

    .current-weather {
        grid-template-columns: 1fr;
    }

    .temperature-stack {
        text-align: left;
    }

    .temperature-stack strong {
        font-size: 4rem;
    }

    .metric-grid,
    .timeline-grid.long {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .weather-page {
        padding: 14px;
    }

    .hero-copy h1 {
        font-size: 2rem;
    }

    .location-actions,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .metric-grid,
    .timeline-grid.short,
    .timeline-grid.long,
    .daily-grid {
        grid-template-columns: 1fr;
    }

    .confidence-row {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
