:root {
  color-scheme: light;
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #edf1f7;
  --text: #172033;
  --muted: #61708b;
  --line: #dce3ee;
  --brand: #1263d6;
  --brand-hover: #0c4ead;
  --accent: #ff6b57;
  --shadow: 0 18px 48px rgba(20, 37, 66, .10);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101623;
  --surface: #192231;
  --surface-muted: #243145;
  --text: #f4f7fc;
  --muted: #a9b6ca;
  --line: #35445b;
  --brand: #6ca7ff;
  --brand-hover: #9bc3ff;
  --accent: #ff927e;
  --shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 3px; }
[aria-hidden="true"] { pointer-events: none; }
svg { display: block; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; }
[hidden] { display: none !important; }

.login-shell { display: grid; min-height: 100dvh; padding: 28px; place-items: center; background: linear-gradient(145deg, var(--canvas) 0%, color-mix(in srgb, var(--brand) 11%, var(--canvas)) 100%); }
.login-panel { width: min(100%, 430px); padding: 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.brand-mark { display: flex; width: 56px; height: 56px; align-items: end; justify-content: center; gap: 5px; padding: 13px; border-radius: 50%; background: var(--brand); }
.brand-mark span, .mini-mark i { display: block; width: 5px; border-radius: 6px; background: #fff; }
.brand-mark span:nth-child(1) { height: 13px; }.brand-mark span:nth-child(2) { height: 24px; }.brand-mark span:nth-child(3) { height: 18px; }.brand-mark span:nth-child(4) { height: 30px; }
.eyebrow { margin: 0 0 7px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(28px, 4vw, 42px); line-height: 1.05; }
h2 { margin-bottom: 6px; font-size: 22px; line-height: 1.2; }
.login-panel .eyebrow { margin-top: 28px; }.login-copy { color: var(--muted); }
.login-form, .new-user-form { display: grid; gap: 16px; margin-top: 28px; }
.registration-details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }.registration-details summary { cursor: pointer; color: var(--brand); font-weight: 750; }.registration-details > p { margin: 9px 0 0; color: var(--muted); font-size: 13px; }.registration-details .login-form { margin-top: 16px; }.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 11px 12px; background: var(--surface); color: var(--text); font-size: 15px; }
select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-repeat: no-repeat; background-size: 5px 5px; }
input::placeholder { color: color-mix(in srgb, var(--muted) 76%, transparent); }
.primary-button, .secondary-button { min-height: 42px; border: 0; border-radius: 6px; padding: 10px 16px; background: var(--brand); color: #fff; font-weight: 750; }
.primary-button:hover { background: var(--brand-hover); }
.secondary-button { border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.form-error { min-height: 20px; margin: 0; color: #c53627; font-size: 13px; font-weight: 650; }.form-error.success { color: #137b4f; }

.topbar { position: sticky; z-index: 4; top: 0; display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 14px; padding: 0 max(22px, calc((100vw - 1280px) / 2)); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: blur(15px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; text-decoration: none; }.brand strong { color: var(--brand); }
.mini-mark { display: flex; width: 26px; height: 26px; align-items: end; justify-content: center; gap: 3px; padding: 5px; border-radius: 50%; background: var(--brand); }.mini-mark i { width: 3px; }.mini-mark i:nth-child(1) { height: 7px; }.mini-mark i:nth-child(2) { height: 15px; }.mini-mark i:nth-child(3) { height: 10px; }
.top-actions { display: flex; align-items: center; gap: 4px; }
.icon-button, .icon-text-button, .text-button { border: 0; color: var(--text); background: transparent; font-weight: 700; }
.icon-button { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; font-size: 20px; }.icon-button:hover, .icon-text-button:hover, .icon-button.active { background: var(--surface-muted); color: var(--brand); }
.icon-text-button { display: flex; align-items: center; gap: 7px; min-height: 38px; border-radius: 6px; padding: 0 11px; }.icon-text-button span:first-child { color: var(--accent); font-size: 18px; }
.text-button { padding: 8px 3px; color: var(--brand); font-size: 14px; }.text-button:hover { color: var(--brand-hover); }

.layout { width: min(100% - 44px, 1280px); margin: 28px auto 80px; }
.player-panel { display: grid; min-height: 214px; grid-template-columns: 164px minmax(0, 1fr) 180px 74px; align-items: center; gap: 28px; padding: 26px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.player-art { display: grid; width: 164px; aspect-ratio: 1; place-items: center; overflow: hidden; border-radius: 7px; background: linear-gradient(135deg, var(--brand), #79b0ff); color: #fff; font-size: 68px; font-weight: 800; }.player-art img { width: 100%; height: 100%; object-fit: cover; }
.player-logo { display: grid; width: 100%; height: 100%; place-items: center; }.player-logo img { width: 100%; height: 100%; object-fit: cover; }
.player-kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }.player-kicker .eyebrow { margin: 0; }.stream-status { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; border-radius: 999px; padding: 3px 8px; background: var(--surface-muted); color: var(--muted); font-size: 11px; font-weight: 800; }.stream-status::before { width: 7px; height: 7px; border-radius: 50%; background: currentColor; content: ''; }.stream-status[data-state="available"] { background: color-mix(in srgb, #169c62 14%, var(--surface)); color: #137b4f; }.stream-status[data-state="connecting"], .stream-status[data-state="reconnecting"] { background: color-mix(in srgb, #dd8a13 14%, var(--surface)); color: #a65a00; }.stream-status[data-state="unavailable"] { background: color-mix(in srgb, #c53627 13%, var(--surface)); color: #ad3024; }
.player-information h1 { max-width: 650px; margin-bottom: 6px; font-size: clamp(24px, 3vw, 36px); overflow-wrap: anywhere; }.player-information > p:not(.eyebrow) { margin-bottom: 14px; color: var(--muted); }
.metadata-row { display: flex; flex-wrap: wrap; gap: 7px; }.metadata-row span, .station-details span { border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.meter { display: flex; height: 66px; align-items: center; justify-content: center; gap: 5px; }.meter i { width: 6px; height: 10px; border-radius: 7px; background: var(--accent); transform: scaleY(.35); transform-origin: center; }.meter.playing i { transform: scaleY(var(--level, .35)); transition: transform 85ms cubic-bezier(.2, .7, .2, 1); }
.player-controls { display: grid; justify-items: center; gap: 8px; }.play-button { display: grid; width: 62px; height: 62px; place-items: center; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: 25px; }.play-button:hover { background: var(--brand-hover); }.timer-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 17px; }.timer-button:hover, .timer-button.active { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); color: var(--brand); }.timer-label { color: var(--muted); font-size: 11px; font-weight: 800; white-space: nowrap; }

.continue-section { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 18px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }.continue-section h2 { margin: 0; font-size: 17px; }.continue-section .eyebrow { margin-bottom: 3px; }.continue-card { display: grid; min-width: min(100%, 410px); grid-template-columns: 42px minmax(0, 1fr) 28px; align-items: center; gap: 11px; border: 0; border-radius: 6px; padding: 7px; background: var(--surface-muted); color: var(--text); text-align: left; }.continue-card:hover { background: color-mix(in srgb, var(--brand) 12%, var(--surface-muted)); }.continue-logo { display: grid; width: 42px; height: 42px; place-items: center; overflow: hidden; border-radius: 5px; background: var(--surface); color: var(--brand); font-weight: 800; }.continue-logo img { width: 100%; height: 100%; object-fit: cover; }.continue-copy { min-width: 0; }.continue-copy strong, .continue-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.continue-copy strong { font-size: 14px; }.continue-copy small { margin-top: 3px; color: var(--muted); font-size: 12px; }.continue-play { color: var(--brand); font-size: 17px; }

.search-panel, .results-panel { margin-top: 28px; }.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; }.section-heading h2 { margin: 0; }.section-heading > div > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.filters { display: grid; grid-template-columns: 1.7fr repeat(3, 1fr) .85fr .8fr auto; gap: 12px; margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }.filters label { font-size: 12px; }.filters input { height: 42px; }.search-button { align-self: end; }
.results-heading { align-items: center; }.status-message { margin: 16px 0; padding: 13px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--text); }
.station-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }.station-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) 36px; gap: 12px; min-height: 144px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }.station-card:hover { border-color: color-mix(in srgb, var(--brand) 48%, var(--line)); box-shadow: 0 8px 22px rgba(20, 37, 66, .07); }
.station-logo { display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; border-radius: 6px; background: var(--surface-muted); color: var(--brand); font-weight: 850; }.station-logo img { width: 100%; height: 100%; object-fit: cover; }.station-body { min-width: 0; }.station-name { margin: 1px 0 5px; overflow: hidden; font-size: 15px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }.station-place { margin: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.station-details { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }.station-details span { padding: 3px 6px; font-size: 11px; }.station-actions { display: grid; align-content: start; gap: 6px; }.tiny-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%; background: var(--surface-muted); color: var(--text); font-size: 16px; }.tiny-icon:hover, .tiny-icon.active { background: color-mix(in srgb, var(--brand) 16%, var(--surface-muted)); color: var(--brand); }.tiny-icon.favorite.active { color: var(--accent); }

.dialog { width: min(calc(100% - 32px), 610px); padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }.dialog::backdrop { background: rgba(12, 20, 35, .46); }.dialog > section { padding: 25px; }.dialog-heading { display: flex; align-items: start; justify-content: space-between; }.dialog-heading h2 { margin: 0; }.new-user-form { grid-template-columns: 1fr 1.35fr auto; align-items: end; margin: 20px 0 8px; }.users-list { display: grid; gap: 7px; margin-top: 22px; }.user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }.user-row p { margin: 0; font-size: 14px; font-weight: 700; }.user-row small { color: var(--muted); }.delete-user { color: #c53627; }.password-details { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }.password-details summary { cursor: pointer; color: var(--brand); font-weight: 750; }.password-details .new-user-form { grid-template-columns: 1fr 1fr auto; }
.pending-registrations { margin-top: 24px; }.dialog-subheading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.dialog-subheading .eyebrow { margin-bottom: 3px; }.dialog-subheading h3 { margin: 0; font-size: 16px; }.count-badge { border-radius: 999px; padding: 3px 8px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); font-size: 12px; font-weight: 800; }.registration-actions { display: flex; flex-wrap: wrap; gap: 8px; }.registration-actions .secondary-button, .registration-actions .text-button { min-height: 34px; padding: 7px 10px; }.registration-actions .text-button { color: #b52e23; }
.timer-dialog { width: min(calc(100% - 32px), 440px); }.timer-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 22px 0 12px; }.timer-options .secondary-button { min-height: 54px; }

body.car-mode { overflow: hidden; }.car-mode .topbar { position: fixed; width: 100%; border-bottom-color: transparent; background: color-mix(in srgb, var(--canvas) 84%, transparent); }.car-mode .top-actions > :not(#car-mode-toggle) { display: none; }.car-mode .layout { display: grid; min-height: 100dvh; width: min(100% - 36px, 1180px); margin: 0 auto; place-items: center; }.car-mode .player-panel { position: relative; width: 100%; min-height: min(760px, calc(100dvh - 116px)); grid-template-columns: minmax(230px, .9fr) minmax(0, 1.1fr); grid-template-rows: 1fr auto; gap: 32px 42px; padding: clamp(28px, 5vw, 64px); }.car-mode .player-art { width: min(34vw, 360px); justify-self: center; font-size: clamp(72px, 12vw, 144px); }.car-mode .player-information h1 { font-size: clamp(36px, 5vw, 64px); }.car-mode .player-information > p:not(.eyebrow) { font-size: 18px; }.car-mode .metadata-row span { padding: 6px 10px; font-size: 14px; }.car-mode .meter { grid-column: 1 / -1; grid-row: 2; height: 76px; gap: 8px; }.car-mode .meter i { width: 9px; }.car-mode .player-controls { position: absolute; right: max(46px, 7vw); bottom: max(46px, 7vw); }.car-mode .play-button { width: 104px; height: 104px; font-size: 37px; }.car-mode .timer-button { width: 42px; height: 42px; font-size: 20px; }.car-mode .continue-section, .car-mode .search-panel, .car-mode .results-panel { display: none; }

@media (max-width: 980px) { .player-panel { grid-template-columns: 120px minmax(0, 1fr) 130px 62px; gap: 18px; }.player-art { width: 120px; }.filters { grid-template-columns: repeat(3, 1fr); }.wide-field { grid-column: span 2; }.search-button { grid-column: span 1; }.continue-section { align-items: start; flex-direction: column; }.continue-card { width: 100%; } }
@media (max-width: 680px) { .topbar { padding: 0 16px; }.layout { width: min(100% - 28px, 1280px); margin-top: 14px; }.icon-text-button span:last-child { display: none; }.player-panel { grid-template-columns: 74px minmax(0, 1fr) 58px; gap: 14px; min-height: 144px; padding: 16px; }.player-art { width: 74px; font-size: 34px; }.meter { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }.player-information h1 { font-size: 20px; }.player-information > p:not(.eyebrow) { margin-bottom: 9px; font-size: 13px; }.metadata-row span { font-size: 10px; }.stream-status { font-size: 10px; }.play-button { width: 52px; height: 52px; font-size: 20px; }.timer-button { width: 30px; height: 30px; font-size: 14px; }.timer-label { font-size: 10px; }.filters { grid-template-columns: 1fr 1fr; padding: 14px; }.wide-field { grid-column: span 2; }.search-button { grid-column: span 2; }.section-heading { align-items: center; }.station-grid { grid-template-columns: 1fr; }.new-user-form, .password-details .new-user-form { grid-template-columns: 1fr; }.login-panel { padding: 30px 24px; }.car-mode .layout { width: min(100% - 22px, 1180px); }.car-mode .player-panel { min-height: calc(100dvh - 82px); grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 20px; padding: 30px 20px 122px; }.car-mode .player-art { width: min(46vw, 200px); }.car-mode .player-information { text-align: center; }.car-mode .player-kicker, .car-mode .metadata-row { justify-content: center; }.car-mode .player-information h1 { font-size: 34px; }.car-mode .meter { position: static; grid-column: 1; grid-row: 3; width: auto; height: 54px; opacity: 1; }.car-mode .player-controls { right: 50%; bottom: 22px; transform: translateX(50%); grid-auto-flow: column; align-items: center; }.car-mode .play-button { width: 78px; height: 78px; font-size: 28px; } }

/* Rimada Radio 2.0 */
.player-panel { grid-template-columns: 164px minmax(0, 1fr) 180px 118px; }
.icon-text-button svg { color: var(--accent); font-size: 18px; }
.player-information .now-track { margin-bottom: 5px; color: var(--text); font-size: 16px; font-weight: 750; overflow-wrap: anywhere; }
.play-button svg { width: 27px; height: 27px; }
.secondary-controls { display: flex; gap: 3px; }
.player-icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); }
.player-icon-button:hover, .player-icon-button.active { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); color: var(--brand); }
.player-icon-button.favorite.active { color: var(--accent); }
.player-icon-button svg { width: 15px; height: 15px; }
.volume-control { display: flex; width: 94px; grid-template-columns: 22px 1fr; align-items: center; gap: 5px; }
.volume-control input { height: 22px; padding: 0; accent-color: var(--brand); }
.bare-icon { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border: 0; padding: 0; background: transparent; color: var(--muted); }
.bare-icon svg { width: 17px; height: 17px; }
.continue-card > svg { width: 18px; height: 18px; color: var(--brand); }
.filters input, .filters select { height: 42px; }
.results-tools { display: flex; align-items: center; gap: 5px; }
.search-heading-tools { display: flex; align-items: center; gap: 14px; }
.segmented-control { display: flex; border: 1px solid var(--line); border-radius: 6px; padding: 3px; background: var(--surface); }
.segmented-control button { min-height: 32px; border: 0; border-radius: 4px; padding: 0 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 750; }
.segmented-control button.active { background: var(--surface-muted); color: var(--brand); }
.danger-button { color: #b52e23; }
.station-health { display: flex; align-items: center; gap: 4px; margin: 6px 0 0; color: #137b4f; font-size: 11px; font-weight: 700; }
.station-health.bad { color: #ad3024; }
.station-health svg { width: 12px; height: 12px; }
.station-details { margin-top: 9px; }
.tiny-icon svg { width: 16px; height: 16px; }
.station-card.current { border-color: var(--brand); box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent); }
.favorite-group-title { grid-column: 1 / -1; margin: 10px 0 0; font-size: 16px; }
.favorite-group-title:first-child { margin-top: 0; }
.favorite-form { display: grid; grid-template-columns: 1.2fr 1fr .45fr auto; align-items: end; gap: 12px; margin-top: 22px; }
.file-button { cursor: pointer; }
.file-button input { display: none; }
.update-notice { position: fixed; z-index: 8; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 36px); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; }
.car-mode .player-icon-button { width: 44px; height: 44px; }
.car-mode .volume-control { display: none; }

@media (max-width: 680px) {
  .brand > span:last-child { display: none; }
  .top-actions { gap: 1px; }
  .top-actions .icon-button, .top-actions .icon-text-button { width: 34px; min-width: 34px; height: 38px; justify-content: center; padding: 0; }
  .player-panel { position: relative; grid-template-columns: 70px minmax(0, 1fr) 62px; gap: 12px; min-height: 166px; padding: 14px; }
  .player-art { width: 70px; font-size: 32px; }
  .player-information h1 { font-size: 19px; }
  .player-information .now-track { font-size: 13px; }
  .player-information > p:not(.eyebrow) { margin-bottom: 8px; font-size: 12px; }
  .metadata-row span:last-child { display: none; }
  .player-controls { gap: 5px; }
  .secondary-controls { gap: 1px; }
  .player-icon-button { width: 26px; height: 26px; }
  .volume-control { display: none; }
  .results-heading { align-items: flex-start; }
  .search-heading-tools { align-items: flex-end; flex-direction: column-reverse; gap: 4px; }
  .results-tools { flex-wrap: wrap; justify-content: end; }
  .favorite-form { grid-template-columns: 1fr; }
  .car-mode .player-controls { grid-auto-flow: row; }
  .car-mode .secondary-controls { gap: 6px; }
}

@media (min-width: 681px) and (max-width: 980px) {
  .player-panel { grid-template-columns: 120px minmax(0, 1fr) 130px 106px; }
}
