:root {
  --bg: #0f1115; --panel: #171a21; --panel-2: #1f242e; --text: #e7eaf0;
  --muted: #9aa3b2; --accent: #ff7847; --accent-2: #ffa94d; --border: #262b36;
}
* { box-sizing: border-box; }
body { margin:0; background: var(--bg); color: var(--text);
  font: 14px/1.5 -apple-system, Segoe UI, Roboto, system-ui, sans-serif; padding-bottom: 100px; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar { display:flex; align-items:center; gap:18px; padding:12px 20px;
  background: var(--panel); border-bottom: 1px solid var(--border); position: sticky; top:0; z-index:10; }
.brand { font-weight: 700; color: var(--accent); font-size: 18px; }
.topbar nav { display:flex; gap:14px; flex:1; }
.topbar nav a { color: var(--text); }
.topbar .user { color: var(--muted); font-size: 13px; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
h1, h2, h3 { margin: 0 0 12px; }
h1 { font-size: 24px; }
h2 { font-size: 18px; margin-top: 24px; }
.muted { color: var(--muted); }

button { background: var(--accent); color: #1a0f08; border: 0; padding: 8px 12px;
  border-radius: 6px; cursor: pointer; font-weight: 600; }
button:hover { background: var(--accent-2); }
button.link { background: transparent; color: var(--muted); padding: 4px 6px; font-weight: 400; }
button.link:hover { color: var(--text); background: transparent; text-decoration: underline; }

input, select, textarea { background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font: inherit; }
label { display: block; margin: 6px 0; }
form.stack label { display:block; margin: 8px 0; }
form.row-form { display:flex; gap:8px; margin: 12px 0; }

.flash { background: #1d3b2a; color: #aef0c5; padding: 10px 12px; border-radius: 6px;
  border: 1px solid #2a5a40; margin: 12px 0; }
.error { background: #3b1d1d; color: #f3b3b3; padding: 10px 12px; border-radius: 6px;
  border: 1px solid #5a2a2a; margin: 12px 0; }

.cards { list-style:none; padding:0; display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap:14px; }
.card { background: var(--panel); border:1px solid var(--border); border-radius:10px; padding:12px; }
.card a { color: var(--text); }
.card-title { font-weight:600; margin: 6px 0; }
.card-meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.cover { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; background:#000; }
.cover-lg { width: 200px; height: 200px; object-fit: cover; border-radius: 8px; }

.podcast-head { display:flex; gap:20px; align-items:flex-start; margin-bottom:16px; }
.ep-list { list-style:none; padding:0; }
.ep-list li { background: var(--panel); border:1px solid var(--border); padding: 10px 12px;
  border-radius: 8px; margin-bottom: 8px; }
.ep-title { font-weight: 600; }
.ep-meta { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }

table.data { width:100%; border-collapse: collapse; margin-top: 12px; }
table.data th, table.data td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align:left; }
table.data th { color: var(--muted); font-weight: 500; font-size: 12px; }

.tag { display:inline-block; background:var(--panel-2); padding:2px 8px; border-radius:99px;
  font-size: 11px; margin-right: 4px; color: var(--muted); }

.progressbar { height:4px; background:var(--panel-2); border-radius:2px; overflow:hidden; margin: 4px 0; }
.progressbar > span { display:block; height:100%; background: var(--accent); }

.auth-box { max-width: 360px; margin: 80px auto; background: var(--panel);
  padding: 28px; border-radius: 10px; border: 1px solid var(--border); }
.auth-box label { display:block; margin: 12px 0; }
.auth-box input { width: 100%; }

.player { position:fixed; bottom:0; left:0; right:0; background: var(--panel);
  border-top: 1px solid var(--border); padding: 8px 16px; z-index: 50;
  display:flex; gap:14px; align-items:center; }
.player.hidden { display:none; }
.np { min-width: 200px; max-width: 30%; }
.np-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-sub { color: var(--muted); font-size: 12px; }
.np-controls { display:flex; gap:8px; align-items:center; flex: 1; }
.np-controls input[type=range] { flex: 1; }
#video { max-height: 80px; max-width: 160px; }
.hidden { display: none; }

.prose { max-height: 240px; overflow:auto; padding: 8px; background: var(--panel-2);
  border-radius: 6px; margin-top: 8px; font-size: 13px; }

details summary { cursor:pointer; color: var(--muted); margin: 6px 0; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display:flex;
  align-items:center; justify-content:center; z-index: 100; }
.modal { background: var(--panel); padding: 20px; border-radius: 10px;
  border: 1px solid var(--border); min-width: 320px; max-width: 90%; }
