/* ==========================================================================
   100radios v2 – dark media theme with per-station accents
   Accent colors are driven by the --accent custom property, set per
   station (body attribute or .station-card inline style).
   ========================================================================== */

:root {
    --bg: #0b0d12;
    --bg-raise: #12151d;
    --bg-raise-2: #1a1e29;
    --line: rgba(255, 255, 255, .08);
    --text: #e7eaf0;
    --text-dim: #9aa3b2;
    --accent: #8b9cff;            /* neutral default, overridden per station */
    --accent-soft: rgba(139, 156, 255, .15);
    --hero-gradient: linear-gradient(135deg, #1e2436 0%, #12151d 100%);
    --radius: 16px;
    --playerbar-h: 76px;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Sora', var(--font-body);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: calc(var(--playerbar-h) + 16px);
}

img { display: block; }

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

.wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 18, .85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 64px;
}

.brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -.02em;
    color: var(--text);
    white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    color: var(--accent);
    margin-right: 2px;
}

.topnav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
}

.topnav-link {
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--text-dim);
    font-weight: 500;
    font-size: .92rem;
    white-space: nowrap;
    transition: color .15s, background .15s;
}
.topnav-link:hover {
    color: var(--text);
    background: var(--bg-raise-2);
    text-decoration: none;
}
.topnav-link.is-active {
    color: var(--link-accent, var(--accent));
    background: var(--bg-raise-2);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
    background: var(--hero-gradient);
    border-bottom: 1px solid var(--line);
    padding: 72px 0 64px;
    margin-bottom: 40px;
}

.hero-small { padding: 48px 0 40px; }

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 12px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.08;
    margin: 0 0 16px;
}

.hero-sub {
    color: var(--text-dim);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    transition: transform .12s, box-shadow .12s, background .15s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-play {
    background: var(--accent);
    color: #0b0d12;
}
.btn-play:hover {
    box-shadow: 0 6px 24px var(--accent-soft), 0 2px 8px rgba(0, 0, 0, .4);
}
.btn-play.is-playing .btn-play-icon { display: none; }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}
.btn-ghost:hover { background: var(--bg-raise-2); }

.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   Live pill
   -------------------------------------------------------------------------- */
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-raise-2);
    border: 1px solid var(--line);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--text-dim);
}
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-dim);
}
.live-pill.is-live { color: #4ade80; border-color: rgba(74, 222, 128, .3); }
.live-pill.is-live .live-dot {
    background: #4ade80;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .5); }
    50% { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}

/* --------------------------------------------------------------------------
   Station cards (hub)
   -------------------------------------------------------------------------- */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 56px;
}

.station-card {
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color .2s, transform .15s;
}
.station-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--accent);
    opacity: .9;
}
.station-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.station-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.station-card-name {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.station-card-tagline {
    color: var(--accent);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 4px 0 0;
}

.station-card-desc {
    color: var(--text-dim);
    font-size: .95rem;
    margin: 0;
}

.station-card-np {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    min-height: 96px;
}

.np-art {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-raise-2);
}

.np-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.np-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--accent);
}

.np-track {
    font-weight: 600;
    font-size: .95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.np-listeners, .np-next {
    font-size: .82rem;
    color: var(--text-dim);
}

.station-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

/* --------------------------------------------------------------------------
   Features strip
   -------------------------------------------------------------------------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 64px;
}
.feature h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 0 0 8px;
}
.feature p {
    color: var(--text-dim);
    font-size: .92rem;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Station page hero
   -------------------------------------------------------------------------- */
.station-hero {
    background: var(--hero-gradient);
    border-bottom: 1px solid var(--line);
    padding: 56px 0 48px;
    margin-bottom: 40px;
}

.station-hero-inner {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 40px;
    align-items: center;
}

.station-hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 24px 0 20px;
}

.stream-links {
    font-size: .88rem;
    color: var(--text-dim);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.stream-links a {
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 2px 12px;
    transition: border-color .15s;
}
.stream-links a:hover { border-color: var(--accent); text-decoration: none; }

.station-social { margin-top: 14px; font-size: .88rem; }

.station-hero-np {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.hero-art {
    width: min(280px, 70vw);
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px var(--line);
}

/* --------------------------------------------------------------------------
   Playlist
   -------------------------------------------------------------------------- */
.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 6px;
}
.section-sub {
    color: var(--text-dim);
    font-size: .92rem;
    margin: 0 0 20px;
}

.playlist-section { margin-bottom: 64px; }

.playlist {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-raise);
}

.playlist-row {
    display: grid;
    grid-template-columns: 48px 1fr auto auto;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    transition: background .12s;
}
.playlist-row:last-child { border-bottom: 0; }
.playlist-row:hover { background: var(--bg-raise-2); }

.playlist-art {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-raise-2);
}

.playlist-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.playlist-title {
    color: var(--text);
    font-weight: 600;
    font-size: .95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.playlist-title:hover { color: var(--accent); text-decoration: none; }

.playlist-artist {
    color: var(--text-dim);
    font-size: .85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-time {
    color: var(--text-dim);
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text-dim);
    border-radius: 999px;
    padding: 5px 12px;
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
    transition: color .15s, border-color .15s, transform .1s;
}
.like-btn:hover {
    color: #fb7185;
    border-color: rgba(251, 113, 133, .4);
}
.like-btn.is-liked {
    color: #fb7185;
    border-color: rgba(251, 113, 133, .4);
    background: rgba(251, 113, 133, .08);
}
.like-btn.is-denied { animation: shake .3s; }
@keyframes shake {
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

.other-stations { margin-bottom: 64px; }

/* --------------------------------------------------------------------------
   Song detail
   -------------------------------------------------------------------------- */
.song-detail {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 64px;
}
.song-detail-art {
    width: min(400px, 100%);
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), 0 0 0 1px var(--line);
}
.song-detail-likes {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fb7185;
    font-weight: 600;
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Prose / forms
   -------------------------------------------------------------------------- */
.prose { max-width: 720px; margin-bottom: 64px; }
.prose h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin: 32px 0 8px;
}
.prose h3 { font-size: 1.05rem; margin: 20px 0 4px; }
.prose p { color: var(--text-dim); }

.form-section { max-width: 720px; margin-bottom: 64px; }

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    font-size: .9rem;
}
.contact-form input,
.contact-form textarea {
    background: var(--bg-raise);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    padding: 12px 14px;
    transition: border-color .15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 32px 0;
    color: var(--text-dim);
    font-size: .88rem;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-inner p { margin: 0; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer nav a { color: var(--text-dim); }
.footer nav a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Persistent player bar
   -------------------------------------------------------------------------- */
.playerbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    height: var(--playerbar-h);
    background: rgba(15, 18, 26, .96);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, .45);
}

.playerbar-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
}

.playerbar-art {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-raise-2);
}

.playerbar-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.playerbar-station {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
}

.playerbar-track {
    font-weight: 600;
    font-size: .92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playerbar-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: #0b0d12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform .12s, box-shadow .15s;
}
.playerbar-toggle:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 18px var(--accent-soft);
}

.playerbar-volume {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dim);
}
.playerbar-volume input[type="range"] {
    width: 110px;
    accent-color: var(--accent);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
    .station-hero-inner { grid-template-columns: 1fr; }
    .station-hero-np { order: -1; }
    .hero { padding: 48px 0 40px; }
}

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .playlist-row { grid-template-columns: 40px 1fr auto; }
    .playlist-time { display: none; }
    .playlist-art { width: 40px; height: 40px; }
    .playerbar-volume { display: none; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
