:root {
  --bg: #07090d;
  --bg2: #0e1218;
  --card: #141a22;
  --card2: #1a212c;
  --line: rgba(243, 239, 230, 0.08);
  --paper: #f3efe6;
  --muted: #8b93a1;
  --amber: #e8a54b;
  --amber-dim: rgba(232, 165, 75, 0.14);
  --teal: #3d9b86;
  --signal: #d94a3d;
  --ink: #0b0e14;
  --radius: 14px;
  --nav-h: 64px;
  --side: 248px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(232, 165, 75, 0.08), transparent 50%),
    radial-gradient(700px 360px at 100% 0%, rgba(61, 155, 134, 0.07), transparent 46%),
    linear-gradient(180deg, #07090d 0%, #0b1016 100%);
  color: var(--paper);
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.serif { font-family: "Newsreader", "Source Serif 4", Georgia, serif; }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

/* ——— Nav ——— */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background: rgba(7, 9, 13, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(232, 165, 75, 0.35);
}
.brand-txt { line-height: 1; }
.brand-name {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.brand-sub {
  display: block;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--amber);
  text-transform: uppercase;
  margin-top: 3px;
}
.search {
  flex: 1;
  max-width: 560px;
  position: relative;
  margin: 0 auto;
}
.search input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 40px 10px 40px;
  outline: none;
}
.search input:focus { border-color: rgba(232, 165, 75, 0.55); }
.search i.fa-magnifying-glass {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
}
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: 0.15s ease;
}
.btn:hover { background: rgba(255,255,255,0.04); }
.btn-amber {
  background: var(--amber);
  color: #1a1206;
  border-color: transparent;
}
.btn-amber:hover { filter: brightness(1.05); }
.btn-ghost { color: var(--muted); }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--paper);
}
.icon-btn:hover { background: var(--card); }

/* ——— Shell ——— */
.shell {
  display: grid;
  grid-template-columns: var(--side) 1fr;
  min-height: calc(100vh - var(--nav-h));
}
.sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow: auto;
  padding: 18px 12px 28px;
  border-right: 1px solid var(--line);
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}
.side-link i { width: 18px; text-align: center; color: var(--muted); }
.side-link:hover { background: rgba(255,255,255,0.04); }
.side-link.active {
  background: var(--amber-dim);
  color: var(--paper);
}
.side-link.active i { color: var(--amber); }
.side-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 12px 6px;
  font-weight: 700;
}
.followed { padding: 0 4px; }
.followed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.followed-item:hover { background: rgba(255,255,255,0.04); }
.mono-av {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: #243041;
  color: var(--amber);
  flex-shrink: 0;
}

/* ——— Main ——— */
.main { padding: 22px 22px 80px; min-width: 0; }
.hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  margin-bottom: 28px;
  background: #0a0d12;
}
.hero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,9,13,0.92) 0%, rgba(7,9,13,0.55) 52%, rgba(7,9,13,0.2) 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 36px 40px;
  max-width: 640px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  font-weight: 700;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px rgba(217,74,61,0.18);
}
.hero h1 {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 560;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
}
.hero p { color: var(--muted); margin: 0 0 18px; max-width: 46ch; line-height: 1.55; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
}
.row-head h2 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.45rem;
  font-weight: 560;
  margin: 0;
}
.row-head span { color: var(--muted); font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--paper);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
.chip.active { background: var(--paper); color: var(--ink); border-color: transparent; }

/* ——— Cards ——— */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 165, 75, 0.28);
  box-shadow: var(--shadow);
}
.thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.card:hover .thumb img { transform: scale(1.05); }
.thumb .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.45));
  opacity: 0;
  transition: 0.2s;
}
.card:hover .thumb .play { opacity: 1; }
.play-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
}
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(7,9,13,0.78);
  color: var(--amber);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(232,165,75,0.25);
}
.badge.small { color: #9ee0d0; border-color: rgba(61,155,134,0.35); }
.dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-size: 11px;
  background: rgba(0,0,0,0.75);
  padding: 2px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.card-body { padding: 12px 12px 14px; }
.card-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.meta { color: var(--muted); font-size: 12px; line-height: 1.45; }

/* featured */
.featured {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.feat-main {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.feat-main img { width: 100%; height: 100%; object-fit: cover; }
.feat-main .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
  background: linear-gradient(180deg, transparent, rgba(7,9,13,0.92));
}
.feat-main h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.6rem;
  margin: 6px 0 8px;
  font-weight: 560;
}
.feat-side { display: flex; flex-direction: column; gap: 10px; }
.feat-mini {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.feat-mini:hover { border-color: rgba(232,165,75,0.3); }
.feat-mini img { width: 148px; height: 86px; object-fit: cover; }
.feat-mini div { padding: 10px 10px 10px 0; }
.feat-mini h4 { margin: 0 0 6px; font-size: 13.5px; line-height: 1.3; }

/* channels */
.ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.ch-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}
.ch-card h3 { margin: 0 0 4px; font-size: 16px; }
.ch-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ch-av {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #243041;
  color: var(--amber);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.ch-card p { color: var(--muted); font-size: 13px; margin: 0 0 12px; min-height: 38px; }
.ch-actions { display: flex; justify-content: space-between; gap: 8px; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 16px;
}

/* ——— Watch ——— */
.watch {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 6, 9, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  overflow: auto;
  padding: 18px;
}
.watch.open { display: block; }
.watch-box {
  max-width: 1180px;
  margin: 10px auto 40px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.player { background: #000; aspect-ratio: 16/9; }
.player iframe, .player .ph {
  width: 100%;
  height: 100%;
  border: 0;
}
.player .ph {
  display: grid;
  place-items: center;
  color: var(--muted);
}
.watch-body { padding: 20px 22px 24px; }
.watch-title {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.7rem;
  margin: 0 0 8px;
  font-weight: 560;
}
.watch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
}
.watch-ch { display: flex; align-items: center; gap: 10px; }
.desc-box {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}
.desc-box a,
.watch-meta a,
.watch-ch a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 165, 75, 0.35);
}
.desc-box a:hover,
.watch-meta a:hover,
.watch-ch a:hover {
  color: var(--paper);
  border-bottom-color: var(--amber);
}
.desc-links {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.rel { margin-top: 22px; }

/* ——— Modal propose ——— */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0,0,0,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.modal-card h3 {
  font-family: "Newsreader", Georgia, serif;
  margin: 0 0 6px;
  font-size: 1.5rem;
}
.field { margin: 12px 0; }
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 700;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}
.field textarea { min-height: 90px; resize: vertical; }
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: var(--card2);
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 10px;
  z-index: 120;
  display: none;
}
.toast.show { display: block; }

.footer {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.footer a { color: var(--amber); text-decoration: none; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .featured { grid-template-columns: 1fr; }
  .hero-inner { padding: 28px 20px; }
  .search { max-width: none; }
  .brand-sub { display: none; }
}
@media (max-width: 640px) {
  .nav { gap: 8px; padding: 0 10px; }
  .btn span.hide-sm { display: none; }
  .main { padding: 14px 12px 64px; }
  .feat-mini { grid-template-columns: 112px 1fr; }
  .feat-mini img { width: 112px; height: 72px; }
}
