/* Farben und Grundeinstellungen */
:root {
    color-scheme: dark;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;

    --background: #09090b;
    --text: #f5f5f5;
    --muted: #b5b5c3;
    --accent: #ef6472;
    --border: #383842;

    color: var(--text);
    background: var(--background);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 10% 0%, #dc262617, transparent 45%),
        radial-gradient(ellipse at 95% 40%, #50608012, transparent 45%),
        linear-gradient(#ffffff03 1px, transparent 1px),
        linear-gradient(90deg, #ffffff03 1px, transparent 1px),
        var(--background);
    background-size:
        auto,
        auto,
        48px 48px,
        48px 48px,
        auto;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: .5;
    cursor: default;
}

a {
    color: inherit;
    text-decoration: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid #ff8892;
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

/* Kopfbereich */
.site-header {
    min-height: 86px;
    padding: 18px max(24px, calc((100% - 1200px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #101014;
    border-bottom: 1px solid #282830;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.brand > span:last-child {
    color: #ff6470;
}

.brand-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dc2626, #991b35);
    color: white;
}

.plan-button,
.secondary-button {
    padding: 10px 14px;
    border: 1px solid #454550;
    border-radius: 10px;
    background: #202027;
    color: #e5e5ed;
}

/* Seiteninhalt */
.shell {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.intro {
    padding: 56px 0 28px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #ff8892;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .16em;
}

h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    letter-spacing: -.045em;
}

.intro h1 {
    max-width: 700px;
    line-height: 1.08;
}

.intro > p:last-child,
.muted {
    color: var(--muted);
}

/* Player */
.player {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid #383840;
    border-radius: 24px;
    background: linear-gradient(125deg, #202027, #121216);
    box-shadow:
        0 24px 70px #0006,
        inset 0 1px 0 #ffffff08;
}

/* Lichtschein bleibt hinter dem Inhalt */
.player::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 280px;
    height: 280px;
    right: -100px;
    top: -160px;
    border-radius: 50%;
    background: #dc26261a;
    filter: blur(35px);
    pointer-events: none;
}

.player-art {
    position: relative;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border: 1px solid #505058;
    border-radius: 50%;
    background:
        repeating-radial-gradient(
            circle,
            #242429 0 3px,
            #17171c 4px 8px
        );
    color: #ff6976;
    font-size: 64px;
    box-shadow:
        0 12px 30px #0005,
        inset 0 0 0 12px #ffffff03;

    /* Pause hält die aktuelle Drehposition fest */
    animation: record-spin 10s linear infinite;
    animation-play-state: paused;
}

.player-art::after {
    content: "";
    position: absolute;
    inset: 28%;
    border: 1px solid #ef445955;
    border-radius: 50%;
    pointer-events: none;
}

.player.is-playing .player-art {
    animation-play-state: running;
}

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

.player-content {
    min-width: 0;
    flex: 1;
}

.player h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
}

.play-button {
    min-width: 155px;
    min-height: 50px;
    padding: 12px 20px;
    border: 1px solid #ef555f;
    border-radius: 12px;
    background: linear-gradient(135deg, #dc2626, #a51e38);
    color: white;
    font-weight: 700;
    box-shadow: 0 8px 26px #dc26262b;
}

.volume-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
}

input[type="range"] {
    width: 120px;
    accent-color: #ef4444;
}

output {
    min-width: 42px;
}

.status {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* Sender und Suche */
.station-section {
    padding: 36px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
}

.search {
    width: min(100%, 350px);
}

.search input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #15151b;
    color: var(--text);
}

.search input::placeholder {
    color: #a0a0b0;
}

.station-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 18px;
}

.station-card {
    position: relative;
    overflow: hidden;
    min-width: 0;
    min-height: 115px;
    padding: 24px 62px 24px 24px;
    border: 1px solid #33333d;
    border-radius: 18px;
    background: linear-gradient(135deg, #1c1c23, #141419);
    color: var(--text);
    text-align: left;
    box-shadow: 0 8px 24px #0002;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.station-card strong {
    display: block;
    margin-bottom: 7px;
    font-size: 18px;
    overflow-wrap: anywhere;
}

.station-card span {
    color: #aaaabb;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.station-card::after {
    content: "▶";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid #484852;
    border-radius: 50%;
    color: #c5c5d2;
    font-size: 11px;
}

.station-card.selected {
    border-color: #ed566a;
    background: linear-gradient(135deg, #311c25, #1b171e);
    box-shadow: 0 8px 30px #dc262615;
}

.station-card.selected::after {
    border-color: var(--accent);
    background: #dc263e;
    color: white;
}

/* Hinweise und Fußbereich */
.message {
    padding: 18px;
    border: 1px solid #41414d;
    border-radius: 12px;
    background: #19191f;
    color: #d5d5df;
}

footer {
    padding: 24px;
    color: #9292a4;
    text-align: center;
    font-size: 12px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Hover für Geräte mit Maus */
@media (hover: hover) {
    .play-button:hover:not(:disabled) {
        filter: brightness(1.15);
    }

    .secondary-button:hover:not(:disabled),
    .plan-button:hover:not(:disabled) {
        background: #2c2c35;
    }

    .station-card:hover:not(:disabled) {
        transform: translateY(-3px);
        border-color: #737383;
        background: linear-gradient(135deg, #272730, #1b1b22);
        box-shadow: 0 14px 30px #0004;
    }

    .station-card.selected:hover:not(:disabled) {
        border-color: #ff8996;
        background: linear-gradient(135deg, #311c25, #1b171e);
    }
}

/* Handy */
@media (max-width: 650px) {
    .shell {
        width: calc(100% - 32px);
    }

    .site-header {
        padding: 16px;
    }

    .brand {
        font-size: 17px;
    }

    .player {
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
    }

    .player-art {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }

    .section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .search {
        width: 100%;
    }

    .controls {
        gap: 18px;
    }
}

/* Systemeinstellung „Bewegung reduzieren“ berücksichtigen */
@media (prefers-reduced-motion: reduce) {
    .player-art {
        animation: none;
    }

    .station-card {
        transition: none;
    }

    .station-card:hover:not(:disabled) {
        transform: none;
    }
}