:root {
  --bg: #0b1020;
  --panel: #11182c;
  --panel-2: #17213a;
  --text: #eef4ff;
  --muted: #a9b7d0;
  --line: rgba(255,255,255,0.12);
  --accent: #70e1ff;
  --accent-2: #a78bfa;
  --danger: #ff7a90;
  --shadow: 0 20px 60px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(112,225,255,0.22), transparent 32rem),
              radial-gradient(circle at top right, rgba(167,139,250,0.18), transparent 28rem),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: inherit; }
.site-header { padding: 48px 24px 28px; }
.header-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.14em; font-size: 12px; font-weight: 800; margin: 0 0 8px; }
h1 { font-size: clamp(36px, 6vw, 68px); line-height: 0.95; margin: 0; }
.subtitle { color: var(--muted); max-width: 680px; font-size: 18px; line-height: 1.55; margin: 18px 0 0; }
.stats-card { min-width: 128px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); border-radius: 22px; padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stats-card span { display: block; font-size: 38px; font-weight: 900; }
.stats-card small { color: var(--muted); }
main { max-width: 1180px; margin: 0 auto; padding: 0 24px 52px; }
.toolbar { display: flex; gap: 14px; align-items: end; margin: 20px 0 26px; }
.search-box { flex: 1; display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select { width: 100%; border: 1px solid var(--line); background: rgba(255,255,255,0.08); color: var(--text); border-radius: 14px; padding: 14px 16px; outline: none; font-size: 15px; }
select { max-width: 180px; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(112,225,255,0.12); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.video-card { border: 1px solid var(--line); border-radius: 22px; background: rgba(17,24,44,0.78); overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform 150ms ease, border-color 150ms ease, background 150ms ease; color: inherit; padding: 0; text-decoration: none; display: block; }
.video-card:hover { transform: translateY(-4px); border-color: rgba(112,225,255,0.6); background: rgba(23,33,58,0.95); }
.video-card:focus-visible { outline: 4px solid rgba(112,225,255,0.55); outline-offset: 3px; }
.thumbnail-card { aspect-ratio: 16/9; background: #000; }
.thumbnail-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-meta { padding: 14px 15px 16px; }
.card-title { font-size: 16px; line-height: 1.28; margin: 0 0 9px; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-channel, .card-date { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.35; }
.card-channel { font-weight: 800; color: #d4e4fb; margin-bottom: 4px; }
.channel, .meta { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tag { border: 1px solid rgba(112,225,255,0.28); color: #c8f5ff; background: rgba(112,225,255,0.09); border-radius: 999px; padding: 5px 8px; font-size: 11px; font-weight: 700; }
.detail-panel { border: 1px solid var(--line); border-radius: 26px; background: rgba(17,24,44,0.90); padding: 22px; box-shadow: var(--shadow); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.close-btn, .delete-btn { border: 1px solid var(--line); background: rgba(255,255,255,0.08); color: var(--text); border-radius: 999px; padding: 10px 14px; cursor: pointer; font-weight: 800; }
.close-btn:hover { border-color: var(--accent); }
.delete-btn { border-color: rgba(255,122,144,0.55); color: #ffd6de; background: rgba(255,122,144,0.10); }
.delete-btn:hover { border-color: var(--danger); background: rgba(255,122,144,0.18); }
.delete-note { margin: 0 0 20px; color: var(--muted); font-size: 13px; border-left: 3px solid var(--danger); padding-left: 10px; }
.voice-reader { margin-top: 18px; border: 1px solid rgba(112,225,255,0.24); background: linear-gradient(135deg, rgba(112,225,255,0.12), rgba(167,139,250,0.10)); border-radius: 20px; padding: 16px; display: grid; gap: 14px; }
.voice-reader[hidden] { display: none; }
.voice-reader-label { margin: 0 0 5px; color: #ffffff; font-size: 13px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.voice-reader-status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.natural-audio { width: 100%; margin-top: 12px; }
.voice-reader-controls { display: flex; flex-wrap: wrap; gap: 9px; }
.voice-reader-controls[hidden] { display: none; }
.voice-btn { border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.09); color: var(--text); border-radius: 999px; padding: 10px 13px; cursor: pointer; font-weight: 850; }
.voice-btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #07101d; border-color: transparent; }
.voice-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--accent); }
.voice-btn:disabled { cursor: not-allowed; opacity: 0.48; }
.detail-layout { display: grid; grid-template-columns: minmax(240px, 420px) 1fr; gap: 24px; align-items: start; }
.detail-thumb { width: 100%; border-radius: 18px; border: 1px solid var(--line); display: block; }
#detailTitle { font-size: clamp(28px, 4vw, 46px); line-height: 1.04; margin: 0 0 12px; }
.summary-content { margin-top: 26px; color: #e7eefc; line-height: 1.68; font-size: 16px; }
.summary-content h3 { margin: 28px 0 8px; font-size: 21px; }
.summary-content ul { padding-left: 22px; }
.summary-content li { margin: 7px 0; }
.summary-content p { margin: 0 0 14px; }
.summary-content strong { color: white; }
.empty-state { border: 1px dashed var(--line); border-radius: 24px; padding: 36px; text-align: center; color: var(--muted); }
.text-link { color: var(--accent); font-weight: 800; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
footer { max-width: 1180px; margin: 0 auto; padding: 26px 24px 44px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .header-inner, .toolbar, .detail-layout { display: block; }
  .stats-card { margin-top: 22px; }
  select { max-width: none; margin-top: 12px; }
  .detail-layout > div + div { margin-top: 18px; }
}
