:root {
  --gold: #c9a961;
  --gold-bright: #e8c97a;
  --gold-dim: #8a7340;
  --crimson: #a02c2c;
  --masonic-bg: #161310;
  --masonic-bg-2: #0d0b09;
  --foreground: #f4ecd8;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #060606;
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
}
.font-display { font-family: "Cinzel", serif; }
.text-gold { color: var(--gold); }
.text-gold-bright { color: var(--gold-bright); }
.text-crimson { color: var(--crimson); }

/* Quiz layout */
.quiz-bg {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at top, var(--masonic-bg) 0%, var(--masonic-bg-2) 70%, #060606 100%);
}
.bg-deco { position: absolute; inset: 0; opacity: 0.04; pointer-events: none; }
.bg-deco svg { position: absolute; color: var(--gold); }
.bg-deco .sc { top: -80px; left: -80px; width: 500px; height: 500px; }
.bg-deco .eye { bottom: -96px; right: -64px; width: 420px; height: 420px; }

.container-q { position: relative; z-index: 10; max-width: 42rem; margin: 0 auto; padding: 24px 20px 64px; }
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; padding-bottom: 24px; }
.brand svg { width: 32px; height: 32px; color: var(--gold); }
.brand span { font-family: "Cinzel", serif; letter-spacing: 0.3em; color: var(--gold-bright); font-size: 12px; }

.progress-wrap { margin-bottom: 40px; }
.progress { height: 6px; width: 100%; border-radius: 9999px; background: rgba(255,255,255,0.10); overflow: hidden; }
.progress > div { height: 100%; width: 0%; transition: width 0.5s ease; background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright)); }

.step { display: none; animation: fadeIn 0.5s ease; }
.step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.intro { text-align: center; }
.ornament { display: block; margin: 0 auto 32px; width: 192px; color: var(--gold); }
.title { font-family: "Cinzel", serif; font-weight: 900; line-height: 1.15; color: var(--gold-bright); font-size: clamp(28px, 4.5vw, 48px); }
.subtitle { margin-top: 32px; font-size: clamp(15px, 1.6vw, 18px); color: rgba(244,236,216,0.7); line-height: 1.6; }
.subtitle b { color: var(--foreground); }
.subtitle b.gold { color: var(--gold-bright); }

.qtitle { font-family: "Cinzel", serif; font-weight: 900; text-align: center; line-height: 1.15; color: var(--gold-bright); font-size: clamp(22px, 3.2vw, 30px); }
.options { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }

.opt {
  width: 100%; text-align: left; cursor: pointer;
  border-radius: 12px;
  border: 1px solid rgba(201,169,97,0.30);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(4px);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  color: rgba(244,236,216,0.9);
  font-size: clamp(15px, 1.5vw, 18px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.opt:hover { border-color: var(--gold-bright); background: rgba(201,169,97,0.05); transform: translateY(-2px); box-shadow: 0 6px 30px -8px rgba(201,169,97,0.45); }
.opt .emoji { font-size: 24px; flex-shrink: 0; }
.opt b { color: var(--foreground); }

/* Loading */
.loading { text-align: center; padding: 40px 0; }
.spinner { position: relative; margin: 0 auto; width: 128px; height: 128px; }
.spinner .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(201,169,97,0.20); }
.spinner .arc { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--gold-bright); animation: spin 1s linear infinite; }
.spinner svg { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; color: var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg { margin-top: 32px; font-family: "Cinzel", serif; letter-spacing: 0.05em; font-size: 18px; color: var(--gold-bright); }

/* ---------- YouTube Result ---------- */
.yt { min-height: 100vh; background: #0f0f0f; color: #fff; font-family: Roboto, Arial, sans-serif; }
.yt-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; border-bottom: 1px solid rgba(255,255,255,0.05); background: #0f0f0f; }
@media (max-width: 640px) { .yt-header { padding: 0 12px; } }
.yt-header .left, .yt-header .right { display: flex; align-items: center; gap: 4px; }
.yt-header .right { gap: 8px; }
.icon-btn { background: transparent; border: 0; padding: 8px; border-radius: 50%; cursor: pointer; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: rgba(255,255,255,0.10); }
.yt-logo { display: flex; align-items: center; gap: 4px; padding-left: 4px; text-decoration: none; color: #fff; }
.yt-logo .name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.yt-logo .br { font-size: 10px; color: rgba(255,255,255,0.5); margin-left: -4px; }
.yt-search { flex: 1; max-width: 36rem; margin: 0 32px; display: flex; }
@media (max-width: 640px) { .yt-search { display: none; } }
.yt-search input { flex: 1; background: #121212; border: 1px solid rgba(255,255,255,0.15); border-radius: 9999px 0 0 9999px; padding: 8px 16px; font-size: 14px; color: #fff; outline: none; }
.yt-search input:focus { border-color: #3b82f6; }
.yt-search button { padding: 0 20px; background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.15); border-left: 0; border-radius: 0 9999px 9999px 0; cursor: pointer; }
.yt-search button:hover { background: rgba(255,255,255,0.15); }
.avatar-me { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #f59e0b, #db2777); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; margin-left: 4px; }
.notif { position: relative; }
.notif .badge { position: absolute; top: 4px; right: 4px; background: #dc2626; font-size: 10px; font-weight: 700; border-radius: 9999px; padding: 0 4px; }

.yt-body { max-width: 1280px; margin: 0 auto; padding: 16px 24px; display: grid; grid-template-columns: 1fr 402px; gap: 24px; }
@media (max-width: 1024px) { .yt-body { grid-template-columns: 1fr; padding: 16px 12px; } }

.player { width: 100%; border-radius: 12px; overflow: visible; background: #000; aspect-ratio: 16/9; margin-bottom: 0; transition: margin-bottom 0.25s ease; }
.player vturb-smartplayer { display: block; margin: 0 auto; width: 100%; height: 100%; }

.video-title { margin: 12px 0 0; font-size: 20px; font-weight: 700; line-height: 1.3; }
@media (max-width: 640px) { .video-title { font-size: 18px; } }

.channel-row { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.channel-info { display: flex; align-items: center; gap: 12px; }
.channel-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #b45309, #78350f); display: flex; align-items: center; justify-content: center; color: #fcd34d; }
.channel-avatar svg { width: 24px; height: 24px; }
.channel-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.subs { font-size: 12px; color: rgba(255,255,255,0.6); }
.btn-sub { margin-left: 8px; padding: 8px 16px; border-radius: 9999px; font-size: 14px; font-weight: 600; border: 0; cursor: pointer; background: #fff; color: #000; transition: background 0.2s; }
.btn-sub:hover { background: rgba(255,255,255,0.9); }
.btn-sub.active { background: rgba(255,255,255,0.10); color: #fff; }
.btn-sub.active:hover { background: rgba(255,255,255,0.15); }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.like-group { display: flex; align-items: center; background: rgba(255,255,255,0.10); border-radius: 9999px; overflow: hidden; }
.like-group button { background: transparent; border: 0; color: #fff; padding: 8px 16px; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.like-group button:first-child { border-right: 1px solid rgba(255,255,255,0.10); }
.like-group button:hover { background: rgba(255,255,255,0.10); }
.action-pill { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255,255,255,0.10); border: 0; border-radius: 9999px; color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.action-pill:hover { background: rgba(255,255,255,0.15); }

.description { margin-top: 16px; background: rgba(255,255,255,0.05); border-radius: 12px; padding: 12px; font-size: 14px; }
.description .meta { font-weight: 600; display: flex; flex-wrap: wrap; gap: 12px; }
.description .tag { color: #60a5fa; }
.description p { margin: 8px 0 0; color: rgba(255,255,255,0.85); line-height: 1.6; }

.comments { margin-top: 24px; }
.comments-head { display: flex; align-items: center; gap: 24px; margin-bottom: 16px; }
.comments-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.sort-btn { background: transparent; border: 0; color: #fff; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; }
.comment-input-row { display: flex; gap: 12px; margin-bottom: 24px; }
.comment-input-row input { flex: 1; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,0.20); padding: 0 0 8px; color: #fff; font-size: 14px; outline: none; }
.comment-input-row input:focus { border-bottom-color: #fff; }

.comment-list { display: flex; flex-direction: column; gap: 20px; }
.comment { display: flex; gap: 12px; }
.comment .av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; }
.comment .body { flex: 1; min-width: 0; }
.comment .head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.comment .head .name { font-weight: 600; }
.comment .head .time { color: rgba(255,255,255,0.6); }
.comment .text { font-size: 14px; margin: 4px 0 0; line-height: 1.6; }
.comment .toolbar { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.comment .toolbar button { background: transparent; border: 0; color: rgba(255,255,255,0.8); cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 12px; }
.comment .toolbar button:hover { color: #fff; }
.show-more { margin-top: 16px; background: transparent; border: 0; color: #60a5fa; font-size: 14px; font-weight: 600; cursor: pointer; }
.show-more:hover { color: #93c5fd; }

.related { display: flex; flex-direction: column; gap: 8px; }
.related a { display: flex; gap: 8px; padding: 4px; border-radius: 8px; text-decoration: none; color: inherit; transition: background 0.2s; }
.related a:hover { background: rgba(255,255,255,0.05); }
.related .thumb { position: relative; width: 160px; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: #000; }
.related .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related .duration { position: absolute; bottom: 4px; right: 4px; font-size: 10px; background: rgba(0,0,0,0.8); padding: 1px 4px; border-radius: 3px; color: #fff; }
.related .info { flex: 1; min-width: 0; }
.related h3 { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related .ch, .related .stats { font-size: 12px; color: rgba(255,255,255,0.6); margin: 4px 0 0; }
