/* ==========================================================================
   CLASSICAL SCROLL — THE AGORA (agora.css)
   Distraction-Free Media Aggregator & Intellectual Sanctuary
   ========================================================================== */

:root {
  --bg-primary: #121214;
  --bg-surface: #19181f;
  --bg-card: #202028;
  --bg-card-hover: #262632;
  --gold-accent: #d4af37;
  --gold-light: #f3ca65;
  --gold-muted: #8e733b;
  --gold-glow: rgba(212, 175, 55, 0.25);
  --text-main: #f0f0f4;
  --text-muted: #9fa0b0;
  --text-dim: #6c6d7c;
  --border-subtle: #2d2d3a;
  --border-highlight: #454358;
  --font-serif: "Cinzel", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-reading: "Lora", Georgia, serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #333342;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-muted);
}

/* Navbar */
.agora-navbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(18, 18, 20, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 24px;
}

.agora-nav-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.agora-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  cursor: pointer;
}

.agora-logo-mark {
  font-size: 1.6rem;
  line-height: 1;
}

.agora-brand-text {
  display: flex;
  flex-direction: column;
}

.agora-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--gold-accent);
}

.agora-subtitle {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.agora-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav-agora {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-nav-agora:hover {
  border-color: var(--gold-accent);
  color: var(--gold-light);
  background: #272733;
}

.btn-nav-agora.primary {
  background: linear-gradient(135deg, #d4af37, #ab8620);
  border-color: #f3ca65;
  color: #121214;
  font-weight: 600;
}

.btn-nav-agora.primary:hover {
  background: linear-gradient(135deg, #e5c358, #bd9629);
  color: #0b0b0d;
}

.badge-count {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  border: 1px solid var(--gold-muted);
  font-size: 0.72rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Hero Section */
.agora-hero {
  max-width: 1360px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  position: relative;
}

.agora-hero-inner {
  background: linear-gradient(145deg, #181820 0%, #1c1a24 60%, #15131b 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.agora-hero-inner::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 450px;
  height: 100%;
  background: radial-gradient(circle at right top, rgba(212, 175, 55, 0.12), transparent 70%);
  pointer-events: none;
}

.agora-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--gold-accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.agora-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.agora-hero-title span {
  color: var(--gold-accent);
  background: linear-gradient(135deg, #f3ca65, #c5a059);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.agora-hero-desc {
  max-width: 820px;
  font-size: 1.05rem;
  color: #b5b5c4;
  line-height: 1.7;
  margin-bottom: 28px;
  font-family: var(--font-reading);
}

/* Anti-Slop Manifesto Strip */
.anti-slop-manifesto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  padding-top: 24px;
}

.manifesto-pillar {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.manifesto-pillar-icon {
  font-size: 1.3rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.manifesto-pillar-content h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.manifesto-pillar-content p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Aggregator Controls Bar */
.agora-controls-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 24px;
}

.agora-controls-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.controls-row-top {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.95rem;
  pointer-events: none;
}

.agora-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 38px 10px 40px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition-fast);
}

.agora-search-input:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.agora-search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1rem;
  cursor: pointer;
  display: none;
}

.agora-search-clear.visible {
  display: block;
}

.select-filters-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.agora-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-family: var(--font-body);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.agora-select:focus,
.agora-select:hover {
  border-color: var(--gold-accent);
}

/* Medium Type Filter Tabs */
.media-type-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.media-type-tabs::-webkit-scrollbar {
  display: none;
}

.type-tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.type-tab-btn:hover {
  color: var(--text-main);
  border-color: #454358;
}

.type-tab-btn.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-accent);
  color: var(--gold-light);
  font-weight: 600;
}

/* Results Count & Active Filter Indicator */
.results-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0 4px;
}

.results-count span {
  color: var(--gold-light);
  font-weight: 600;
}

/* Media Cards Grid */
.agora-grid-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

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

/* Single Media Card */
.media-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
}

.media-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* Thumbnail Area */
.media-thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0d0d10;
  overflow: hidden;
  cursor: pointer;
}

.media-thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.media-card:hover .media-thumbnail-img {
  transform: scale(1.04);
}

.media-thumbnail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(18,18,20,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

.thumbnail-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.media-type-badge {
  background: rgba(18, 18, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.signal-score-badge {
  background: rgba(212, 175, 55, 0.9);
  color: #121214;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Play Overlay Icon */
.play-btn-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 54px;
  height: 54px;
  background: rgba(212, 175, 55, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #121214;
  font-size: 1.4rem;
  opacity: 0.85;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.media-card:hover .play-btn-circle {
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 1;
  background: #f3ca65;
}

.duration-tag {
  align-self: flex-end;
  background: rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Card Body */
.media-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.card-channel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.creator-name {
  color: var(--gold-light);
  font-weight: 600;
}

.media-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.media-card-title:hover {
  color: var(--gold-accent);
}

/* Anti-Slop Curator Insight Box */
.curator-insight-box {
  background: rgba(26, 26, 34, 0.85);
  border-left: 3px solid var(--gold-accent);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: #c9c9d6;
  line-height: 1.5;
  font-style: italic;
  font-family: var(--font-reading);
}

.curator-insight-box .badge-anti-slop {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-accent);
  margin-bottom: 4px;
}

/* Companion Work Link */
.companion-work-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.companion-work-pill:hover {
  border-color: var(--gold-accent);
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
}

.companion-work-pill .book-icon {
  color: var(--gold-accent);
}

/* Card Action Footer */
.media-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-theater-launch {
  background: linear-gradient(135deg, #d4af37, #9e7d2b);
  border: none;
  color: #121214;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: filter var(--transition-fast);
}

.btn-theater-launch:hover {
  filter: brightness(1.15);
}

.card-action-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-card-icon {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.btn-card-icon:hover {
  border-color: var(--gold-accent);
  color: var(--gold-light);
  background: #2a2a36;
}

.btn-card-icon.active {
  border-color: var(--gold-accent);
  color: var(--gold-accent);
  background: rgba(212, 175, 55, 0.15);
}

/* ==========================================================================
   DISTRACTION-FREE THEATER MODAL
   ========================================================================== */

.agora-theater-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.agora-theater-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.theater-dialog {
  background: #15151c;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1280px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
}

/* Theater Header */
.theater-header {
  padding: 14px 20px;
  background: #111116;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.theater-header-title-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.theater-sanctuary-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-muted);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.theater-modal-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.theater-header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-theater-close {
  background: #252530;
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-theater-close:hover {
  background: #a82e2e;
  border-color: #e74c3c;
}

/* Theater Main Workspace: Player + Companion Panel */
.theater-workspace {
  display: grid;
  grid-template-columns: 1fr 380px;
  flex: 1;
  overflow: hidden;
  background: #0d0d10;
}

@media (max-width: 992px) {
  .theater-workspace {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* Player Column */
.theater-player-column {
  display: flex;
  flex-direction: column;
  background: #08080a;
}

.theater-video-frame-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.theater-video-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.theater-under-video {
  padding: 16px 20px;
  background: #111116;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.video-creator-tag {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.video-creator-tag strong {
  color: var(--gold-light);
}

/* Companion Panel Column */
.theater-companion-panel {
  background: #16161f;
  border-left: 1px solid var(--border-subtle);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.panel-tabs-header {
  display: flex;
  background: #121217;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 12px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.panel-tab-btn.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold-accent);
  background: rgba(212, 175, 55, 0.05);
}

.panel-tab-content {
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 18px;
}

.panel-tab-content.active {
  display: flex;
}

/* Timestamps Track List */
.timestamp-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timestamp-item {
  background: #1d1d27;
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.timestamp-item:hover {
  border-color: var(--gold-accent);
  background: #252533;
}

.time-pill {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: monospace;
}

.time-label {
  font-size: 0.82rem;
  color: var(--text-main);
  line-height: 1.3;
}

/* Socratic Prompts Box */
.socratic-prompts-wrapper {
  background: #1a1a24;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
}

.socratic-prompts-wrapper h5 {
  font-family: var(--font-serif);
  color: var(--gold-light);
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.socratic-prompt-item {
  font-size: 0.82rem;
  color: #d1d1dc;
  line-height: 1.5;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 2px solid var(--gold-muted);
  font-family: var(--font-reading);
}

/* Companion Passage Box */
.companion-passage-card {
  background: #191822;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.companion-ref-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.companion-passage-text {
  font-family: var(--font-reading);
  font-size: 0.85rem;
  color: #dedee8;
  line-height: 1.6;
  font-style: italic;
  margin-bottom: 12px;
}

.btn-read-companion-full {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

/* ==========================================================================
   COMMUNITY SUBMISSION MODAL & MY LYCEUM DRAWER
   ========================================================================== */

.agora-generic-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.agora-generic-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.generic-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  padding: 28px;
  position: relative;
}

.modal-close-x {
  position: absolute;
  top: 18px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close-x:hover {
  color: #fff;
}

.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-label span.req {
  color: var(--gold-accent);
}

.form-input, .form-textarea, .form-select {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: var(--font-body);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--gold-accent);
  box-shadow: 0 0 0 2px var(--gold-glow);
}

.form-textarea {
  min-height: 90px;
  resize: vertical;
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Toast Notification */
.agora-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  background: #1f1f2a;
  border: 1px solid var(--gold-accent);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.agora-toast.active {
  transform: translateY(0);
  opacity: 1;
}

/* Empty State */
.agora-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 20px;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE OPTIMIZATIONS (Matching Classical Scroll Library)
   ========================================================================== */

/* Tablets & Small Laptops (<= 992px) */
@media (max-width: 992px) {
  .agora-hero {
    padding: 32px 18px 24px;
  }

  .agora-hero-inner {
    padding: 32px 24px;
  }

  .agora-controls-container,
  .agora-grid-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .agora-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
  }
}

/* Desktop elements hidden on mobile */
.mobile-header-right {
  display: none;
}

.agora-mobile-tabbar {
  display: none;
}

/* Mobile & Handheld Devices (<= 768px) */
@media (max-width: 768px) {
  body {
    padding-bottom: 74px; /* Space for native bottom app bar */
  }

  /* Single Clean App Header on Mobile */
  .agora-navbar {
    padding: 10px 14px;
    background: rgba(16, 16, 20, 0.96);
  }

  .agora-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }

  .btn-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-light);
    border-color: rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.08);
  }

  .agora-brand {
    gap: 8px;
    flex: 1;
    justify-content: center;
  }

  .agora-title {
    font-size: 1.05rem;
    letter-spacing: 0.08em;
  }

  .agora-subtitle {
    display: none; /* Hide subtitle to keep clean single-line app bar */
  }

  .desktop-only-actions {
    display: none !important; /* Hide desktop action buttons on mobile */
  }

  .desktop-only-breadcrumb {
    display: none !important; /* Eliminate duplicate second menu bar on mobile */
  }

  .mobile-header-right {
    display: flex;
    align-items: center;
  }

  .icon-only-mobile {
    padding: 7px 10px;
    font-size: 0.8rem;
    position: relative;
  }

  /* ========================================================================
     NATIVE MOBILE APP BOTTOM TAB BAR
     ======================================================================== */
  .agora-mobile-tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    background: rgba(18, 18, 22, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.55);
  }

  .mobile-tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 5px 2px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-tab-btn svg {
    color: inherit;
    transition: transform 0.15s ease;
  }

  .mobile-tab-btn.active,
  .mobile-tab-btn:active {
    color: var(--gold-accent);
  }

  .mobile-tab-btn.active svg {
    transform: scale(1.1);
  }

  .mobile-tab-exit {
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Hero Section */
  .agora-hero {
    padding: 16px 12px 14px;
  }

  .agora-hero-inner {
    padding: 20px 14px;
    border-radius: 12px;
  }

  .agora-badge {
    font-size: 0.62rem;
    padding: 3px 8px;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
  }

  .agora-hero-title {
    font-size: 1.55rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }

  .agora-hero-desc {
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 20px;
  }

  /* Anti-Slop Manifesto on Mobile */
  .anti-slop-manifesto {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 18px;
  }

  .manifesto-pillar {
    gap: 10px;
  }

  .manifesto-pillar-icon {
    font-size: 1.15rem;
  }

  .manifesto-pillar-content h4 {
    font-size: 0.82rem;
  }

  .manifesto-pillar-content p {
    font-size: 0.74rem;
  }

  /* Donation Strip on Mobile */
  .agora-donation-banner {
    padding: 16px 14px !important;
    margin-top: 20px !important;
    gap: 14px !important;
  }

  .agora-donation-banner h3 {
    font-size: 1rem !important;
  }

  .agora-donation-banner p {
    font-size: 0.8rem !important;
  }

  .agora-donation-controls {
    width: 100%;
    justify-content: space-between;
  }

  .btn-tier-agora {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
  }

  #btn-agora-donate-cta {
    width: 100%;
    justify-content: center;
  }

  /* Controls Section */
  .agora-controls-container {
    padding: 0 12px 16px;
  }

  .agora-controls-card {
    padding: 14px 12px;
    gap: 12px;
    border-radius: 10px;
  }

  .controls-row-top {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .search-box-wrapper {
    min-width: 100%;
    max-width: 100%;
  }

  .agora-search-input {
    font-size: 0.84rem;
    padding: 9px 34px 9px 36px;
  }

  .select-filters-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .agora-select {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.78rem;
  }

  /* Swipeable Medium Type Tabs */
  .media-type-tabs {
    gap: 6px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .type-tab-btn {
    padding: 6px 12px;
    font-size: 0.74rem;
    border-radius: 16px;
  }

  .results-meta-bar {
    font-size: 0.75rem;
  }

  /* ========================================================================
     THE AGORA GRID ON MOBILE — ORGANIZED 2-COLUMN LIKE CLASSICAL SCROLL LIBRARY
     ======================================================================== */
  .agora-grid-container {
    padding: 0 12px 48px;
  }

  .agora-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Compact 2-Column Mobile Media Card */
  .media-card {
    border-radius: 10px;
    background: var(--bg-surface);
  }

  .media-card:active {
    transform: scale(0.98);
    border-color: var(--gold-accent);
  }

  .media-thumbnail-wrapper {
    aspect-ratio: 16 / 10;
  }

  .media-thumbnail-overlay {
    padding: 6px 8px;
  }

  .media-type-badge {
    font-size: 0.62rem;
    padding: 2px 6px;
    letter-spacing: 0;
  }

  .signal-score-badge {
    font-size: 0.64rem;
    padding: 2px 5px;
    font-weight: 700;
  }

  .play-btn-circle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .duration-tag {
    font-size: 0.62rem;
    padding: 1px 4px;
  }

  .media-card-body {
    padding: 10px 10px 12px;
    gap: 6px;
  }

  .card-channel-meta {
    font-size: 0.68rem;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .creator-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65%;
  }

  .media-card-title {
    font-size: 0.85rem;
    line-height: 1.25;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 34px;
  }

  /* Hide long curator paragraph on compact 2-column mobile cards to maintain alignment (identical to .book-desc) */
  .curator-insight-box {
    display: none;
  }

  /* Compact Companion Work Pill */
  .companion-work-pill {
    padding: 4px 6px;
    font-size: 0.68rem;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .companion-work-pill span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Mobile Action Footer */
  .media-card-footer {
    padding-top: 8px;
    margin-top: auto;
    gap: 4px;
  }

  .btn-theater-launch {
    padding: 6px 8px;
    font-size: 0.72rem;
    gap: 3px;
    flex: 1;
    justify-content: center;
    border-radius: 4px;
    white-space: nowrap;
  }

  .btn-theater-launch span {
    font-size: 0.72rem;
  }

  .card-action-icons {
    gap: 4px;
  }

  .btn-card-icon {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    border-radius: 4px;
  }

  /* Theater Modal on Mobile (Full Screen Handheld Experience) */
  .agora-theater-modal {
    padding: 0;
    align-items: flex-end;
  }

  .theater-dialog {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }

  .theater-header {
    padding: 10px 14px;
  }

  .theater-modal-title {
    font-size: 0.88rem;
    max-width: 200px;
  }

  .theater-workspace {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }

  .theater-player-column {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  .theater-under-video {
    padding: 10px 14px;
    font-size: 0.75rem;
  }

  .theater-companion-panel {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    flex: 1;
    overflow-y: visible;
  }

  .panel-tabs-header {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .panel-tab-btn {
    padding: 10px 6px;
    font-size: 0.72rem;
  }

  .panel-tab-content {
    padding: 14px;
    gap: 12px;
  }

  .timestamp-item {
    padding: 8px 10px;
    gap: 8px;
  }

  .time-pill {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  .time-label {
    font-size: 0.78rem;
  }
}

/* Extra Small Phones (<= 360px) */
@media (max-width: 360px) {
  .agora-grid {
    grid-template-columns: 1fr; /* Switch to clean 1-column on ultra-narrow screens */
    gap: 14px;
  }

  .media-card-title {
    min-height: auto;
  }

  .curator-insight-box {
    display: block; /* Show curator note when 1-column */
    font-size: 0.76rem;
    padding: 6px 10px;
  }

  .select-filters-group {
    grid-template-columns: 1fr;
  }
}

