:root {
  --bg: #f5f6f8;
  --bg-soft: #eceef2;
  --panel: #ffffff;
  --panel-2: #f1f3f7;
  --line: #e4e7ee;
  --text: #13222e;
  --muted: #6a7684;
  --accent: #c9974f;
  --accent-2: #a97a35;
  --brand: #0b2a3a;
  --brand-2: #14506b;
  --brand-3: #1c6a8c;
  --ok: #3f9d6e;
  --warn: #c98f3a;
  --danger: #d9534f;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(11,42,58,.06);
  --shadow: 0 14px 40px rgba(11,42,58,.12);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(20,80,107,.10), transparent 60%),
    radial-gradient(900px 480px at -8% 108%, rgba(201,151,79,.10), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

/* ---------- App shell ---------- */
.app { min-height: 100%; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 26px;
  padding: 0 26px; height: 66px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 18px; letter-spacing: .2px; color: var(--brand); font-family: var(--font-display); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand), var(--brand-3));
  color: #fff; font-size: 17px;
  box-shadow: 0 4px 14px rgba(11,42,58,.35);
  border: 1px solid rgba(255,255,255,.14);
}
.brand .accent { color: var(--accent-2); }

.nav { display: flex; gap: 2px; background: var(--bg-soft); padding: 4px; border-radius: 12px; }
.nav button {
  background: transparent; border: none; color: var(--muted);
  font-size: 13.5px; font-weight: 500; padding: 8px 13px; border-radius: 9px;
  transition: all .18s; display: flex; align-items: center; gap: 6px;
}
.nav button:hover { color: var(--text); }
.nav button.active { color: var(--brand); background: #fff; box-shadow: var(--shadow-sm); font-weight: 600; }

.topbar .spacer { flex: 1; }
.user-chip { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); font-weight: 500; }
.user-chip .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(201,151,79,.4);
  border: 2px solid #fff;
}

.content { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 30px 26px 110px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 22px;
  padding: 52px 48px;
  background:
    radial-gradient(700px 340px at 88% -20%, rgba(28,106,140,.55), transparent 60%),
    radial-gradient(500px 300px at -10% 120%, rgba(201,151,79,.35), transparent 55%),
    linear-gradient(135deg, #0b2a3a 0%, #11425c 60%, #14506b 100%);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 30px;
  color: #fff;
  box-shadow: var(--shadow);
}
.hero::after {
  content: "✝";
  position: absolute; right: 6%; bottom: -12%; font-size: 220px; opacity: .07;
  line-height: 1; pointer-events: none;
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--accent); text-transform: uppercase;
  background: rgba(201,151,79,.14);
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(201,151,79,.3);
}
.hero h1 { margin: 0 0 14px; font-size: 46px; line-height: 1.08; max-width: 560px; position: relative; z-index: 1; }
.hero p { margin: 0; color: rgba(255,255,255,.78); max-width: 540px; line-height: 1.7; font-size: 16px; position: relative; z-index: 1; }

.section-title { font-size: 22px; margin: 34px 0 16px; display: flex; align-items: baseline; gap: 10px; }
.section-title .count { font-size: 13px; color: var(--muted); font-weight: 500; font-family: var(--font-body); }

.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .hero { padding: 38px 28px; } .hero h1 { font-size: 34px; } }
@media (max-width: 560px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.card:hover { transform: translateY(-5px); border-color: rgba(201,151,79,.5); box-shadow: var(--shadow); }
.card .thumb {
  aspect-ratio: 16/10; position: relative;
  display: grid; place-items: center; color: rgba(255,255,255,.85);
  overflow: hidden;
}
.card .thumb::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 20% 0%, rgba(255,255,255,.28), transparent 55%);
}
.card .thumb .ph { font-size: 34px; position: relative; z-index: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.card .thumb .dur {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  background: rgba(11,42,58,.78); color: #fff; font-size: 11px; font-weight: 600;
  padding: 3px 7px; border-radius: 6px; backdrop-filter: blur(4px);
}
.card .body { padding: 14px 16px; }
.card .body h3 { margin: 0 0 4px; font-size: 15px; line-height: 1.35; }
.card .body .sub { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- Music ---------- */
.music-list { display: flex; flex-direction: column; gap: 8px; }
.music-row {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 14px; border-radius: 14px; cursor: pointer;
  border: 1px solid transparent; transition: all .18s;
  background: var(--panel);
}
.music-row:hover { background: var(--panel-2); }
.music-row.active { background: var(--panel); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.music-row .idx { width: 28px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.music-row .cover {
  width: 48px; height: 48px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; font-size: 20px;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 12px rgba(11,42,58,.25);
}
.music-row .cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 25% 0%, rgba(255,255,255,.3), transparent 55%); }
.music-row .cover span { position: relative; z-index: 1; }
.music-row .meta { flex: 1; min-width: 0; }
.music-row .meta .t { font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-row .meta .a { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.music-row .dur { color: var(--muted); font-size: 12.5px; font-weight: 500; }

/* ---------- Player bar (floating glass) ---------- */
.player {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 30; width: min(880px, calc(100% - 32px));
  background: rgba(255,255,255,.9); backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 18px; display: flex; align-items: center; gap: 18px;
  box-shadow: 0 18px 50px rgba(11,42,58,.22);
}
.player .now { display: flex; align-items: center; gap: 12px; min-width: 0; width: 230px; }
.player .now .cover { width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; color: #fff; position: relative; overflow: hidden; }
.player .now .cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 25% 0%, rgba(255,255,255,.28), transparent 55%); }
.player .now .cover span { position: relative; z-index: 1; }
.player .now .t { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .now .a { font-size: 11.5px; color: var(--muted); }
.player .ctrls { display: flex; align-items: center; gap: 10px; }
.player .btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%; font-size: 15px;
  display: grid; place-items: center; transition: all .18s;
}
.player .btn:hover { border-color: var(--accent); transform: scale(1.06); }
.player .btn.play {
  width: 48px; height: 48px;
  background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff; border: none;
  box-shadow: 0 6px 18px rgba(201,151,79,.45);
}
.player .scrub { flex: 1; display: flex; align-items: center; gap: 10px; }
.player .time { font-size: 12px; color: var(--muted); min-width: 40px; font-variant-numeric: tabular-nums; }
.player .vol { width: 84px; }

input[type=range] { -webkit-appearance: none; appearance: none; height: 5px; border-radius: 5px; background: var(--line); outline: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(11,42,58,.3);
}

/* ---------- Filters / chips ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.filters .flabel { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: 4px; }
.chip {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 999px; transition: all .18s;
}
.chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-1px); }
.chip.on { background: linear-gradient(140deg, var(--brand), var(--brand-3)); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(11,42,58,.25); }

/* ---------- Admin / moderation ---------- */
.admin-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; margin: 18px 0; }
.tabs button {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  padding: 9px 16px; border-radius: 11px; font-size: 13px; font-weight: 600; transition: all .18s;
}
.tabs button.active { background: linear-gradient(140deg, var(--brand), var(--brand-3)); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(11,42,58,.25); }

.mod-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
  transition: box-shadow .18s;
}
.mod-row:hover { box-shadow: var(--shadow-sm); }
.mod-row .thumb { width: 96px; height: 58px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; color: #fff; font-size: 20px; position: relative; overflow: hidden; }
.mod-row .thumb::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 25% 0%, rgba(255,255,255,.25), transparent 55%); }
.mod-row .thumb span { position: relative; z-index: 1; }
.mod-row .info { flex: 1; min-width: 0; }
.mod-row .info .t { font-size: 14.5px; font-weight: 600; }
.mod-row .info .s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.mod-row .src { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; padding: 4px 9px; border-radius: 7px; }
.src-yt { background: rgba(229,57,53,.12); color: #c62828; }
.src-ig { background: rgba(201,149,77,.16); color: var(--accent-2); }
.src-fb { background: rgba(66,103,178,.14); color: #3b5b9e; }

.actions { display: flex; gap: 8px; }
.act {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  font-size: 13px; padding: 9px 14px; border-radius: 10px; font-weight: 600; transition: all .18s;
}
.act.pub { border-color: var(--ok); color: var(--ok); }
.act.pub:hover { background: var(--ok); color: #fff; transform: translateY(-1px); }
.act.rev { border-color: var(--warn); color: var(--warn); }
.act.rev:hover { background: var(--warn); color: #fff; transform: translateY(-1px); }
.act.rej { border-color: var(--danger); color: var(--danger); }
.act.rej:hover { background: var(--danger); color: #fff; transform: translateY(-1px); }

.state-badge { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; }
.state-published { background: rgba(63,157,110,.16); color: var(--ok); }
.state-review { background: rgba(201,143,58,.16); color: var(--warn); }
.state-rejected { background: rgba(217,83,79,.16); color: var(--danger); }

/* ---------- TV ---------- */
.tv-stage {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  background: var(--panel); margin-bottom: 22px; box-shadow: var(--shadow-sm);
}
.tv-stage .screen {
  aspect-ratio: 16/9;
  background:
    radial-gradient(900px 500px at 85% -20%, rgba(28,106,140,.5), transparent 60%),
    radial-gradient(600px 400px at -10% 120%, rgba(201,151,79,.25), transparent 55%),
    linear-gradient(140deg, #0b2a3a, #11425c);
  display: grid; place-items: center; position: relative; color: #fff;
}
.tv-stage .screen .live { position: absolute; top: 16px; left: 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(217,83,79,.92); padding: 6px 12px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.tv-stage .screen .live .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.tv-stage .screen .ph { text-align: center; }
.tv-stage .screen .ph .big { font-size: 50px; margin-bottom: 12px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.4)); }
.tv-stage .screen .ph div:last-child { font-size: 17px; font-weight: 600; }
.tv-stage .meta { padding: 16px 20px; }
.tv-stage .meta h2 { margin: 0 0 4px; font-size: 19px; }
.tv-stage .meta p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- Misc ---------- */
.empty { color: var(--muted); text-align: center; padding: 46px 0; font-size: 14px; }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.muted { color: var(--muted); }
/* ---------- Professional hero (two-column) ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero::after { opacity: .05; }
.hero-copy { flex: 1; min-width: 0; position: relative; z-index: 2; }
.hero-now { flex: 0 0 300px; position: relative; z-index: 2; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 600; padding: 13px 22px; border-radius: 12px;
  transition: all .18s; border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(140deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 24px rgba(201,151,79,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(201,151,79,.5); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }

.now-card {
  background: rgba(255,255,255,.1); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.18); border-radius: 20px; padding: 14px;
  cursor: pointer; transition: transform .2s;
}
.now-card:hover { transform: translateY(-4px) scale(1.01); }
.now-cover { position: relative; overflow: hidden; border-radius: 14px; aspect-ratio: 1/1; box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.now-info { position: relative; padding: 14px 6px 4px; display: flex; flex-direction: column; gap: 2px; }
.now-info .now-tag { font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; color: var(--accent); text-transform: uppercase; }
.now-info strong { font-size: 15.5px; font-family: var(--font-display); margin-top: 3px; }
.now-info i { font-style: normal; font-size: 12.5px; color: rgba(255,255,255,.75); }
.now-play {
  position: absolute; right: 4px; top: 4px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  border: none; box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.now-play:hover { transform: scale(1.08); }

/* ---------- Cover art fills its container ---------- */
.cover, .now-cover, .card .thumb, .screen-art { position: relative; overflow: hidden; }
.art { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen-art { position: absolute; inset: 0; }

/* overlay play button on hover for cards */
.thumb .overlay-play {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: rgba(11,42,58,.16); opacity: 0; transition: opacity .2s;
}
.card:hover .overlay-play { opacity: 1; }
.thumb .overlay-play svg { filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); color: #fff; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 20px; margin-bottom: 76px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
  padding: 26px; border-top: 1px solid var(--line);
  background: rgba(255,255,255,.5); backdrop-filter: blur(8px);
}
.foot-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; color: var(--brand); }
.foot-verse { font-size: 13.5px; color: var(--muted); font-style: italic; }
.foot-copy { margin-left: auto; font-size: 12.5px; color: var(--muted); }

/* music row cover glyph fallback */
.music-row .cover, .player .now .cover { flex: none; }

@media (max-width: 860px) {
  .hero { flex-direction: column; }
  .hero-now { flex: 0 0 auto; width: 100%; max-width: 320px; }
  .foot-copy { margin-left: 0; width: 100%; }
}
