@import url('https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@700;800;900&family=Inter:wght@400;500;600&display=swap');

:root {
  --void: #170F13;
  --curtain: #241318;
  --curtain-line: #3a232b;
  --brass: #C9A227;
  --brass-bright: #E8C158;
  --paper: #EDE6DD;
  --muted: #a3908a;
  --danger: #d9605f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--paper);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
}

:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 3px;
}

a { color: inherit; }

.marquee {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- Top bar ---------- */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
}

.topbar.solid {
  position: static;
  background: var(--void);
  border-bottom: 1px solid var(--curtain-line);
}

.topbar .brand {
  font-size: 20px;
  text-decoration: none;
}

.topbar nav a {
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.topbar nav a:hover { opacity: 1; border-bottom-color: var(--brass); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 78vh;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--curtain);
}

.hero video, .hero img.hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23,15,19,0) 0%, rgba(23,15,19,0.3) 95%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 40px 56px;
  max-width: 720px;
  animation: rise 0.8s ease-out;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content .marquee {
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.95;
  margin: 0 0 12px;
}

.hero-content p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 50ch;
}

.hero-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50vh;
  text-align: center;
  padding: 40px;
}

.hero-empty .marquee { font-size: clamp(32px, 6vw, 56px); }
.hero-empty p { color: var(--muted); margin-top: 10px; }

/* ---------- Sections ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 56px 40px 80px; }

.section-heading {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 24px;
  color: var(--paper);
}

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

.video-card { text-decoration: none; display: block; color: var(--paper); }

.video-card .thumb-wrap {
  aspect-ratio: 16/9;
  background: var(--curtain);
  border: 1px solid var(--curtain-line);
  overflow: hidden;
  position: relative;
}

.video-card img.thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-card .no-thumb {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.video-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin: 12px 0 4px;
  border-bottom: 1px solid transparent;
  display: inline-block;
}

.video-card:hover h3 { border-bottom-color: var(--brass); }

.video-card .meta { font-size: 13px; color: var(--muted); margin: 0; }

.empty-state {
  border: 1px dashed var(--curtain-line);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

/* ---------- Watch page ---------- */
.watch-wrap { max-width: 900px; margin: 0 auto; padding: 40px; }

video.player {
  width: 100%;
  max-height: 72vh;
  background: #000;
  display: block;
}

.watch-title { font-size: 28px; font-weight: 600; margin: 24px 0 6px; }
.watch-meta { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.watch-desc { color: #d9cfc8; max-width: 68ch; }

.back-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--brass-bright); }

/* ---------- Forms / auth pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-box {
  width: 100%;
  max-width: 380px;
  background: var(--curtain);
  border: 1px solid var(--curtain-line);
  padding: 36px;
}

.auth-box .marquee { font-size: 22px; margin: 0 0 4px; }
.auth-box .subtitle { color: var(--muted); font-size: 14px; margin: 0 0 24px; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  margin-bottom: 18px;
  border-radius: 3px;
  border: 1px solid var(--curtain-line);
  background: var(--void);
  color: var(--paper);
  font-family: inherit;
  font-size: 14px;
}

input:focus, textarea:focus, select:focus { border-color: var(--brass); }

button, .btn {
  background: var(--brass);
  color: var(--void);
  border: none;
  padding: 11px 22px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

button:hover, .btn:hover { background: var(--brass-bright); }

.btn-quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--curtain-line);
}
.btn-quiet:hover { background: transparent; color: var(--paper); border-color: var(--muted); }

.btn-danger { background: var(--danger); color: #2a1010; }
.btn-danger:hover { background: #e57d7c; }

.error-banner {
  background: rgba(217, 96, 95, 0.12);
  border: 1px solid var(--danger);
  color: #f3b6b5;
  padding: 12px 16px;
  border-radius: 3px;
  margin-bottom: 20px;
  font-size: 13.5px;
}

/* ---------- Admin dashboard ---------- */
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 40px; border-bottom: 1px solid var(--curtain-line);
}

.panel {
  background: var(--curtain);
  border: 1px solid var(--curtain-line);
  padding: 24px;
  margin-bottom: 32px;
}

.panel h3 { margin-top: 0; font-size: 16px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--curtain-line); font-size: 14px; vertical-align: middle; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; }

.tag {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--curtain-line);
  color: var(--muted);
}
.tag.public { color: var(--brass-bright); border-color: var(--brass); }

.checkbox-list {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
}
.checkbox-list label {
  display: flex; align-items: center; gap: 6px;
  margin: 0; color: var(--paper);
}
.checkbox-list input { width: auto; margin: 0; }

.inline-form { display: inline; }

.row-actions { display: flex; gap: 8px; }
.row-actions button { padding: 6px 12px; font-size: 12.5px; }

@media (max-width: 640px) {
  .topbar, .admin-header { padding: 18px 20px; }
  main { padding: 40px 20px 60px; }
  .hero-content { padding: 0 20px 40px; }
  .field-row { grid-template-columns: 1fr; }
}
