/* ============================================================
   Untitled Sci-Fi Show – Stylesheet
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Synthwave palette lifted from the show's cover art:
     indigo-to-magenta night sky, neon cyan title glow, warm pink/orange window lights. */
  --bg:           #130c28;
  --bg-card:      #1d1440;
  --bg-card-alt:  #271c52;
  --border:       #3d2f6e;
  --text:         #f1eefb;
  --text-muted:   #a99cc9;
  --accent:       #3fd3ef;   /* neon cyan – primary, matches the title glow */
  --accent-2:     #ee5b9d;   /* hot magenta – currently watching / horizon glow */
  --accent-warm:  #ff9d6c;   /* warm orange – window-light highlight */
  --green:        #22c55e;
  --red:          #ef4444;
  --radius:       10px;
  --shadow:       0 4px 24px rgba(0,0,0,.55);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* ── Site header ──────────────────────────────────────────── */
.site-header {
  background: linear-gradient(90deg, #0d0821 0%, #1a1038 100%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(238,91,157,.15);
  padding: .75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }

.logo-text {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .04em;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(63,211,239,.45);
}

.site-nav { display: flex; gap: 1.25rem; align-items: center; }
.site-nav a { color: var(--text-muted); font-size: .9rem; font-weight: 500; }
.site-nav a:hover { color: var(--text); text-decoration: none; }
.nav-logout { color: var(--red) !important; }

/* ── Flash ────────────────────────────────────────────────── */
.flash { padding: .75rem 0; font-size: .9rem; font-weight: 600; text-align: center; }
.flash--success { background: rgba(34,197,94,.15); color: var(--green); border-bottom: 1px solid rgba(34,197,94,.3); }
.flash--error   { background: rgba(239,68,68,.15);  color: var(--red);   border-bottom: 1px solid rgba(239,68,68,.3); }

/* ── Main ─────────────────────────────────────────────────── */
.site-main { padding: 2rem 0 4rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .6rem 1.25rem;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: opacity .15s, transform .1s;
}
.btn:hover { opacity: .85; text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary  { background: var(--accent); color: #000; }
.btn--outline  { border-color: var(--border); color: var(--text-muted); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--full     { width: 100%; text-align: center; }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .75rem;
}
.badge--watching { background: var(--accent-2); color: #1b0e2e; }

/* ── Currently Watching ───────────────────────────────────── */
.watching {
  background: linear-gradient(135deg, rgba(238,91,157,.14) 0%, rgba(63,211,239,.05) 70%);
  border: 1px solid rgba(238,91,157,.3);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  margin-bottom: 2.5rem;
}

.watching-inner { display: flex; gap: 2.5rem; align-items: flex-start; }

.watching-poster {
  width: 100%;
  max-width: 250px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.watching-poster--placeholder {
  width: 260px;
  height: 260px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card-alt); font-size: 3rem;
  border-radius: var(--radius);
}

.watching-content { flex: 1; }

.watching-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.9rem;
  line-height: 1.2;
  margin-bottom: .25rem;
  color: #fff;
}

.watching-year { color: var(--text-muted); margin-bottom: 1.1rem; }

.watching-description { color: var(--text-muted); margin-bottom: 1.25rem; max-width: 60ch; }
.watching-description p { margin-bottom: .75rem; }
.watching-description p:last-child { margin-bottom: 0; }

.watching-comments { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.25rem; }

.watching-comment {
  padding: .75rem 1rem;
  border-radius: var(--radius);
}
.watching-comment--rob { background: rgba(238,91,157,.12); border: 1px solid rgba(238,91,157,.3); }
.watching-comment--tom { background: rgba(63,211,239,.1); border: 1px solid rgba(63,211,239,.3); }

.watching-comment__label {
  display: block;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .08em;
  margin-bottom: .25rem;
}
.watching-comment--rob .watching-comment__label { color: var(--accent-2); }
.watching-comment--tom .watching-comment__label { color: var(--accent); }

.watching-comment__text { color: var(--text-muted); font-size: .92rem; }

.watching-deadline {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--text-muted);
}
.watching-deadline strong { color: var(--accent-2); }

/* ── Hero (Latest Episode) ────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1d1440 0%, #2e1a4d 55%, #3a1f45 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.hero-inner { display: flex; gap: 2.5rem; align-items: flex-start; }

.hero-artwork {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.hero-content { flex: 1; }

.hero-meta { color: var(--text-muted); font-size: .85rem; margin-bottom: .3rem; }

.hero-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  line-height: 1.15;
  margin-bottom: .75rem;
  color: #fff;
}

.hero-headline { color: var(--text-muted); margin-bottom: 1.5rem; max-width: 60ch; }

.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Episodes grid ────────────────────────────────────────── */
.episodes-section { margin-bottom: 3rem; }

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: .03em;
  margin-bottom: 1.25rem;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.episode-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.episode-card:hover { border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }

.episode-card__art { position: relative; width: 100%; padding-top: 100%; overflow: hidden; background: var(--bg-card-alt); }
.episode-card__art img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }

.episode-card__body { padding: 1rem; flex: 1; }
.episode-card__meta { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; }
.episode-card__title { font-weight: 700; margin: .25rem 0 .5rem; }
.episode-card__headline { font-size: .85rem; color: var(--text-muted); }

/* ── Episode page ─────────────────────────────────────────── */
.ep-page { max-width: 860px; }

.ep-header {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.ep-artwork {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.ep-meta { color: var(--text-muted); font-size: .85rem; margin-bottom: .3rem; }

.ep-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1.15;
  margin-bottom: .5rem;
}

.ep-headline { color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.ep-description { color: var(--text-muted); margin-bottom: 1.25rem; }
.ep-description p { margin-bottom: .75rem; }
.ep-description p:last-child { margin-bottom: 0; }

.back-link { display: inline-block; color: var(--text-muted); font-size: .9rem; }
.back-link:hover { color: var(--accent); }

/* ── Guess the Intro ──────────────────────────────────────── */
.intro-game {
  margin-bottom: 2rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(63,211,239,.08) 0%, transparent 60%);
  border: 1px solid rgba(63,211,239,.25);
  border-radius: var(--radius);
  text-align: center;
}
.intro-game .section-title { margin-bottom: .5rem; }

.intro-game__prompt { color: var(--text-muted); margin-bottom: 1.25rem; }

.intro-audio { display: block; width: 100%; max-width: 420px; margin: 0 auto 1.5rem; }

.intro-answers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
}

.intro-answer {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card-alt);
  color: var(--text);
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.intro-answer:hover { border-color: var(--accent); }
.intro-answer.is-revealed { background: rgba(63,211,239,.12); border-color: var(--accent); }

.intro-answer__num { font-weight: 700; color: var(--text-muted); font-size: .75rem; }
.intro-answer__hidden { color: var(--text-muted); }
.intro-answer__title { display: none; font-weight: 600; color: var(--accent); }
.intro-answer.is-revealed .intro-answer__hidden { display: none; }
.intro-answer.is-revealed .intro-answer__title { display: inline; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }

.form-group label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .55rem .85rem;
  font-size: .95rem;
  font-family: inherit;
  transition: border-color .15s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea { resize: vertical; }
.form-group input[type="file"] { color: var(--text-muted); font-size: .85rem; padding: .4rem 0; }

.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 160px; }

.required { color: var(--red); }
.hint { font-size: .8rem; color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

.current-image { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }
.thumb        { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.thumb--small { width: 56px; height: 56px; }

.intro-answer-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.intro-answer-inputs input {
  background: var(--bg-card-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: .55rem .85rem;
  font-size: .95rem;
  font-family: inherit;
}
.intro-answer-inputs input:focus { outline: none; border-color: var(--accent); }

.episode-form { max-width: 860px; }

.form-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.form-actions { display: flex; gap: .75rem; margin-top: .5rem; flex-wrap: wrap; }

/* ── Alert ────────────────────────────────────────────────── */
.alert { padding: .85rem 1rem; border-radius: var(--radius); margin-bottom: 1.25rem; font-weight: 500; }
.alert--error   { background: rgba(239,68,68,.12); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.alert--success { background: rgba(34,197,94,.12);  color: var(--green); border: 1px solid rgba(34,197,94,.3); }

/* ── Admin pages ──────────────────────────────────────────── */
.admin-page { max-width: 1000px; }

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.admin-header h1 { font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 1.7rem; letter-spacing: .03em; }
.admin-welcome  { font-size: .85rem; color: var(--text-muted); }
.admin-actions  { margin-bottom: 1.5rem; }

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }
.admin-empty { color: var(--text-muted); font-size: .9rem; }

.admin-watching-row { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }

.admin-table-wrap { overflow-x: auto; }

.admin-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.admin-table th {
  text-align: left;
  padding: .6rem .75rem;
  border-bottom: 2px solid var(--border);
  color: var(--text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.admin-table td { padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }

.td-meta    { color: var(--text-muted); white-space: nowrap; }
.td-actions { white-space: nowrap; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.btn-sm {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  background: transparent;
  font-family: inherit;
  transition: opacity .15s;
}
.btn-sm:hover { opacity: .8; text-decoration: none; }
.btn-sm--edit   { border-color: var(--accent-2); color: var(--accent-2); }
.btn-sm--delete { border-color: var(--red); color: var(--red); }

/* ── Admin login ──────────────────────────────────────────── */
.admin-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; }

.admin-login-wrap { width: 100%; max-width: 400px; padding: 1.5rem; }

.admin-login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
}

.admin-login-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 1.75rem;
  line-height: 1.3;
}
.admin-login-title span { color: var(--accent); }

/* ── Contact Page ─────────────────────────────────────────── */
.list-page { max-width: 700px; }

.page-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: .03em;
  margin-bottom: .25rem;
}
.page-subtitle { color: var(--text-muted); margin-bottom: 1.25rem; }

.contact-section { margin-bottom: 2.5rem; }

.contact-section__title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .03em;
  color: var(--accent);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.contact-section__title svg { flex-shrink: 0; opacity: .8; }

.contact-cards { display: flex; flex-direction: column; gap: .6rem; }

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, transform .15s;
}
.contact-card:hover { border-color: var(--accent); transform: translateX(4px); text-decoration: none; }

.contact-card__who {
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  min-width: 60px;
}
.contact-card__handle { font-size: .95rem; color: var(--text); }

/* ── Listen Bar ───────────────────────────────────────────── */
body { padding-bottom: 72px; } /* stop content hiding behind the bar */

.listen-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(19, 12, 40, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(238,91,157,.3);
}

.listen-bar__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.listen-bar__label {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.05rem;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(63,211,239,.4);
  white-space: nowrap;
  letter-spacing: .04em;
}

.listen-bar__icons {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: nowrap;
}

.listen-bar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: transform .15s, opacity .15s;
  flex-shrink: 0;
}
.listen-bar__link:hover { transform: scale(1.15); opacity: .9; }

.listen-bar__link img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

/* ── Site footer ──────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: .8rem;
}

/* ── Empty state ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 0; color: var(--text-muted); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .logo-text { font-size: 1.1rem; }
  .site-nav  { gap: .75rem; }
  .site-nav a { font-size: .82rem; }

  .watching { padding: 1.25rem; }
  .watching-inner { flex-direction: column; }
  .watching-poster { max-width: 200px; height: auto; margin: 0 auto; }

  .hero { padding: 1.25rem; }
  .hero-inner { flex-direction: column; }
  .hero-artwork { width: 100%; max-width: 280px; height: 280px; margin: 0 auto; }
  .hero-title { font-size: 1.7rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { text-align: center; }

  .ep-header { flex-direction: column; }
  .ep-artwork { width: 100%; max-width: 280px; height: 280px; }
  .ep-title { font-size: 1.6rem; }

  .episodes-grid { grid-template-columns: 1fr 1fr; }

  .admin-header  { flex-direction: column; }
  .td-actions { flex-direction: column; align-items: flex-start; }
  .form-row { flex-direction: column; }
  .form-row .form-group { min-width: 100%; }
  .intro-answer-inputs { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .episodes-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.4rem; }
  .watching-title { font-size: 1.5rem; }
  .section-title { font-size: 1.25rem; }
  .admin-login-box { padding: 1.5rem; }
}

@media (max-width: 500px) {
  .listen-bar__label { font-size: .9rem; }
  .listen-bar__link { width: 30px; height: 30px; }
  .listen-bar__link img { width: 30px; height: 30px; }
  .listen-bar__inner { gap: .75rem; }
  .listen-bar__icons { gap: .4rem; }
}
