/* ═══════════════════════════════════════════
   Debate Resources Hub — Premium Standalone Styles
   Aesthetics: Deep amethyst/slate, vibrant amber accents,
   glassmorphism, clean responsive grids, smooth transitions.
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* HSL Color Tokens */
  --bg-hsl: 260, 22%, 6%;
  --bg: hsl(var(--bg-hsl));
  
  --surface-hsl: 260, 18%, 11%;
  --surface: hsl(var(--surface-hsl));
  --surface-hover: hsl(260, 18%, 14%);
  
  --accent-hsl: 38, 100%, 64%; /* Warm golden amber */
  --accent: hsl(var(--accent-hsl));
  --accent-dim: hsla(var(--accent-hsl), 0.15);
  
  --text-hsl: 240, 10%, 94%;
  --text: hsl(var(--text-hsl));
  --text-muted: hsl(240, 6%, 70%);
  
  --border-hi: hsla(0, 0%, 100%, 0.08);
  --border-glow: hsla(var(--accent-hsl), 0.3);
  
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-lg: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  background-image: 
    radial-gradient(at 10% 20%, hsla(280, 40%, 12%, 0.4) 0px, transparent 50%),
    radial-gradient(at 90% 80%, hsla(240, 30%, 10%, 0.4) 0px, transparent 50%);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* Header & Navigation */
.hub-topnav {
  background: rgba(17, 14, 22, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-hi);
  padding: 0 clamp(16px, 4vw, 32px);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.hub-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-mark {
  background: var(--accent);
  color: #0b0d11;
  font-family: var(--font-display);
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 1.1rem;
}
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.back-link {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}
.back-link:hover {
  color: var(--accent);
}

/* Layout container */
.hub-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Hero Section */
.hub-hero {
  background: linear-gradient(135deg, hsl(260, 20%, 9%) 0%, hsl(285, 25%, 11%) 100%);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 40px clamp(20px, 5vw, 48px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hub-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, hsla(var(--accent-hsl), 0.1), transparent 50%);
  pointer-events: none;
}
.hub-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.hub-hero p {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  max-width: 72ch;
  line-height: 1.6;
}
.hero-kicker,
.section-kicker,
.directory-kicker {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Parent resource directory */
.hub-directory,
.room-kits,
.library-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.directory-card {
  min-height: 230px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 12%, hsla(var(--accent-hsl), .12), transparent 36%),
    linear-gradient(145deg, hsl(260, 18%, 12%), hsl(250, 16%, 8%));
  color: var(--text);
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: 0 10px 26px rgba(0,0,0,.24);
}
.directory-card:hover,
.directory-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 16px 34px rgba(0,0,0,.38), 0 0 0 1px var(--accent-dim);
  outline: none;
}
.directory-card.is-featured {
  grid-column: span 2;
  background:
    radial-gradient(circle at 82% 16%, hsla(var(--accent-hsl), .22), transparent 40%),
    linear-gradient(135deg, hsl(270, 22%, 14%), hsl(250, 18%, 9%));
}
.directory-token {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: #0b0d11;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
}
.directory-card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.directory-card p {
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.45;
}
.directory-action {
  margin-top: auto;
  color: var(--accent);
  font-weight: 800;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kit-grid a {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition-smooth);
}
.kit-grid a:hover,
.kit-grid a:focus-visible {
  border-color: var(--accent);
  background: var(--accent-dim);
  outline: none;
}
.kit-grid strong {
  font-family: var(--font-display);
  font-size: 1rem;
}
.kit-grid span {
  color: var(--text-muted);
  font-size: .84rem;
  line-height: 1.35;
}

/* Controls Grid */
.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}
.search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  padding: 12px 20px;
  font-size: 0.94rem;
  color: var(--text);
  font-family: var(--font-body);
  outline: none;
  transition: var(--transition-smooth);
}
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.filter-pills {
  display: inline-flex;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border-hi);
  border-radius: 18px;
  padding: 4px;
  gap: 4px;
  overflow: visible;
}
.filter-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.filter-pill:hover {
  color: var(--text);
}
.filter-pill.active {
  background: var(--accent);
  color: #0b0d11;
}

/* Resource Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.resource-card {
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: 14px;
  padding: 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.resource-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-dim);
}
.card-icon {
  font-size: 2.3rem;
  align-self: flex-start;
}
.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}
.card-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hi);
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  color: var(--text-muted);
}
.card-action {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Timelines and Detailed Drawer Overlay */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer-content {
  width: 100%;
  max-width: 600px;
  height: 100%;
  background: hsl(260, 18%, 8%);
  border-left: 1px solid var(--border-hi);
  padding: 32px clamp(16px, 4vw, 32px) 96px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
}
.drawer-overlay.open .drawer-content {
  transform: translateX(0);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-hi);
  padding-bottom: 18px;
}
.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.drawer-icon {
  font-size: 2rem;
}
.drawer-header h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
}
.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 4px;
}
.drawer-close:hover {
  color: var(--accent);
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-section h3 {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.drawer-section p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: hsl(240, 10%, 88%);
}

/* Timelines styling */
.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-hi);
  margin-left: 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.timeline-item {
  position: relative;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -27px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid hsl(260, 18%, 8%);
}
.timeline-year {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 2px;
}
.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Stance item arguments */
.arguments-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.argument-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  padding: 16px;
}
.arg-card-title {
  font-weight: 700;
  font-size: 0.96rem;
  margin-bottom: 6px;
}
.arg-card-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ════════════ DEBATE PREP / PRACTICE TOOL ════════════ */
.prep-section {
  background: linear-gradient(135deg, hsl(260, 18%, 10%) 0%, hsl(240, 15%, 8%) 100%);
  border: 1px solid var(--border-hi);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}
.prep-header {
  border-bottom: 1px solid var(--border-hi);
  padding-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.prep-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.prep-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.prep-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) {
  .directory-grid,
  .kit-grid {
    grid-template-columns: 1fr;
  }
  .directory-card.is-featured {
    grid-column: auto;
  }
  .directory-card {
    min-height: auto;
  }
  .filter-pills {
    width: 100%;
  }
  .filter-pill {
    flex: 1 1 auto;
  }
  .prep-content {
    grid-template-columns: 1fr;
  }
}
.prep-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.prompt-box {
  background: rgba(0, 0, 0, 0.22);
  border: 1px dashed var(--border-hi);
  border-radius: 12px;
  padding: 24px;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}
.prompt-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 8px;
  border-radius: 4px;
}
.prompt-text {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.5;
  margin-top: 10px;
}

.stance-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.stance-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hi);
  border-radius: 10px;
  padding: 14px 18px;
  text-align: center;
}
.stance-box.active {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.stance-box.pro.active {
  background: rgba(46, 204, 113, 0.12);
  border-color: #2ecc71;
}
.stance-box.con.active {
  background: rgba(231, 76, 60, 0.12);
  border-color: #e74c3c;
}
.stance-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stance-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}
.stance-val.pro { color: #2ecc71; }
.stance-val.con { color: #e74c3c; }

.prep-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  border-left: 1px solid var(--border-hi);
  padding-left: 24px;
}
@media (max-width: 768px) {
  .prep-right {
    border-left: none;
    padding-left: 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-hi);
  }
}

.timer-circle {
  width: 140px;
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timer-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}
.timer-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 6;
}
.timer-circle-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}
.timer-time {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
}

.prep-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}
.btn {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}
.btn:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}
.btn-primary {
  background: var(--accent);
  color: #0b0d11;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: hsl(38, 100%, 70%);
  border-color: hsl(38, 100%, 70%);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ════════════ MEDIA LAYOUT EXTENSIONS ════════════ */
.media-player-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border-hi);
  background: #000;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}
.media-player-container iframe,
.media-player-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Rights badges */
.rights-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  width: fit-content;
}
.rights-badge.rights-pd {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.3);
}
.rights-badge.rights-cc {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  border-color: rgba(52, 152, 219, 0.3);
}
.rights-badge.rights-unspecified {
  background: rgba(230, 126, 34, 0.15);
  color: #e67e22;
  border-color: rgba(230, 126, 34, 0.3);
}
.rights-badge.rights-official {
  background: rgba(155, 89, 182, 0.15);
  color: #9b59b6;
  border-color: rgba(155, 89, 182, 0.3);
}

/* Risk alert warnings */
.risk-alert-box {
  background: rgba(231, 76, 60, 0.06);
  border: 1px solid rgba(231, 76, 60, 0.2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.risk-alert-box h4 {
  color: #e74c3c;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.risk-alert-box p {
  font-size: 0.9rem;
  line-height: 1.45;
  color: hsl(240, 10%, 85%);
  margin: 0;
}

/* Popularity metrics */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}
.stat-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

/* Monospaced attribution copier */
.attribution-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 14px;
  font-family: monospace;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #ededf2;
  overflow-x: auto;
  white-space: pre-wrap;
  user-select: all;
  border-left: 3px solid var(--accent);
}
