/* EB IT Radio listener app */
:root {
  --bg: #0f2236; --bg2: #16304b; --card: #1b3a5a; --line: #2a4d72; --text: #eef4fb; --muted: #a9bfd6;
  --accent: #4fa3ff; --live: #e5484d; --ok: #3ccf8e; --warn: #f5b942; --heart: #ff5c8a;
  --nav-h: 62px; --player-h: 68px; --radius: 14px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f6fa; --bg2: #ffffff; --card: #ffffff; --line: #d7e1ec; --text: #10243a; --muted: #57708a;
  --accent: #1a6fd1; color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.pad { padding: 16px; }

#app { min-height: 100dvh; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { border-radius: 9px; }
.brand { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.live-tag { background: var(--live); color: #fff; font-size: .7rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: .04em; }
.install { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 600; cursor: pointer; }

#view { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + var(--player-h) + env(safe-area-inset-bottom) + 24px); outline: none; }
h1 { font-size: 1.45rem; margin: 4px 0 12px; }
h2 { font-size: 1.1rem; margin: 18px 0 8px; }
h3 { font-size: 1rem; margin: 12px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 10px 18px;
  background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; min-height: 44px; }
.btn.outline { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--live); border: 1px solid var(--live); }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.chip { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); }
.chip.live { background: var(--live); border-color: var(--live); color: #fff; font-weight: 700; }
.chip.ok { color: var(--ok); border-color: var(--ok); }
.field { display: block; margin: 0 0 12px; }
.field > span { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=search], textarea, select {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); min-height: 44px; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: center; padding: 8px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.msg.ok { border-color: var(--ok); }
.msg.bad { border-color: var(--live); }
.empty { color: var(--muted); padding: 8px 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }

/* Listen */
.hero { text-align: center; padding: 22px 16px; }
.hero-art { width: min(260px, 70vw); aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.35); background: var(--bg2); }
.hero-title { font-size: 1.35rem; font-weight: 700; margin: 14px 0 2px; }
.hero-sub { color: var(--muted); }
.hero-play { width: 76px; height: 76px; border-radius: 50%; margin: 16px auto 4px; }
.hero-play svg { width: 36px; height: 36px; fill: #fff; }
.vol { width: min(280px, 80%); accent-color: var(--accent); }
.next { text-align: left; }

/* Mini player */
.player { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); height: var(--player-h); z-index: 6;
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg2); border-top: 1px solid var(--line); }
.p-art { border-radius: 8px; object-fit: cover; background: var(--card); }
.p-info { flex: 1; min-width: 0; }
.p-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-heart, .hero-heart { border: 1px solid var(--line); background: transparent; color: var(--muted); width: 44px; height: 44px; border-radius: 50%; font-size: 1.25rem; cursor: pointer; }
.p-heart[aria-pressed="true"], .hero-heart[aria-pressed="true"] { color: var(--heart); border-color: var(--heart); }
.p-play, .hero-play { position: relative; border: 0; background: var(--accent); width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.p-play svg { width: 24px; height: 24px; fill: #fff; }
.i-pause { display: none; }
.playing .i-play { display: none; }
.playing .i-pause { display: block; }
.spin { display: none; position: absolute; inset: 3px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin 0.9s linear infinite; }
.loading .spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Bottom tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .7rem;
  color: var(--muted); text-decoration: none; min-width: 0; }
.tabs a span { font-size: 1.25rem; line-height: 1; }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 700; }

/* Schedule */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.day-tabs button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--bg2); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.day-tabs button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot { display: flex; gap: 12px; }
.slot-time { min-width: 92px; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Request / search */
.results button { width: 100%; text-align: left; background: transparent; border: 0; padding: 10px 2px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.results button:disabled { opacity: .55; }

/* Chart */
.pos { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line); font-weight: 700; margin-right: 10px; }

/* Hosts */
.host { display: flex; gap: 12px; align-items: flex-start; }
.host img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--bg2); flex: 0 0 64px; }
.host .ph { width: 64px; height: 64px; border-radius: 50%; background: var(--bg2); display: grid; place-items: center; font-size: 1.6rem; flex: 0 0 64px; }

/* Alerts */
.follow-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.follow-grid label { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; cursor: pointer; background: var(--bg2); }
.follow-grid input { width: 20px; height: 20px; accent-color: var(--accent); }

/* More */
.menu a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.menu a span:first-child { font-size: 1.3rem; width: 28px; text-align: center; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--player-h) + env(safe-area-inset-bottom) + 12px);
  z-index: 9; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; max-width: 90vw; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.3); }

@media (min-width: 900px) {
  .tabs a { flex-direction: row; gap: 8px; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }

.hero-art.is-dj { border-radius: 50%; border: 4px solid var(--live); }
