@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;500;700&family=Fraunces:wght@300;600&display=swap');

:root {
  --bg: #0a0e1a;
  --bg-2: #11172a;
  --bg-3: #161d33;
  --ink: #e8ecf5;
  --dim: #6b7694;
  --accent: #ff4d6d;
  --cyan: #4dd4ff;
  --gold: #ffd66b;
  --green: #4dff91;
  --purple: #b47dff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
}

/* ── HUD frame ─────────────────────────────────── */
.frame {
  position: fixed; inset: 0;
  pointer-events: none;
  padding: 24px 28px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  z-index: 10;
}
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }

.title {
  font-family: 'Fraunces', serif;
  font-weight: 300; font-size: 28px;
  line-height: 1; letter-spacing: -0.02em;
}
.title em { font-style: italic; color: var(--accent); }
.subtitle {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.25em; color: var(--dim); margin-top: 8px;
}
.meta {
  text-align: right; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--dim); line-height: 1.8;
}
.meta b { color: var(--cyan); font-weight: 500; }

.legend {
  font-size: 11px; line-height: 1.9; color: var(--dim); max-width: 380px;
}
.legend .op { color: var(--ink); font-size: 13px; margin-bottom: 6px; }
.legend .op span { color: var(--gold); }
.tick {
  display: inline-block; width: 10px; height: 10px;
  border-radius: 2px; vertical-align: middle; margin-right: 6px;
}

/* ── Buttons ───────────────────────────────────── */
.controls { pointer-events: auto; display: flex; gap: 8px; }
.btn {
  font-family: inherit; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.18em;
  background: transparent; color: var(--ink);
  border: 1px solid #2a3148; padding: 10px 16px;
  cursor: pointer; transition: all .2s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary {
  background: var(--accent); border-color: var(--accent);
  color: #0a0e1a; font-weight: 700;
}
.btn.primary:hover { background: #ff6b85; color: #0a0e1a; }
.btn.active { border-color: var(--gold); color: var(--gold); }

/* ── Corner brackets ───────────────────────────── */
.corner {
  position: fixed; width: 14px; height: 14px;
  border: 1px solid var(--dim); pointer-events: none; z-index: 20;
}
.corner.tl { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.corner.tr { top: 16px; right: 16px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 16px; left: 16px; border-right: none; border-top: none; }
.corner.br { bottom: 16px; right: 16px; border-left: none; border-top: none; }

/* ── Presenter: narration overlay (centered on screen) ─ */
.presenter-bar {
  position: fixed; bottom: 80px; left: 0; right: 0; z-index: 30;
  display: flex; flex-direction: column;
  align-items: center;
  pointer-events: none;
  opacity: 0; transition: opacity .3s ease;
}
.presenter-bar.visible { opacity: 1; }
.presenter-narration {
  max-width: 600px; padding: 12px 20px;
  background: none;
  border: none;
  font-size: 16px; line-height: 1.7;
  color: rgba(200,210,230,.8); font-weight: 400;
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
  text-align: center;
  pointer-events: auto;
  margin-bottom: 8px;
}
.presenter-step {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--dim);
  white-space: nowrap;
}

/* ── Presenter: crop guide (9:16 for Shorts) ───── */
.crop-guide {
  position: fixed; inset: 0; z-index: 25;
  pointer-events: none; display: none;
}
.crop-guide.visible { display: block; }
.crop-guide-left,
.crop-guide-right {
  position: fixed; top: 0; bottom: 0;
  background: rgba(0,0,0,.75);
  border: none;
}
.crop-guide-border {
  position: fixed; top: 0; bottom: 0;
  border-left: 1px dashed var(--accent);
  border-right: 1px dashed var(--accent);
  pointer-events: none;
}

/* ── Home page ─────────────────────────────────── */
.home-header {
  padding: 60px 40px 40px;
  max-width: 1100px; margin: 0 auto;
}
.home-header h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300; font-size: 42px;
  letter-spacing: -0.03em;
}
.home-header h1 em { font-style: italic; color: var(--accent); }
.home-header p {
  font-size: 13px; color: var(--dim);
  margin-top: 12px; line-height: 1.7; max-width: 600px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px; padding: 20px 40px 60px;
  max-width: 1100px; margin: 0 auto;
}
.topic-card {
  background: var(--bg-2);
  border: 1px solid #1e2640;
  padding: 0; overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
  text-decoration: none; color: inherit;
  display: block;
}
.topic-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.topic-card-preview {
  height: 180px; background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.topic-card-preview canvas { width: 100%; height: 100%; }
.topic-card-preview iframe {
  position: absolute; top: 0; left: 0;
  width: 200%; height: 200%;
  border: none; pointer-events: none;
  transform: scale(0.5); transform-origin: 0 0;
}
.topic-card-body { padding: 20px 22px; }
.topic-card-body h3 {
  font-family: 'Fraunces', serif;
  font-weight: 300; font-size: 18px;
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.topic-card-body h3 em { font-style: italic; color: var(--accent); }
.topic-card-body p {
  font-size: 11px; color: var(--dim);
  line-height: 1.7;
}
.topic-card-tag {
  display: inline-block; font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--cyan); margin-top: 12px;
  border: 1px solid #1e2640; padding: 4px 10px;
}
