/* ============================================================
   ZEROTO1 HORMOZI CLIP ENGINE — Dashboard Styles
   Brand: Neon Yellow #FFEB03, Black #000, Work Sans
   Complete UX Overhaul — Beginner-friendly, Accessible
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@300;400;500;600;700;800&display=swap');

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --yellow: #FFEB03;
  --yellow-dim: rgba(255, 235, 3, 0.15);
  --yellow-glow: rgba(255, 235, 3, 0.25);
  --black: #000000;
  --bg: #000000;
  --dark: #171717;
  --card-bg: #171717;
  --card-bg-alpha: rgba(23, 23, 23, 0.8);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text-primary: #FFFFFF;
  --text-secondary: #A8A8A8;
  --text-muted: #666666;
  --green: #22C55E;
  --amber: #F59E0B;
  --red: #EF4444;
  --danger: #EF4444;
  --success: #22C55E;
  --info: #40C4FF;
  --glow: 0 0 100px rgba(0, 50, 150, 0.1);
  --card-radius: 24px;
  --btn-radius: 999px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Tag category colors */
  --tag-topic: #FFEB03;
  --tag-topic-bg: rgba(255, 235, 3, 0.12);
  --tag-hook: #40C4FF;
  --tag-hook-bg: rgba(64, 196, 255, 0.12);
  --tag-emotion: #C084FC;
  --tag-emotion-bg: rgba(192, 132, 252, 0.12);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Work Sans", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle radial gradient for depth */
body::before {
  content: "";
  position: fixed;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(ellipse at 30% 20%, rgba(0, 50, 150, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(255, 235, 3, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- ACCESSIBILITY ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--yellow);
  color: var(--black);
  font-weight: 700;
  border-radius: var(--btn-radius);
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--black);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* ---------- TOP BAR ---------- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.top-bar__logo {
  height: 28px;
  width: auto;
}

.top-bar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-bar__nav-link {
  padding: 8px 16px;
  border-radius: var(--btn-radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.top-bar__nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.top-bar__nav-link--active {
  color: var(--yellow);
  background: var(--yellow-dim);
}

.top-bar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
}

.top-bar__hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

.top-bar__hamburger--open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.top-bar__hamburger--open span:nth-child(2) {
  opacity: 0;
}

.top-bar__hamburger--open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-100%);
  opacity: 0;
  transition: all var(--transition);
}

.mobile-nav--open {
  transform: translateY(0);
  opacity: 1;
}

.mobile-nav__link {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.mobile-nav__link:hover,
.mobile-nav__link--active {
  color: var(--yellow);
  background: var(--yellow-dim);
}

/* ---------- PIPELINE STATUS INDICATOR ---------- */
.pipeline-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.pipeline-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  transition: background var(--transition);
}

.pipeline-status--running .pipeline-status__dot {
  background: var(--yellow);
  box-shadow: 0 0 8px var(--yellow-glow);
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.pipeline-status--running .pipeline-status__text {
  color: var(--yellow);
}

.pipeline-status--error .pipeline-status__dot {
  background: var(--red);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  font-family: "Work Sans", sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  padding: 12px 28px;
  border-radius: var(--btn-radius);
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 0 20px rgba(255, 235, 3, 0.15);
}

.btn--primary:hover {
  background: #fff04d;
  box-shadow: 0 0 30px rgba(255, 235, 3, 0.3);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn--sm {
  padding: 8px 20px;
  font-size: 0.8125rem;
}

.btn--ghost {
  padding: 8px 16px;
  border-radius: var(--btn-radius);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn--download {
  padding: 6px 14px;
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.75rem;
  border: 1px solid var(--border);
}

.btn--download:hover {
  background: var(--yellow-dim);
  color: var(--yellow);
  border-color: rgba(255, 235, 3, 0.3);
}

.btn--play {
  padding: 8px 18px;
  border-radius: var(--btn-radius);
  background: var(--yellow);
  color: var(--black);
  font-size: 0.8125rem;
  font-weight: 700;
  border: none;
  box-shadow: 0 0 12px rgba(255, 235, 3, 0.15);
}

.btn--play:hover {
  background: #fff04d;
  box-shadow: 0 0 20px rgba(255, 235, 3, 0.3);
  transform: translateY(-1px);
}

/* ---------- DASHBOARD LAYOUT ---------- */
.dashboard {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- STATS ROW ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 20px 20px;
  background: var(--card-bg-alpha);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--glow);
  text-align: center;
  transition: all var(--transition);
}

.stat-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 60px rgba(0, 50, 150, 0.15);
  transform: scale(1.02);
}

.stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--yellow-dim);
  color: var(--yellow);
  margin-bottom: 4px;
}

.stat-card__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.stat-card__value {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.3s ease;
}

.stat-card__sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-card__progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.stat-card__progress-bar {
  height: 100%;
  background: var(--yellow);
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- CARDS ---------- */
.card {
  background: var(--card-bg-alpha);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  box-shadow: var(--glow);
  padding: 28px 32px;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: 0 0 80px rgba(0, 50, 150, 0.12);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.card__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- CONTEXTUAL HELP ---------- */
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}

.help-btn:hover {
  color: var(--yellow);
  border-color: var(--yellow);
  background: var(--yellow-dim);
}

.help-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  max-width: 320px;
  padding: 12px 16px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.help-tooltip--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- PIPELINE STEPS ---------- */
.pipeline-steps-card {
  padding: 24px 32px;
}

.pipeline-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pipeline-step__count {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  min-height: 16px;
}

.pipeline-step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pipeline-step-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--yellow-dim);
}

.pipeline-step-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pipeline-step-btn--running {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--yellow-dim);
  animation: pulse-border 1.5s ease-in-out infinite;
}

.pipeline-step-btn--completed {
  border-color: var(--success);
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.pipeline-step-btn--completed .pipeline-step-btn__icon svg {
  display: none;
}

.pipeline-step-btn--completed .pipeline-step-btn__icon::after {
  content: "\2713";
  font-size: 0.75rem;
  font-weight: 800;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,235,3,0); }
  50% { box-shadow: 0 0 16px 3px rgba(255,235,3,0.2); }
}

.pipeline-step-btn__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
}

.pipeline-step-arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  opacity: 0.4;
  padding-top: 4px;
}

/* Animated arrow */
.pipeline-step-arrow svg {
  animation: arrow-flow 2s ease-in-out infinite;
}

@keyframes arrow-flow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* ---------- SEARCH ---------- */
.search-card {
  padding: 24px 32px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 6px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 20px rgba(255, 235, 3, 0.08);
}

.search-bar__icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-bar__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 8px 0;
}

.search-bar__input::placeholder {
  color: var(--text-muted);
}

.search-bar__shortcut {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: "Work Sans", sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.search-results-count {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.search-results {
  margin-top: 16px;
}

.search-results:empty {
  margin-top: 0;
}

/* Recent searches */
.recent-searches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.recent-searches:empty {
  margin-top: 0;
}

.recent-searches__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.recent-search-btn {
  padding: 4px 12px;
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: "Work Sans", sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.recent-search-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: var(--yellow-dim);
}

/* ---------- FILTER BAR ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  background: var(--card-bg-alpha);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
}

.filter-bar__filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-bar__active {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-bar__clear {
  margin-left: auto;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--btn-radius);
  background: var(--yellow-dim);
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-badge:hover {
  background: rgba(255, 235, 3, 0.25);
}

.filter-badge__remove {
  font-size: 0.875rem;
  line-height: 1;
  opacity: 0.7;
}

/* ---------- TAG CLOUD ---------- */
.tag-cloud-card {
  padding: 24px 32px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  min-height: 40px;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: var(--btn-radius);
  font-family: "Work Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: default;
  transition: all var(--transition);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.tag-pill:hover {
  background: var(--yellow-dim);
  border-color: rgba(255, 235, 3, 0.3);
  color: var(--yellow);
  transform: scale(1.02);
}

.tag-pill__count {
  margin-left: 6px;
  font-size: 0.6875rem;
  font-weight: 400;
  opacity: 0.6;
}

/* ---------- TWO-COLUMN LAYOUT ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ---------- FILTER SELECT ---------- */
.select-filter {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 32px 8px 14px;
  border-radius: var(--btn-radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: "Work Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: all var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A8A8A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.select-filter:hover,
.select-filter:focus {
  border-color: var(--yellow);
  color: var(--yellow);
}

.select-filter option {
  background: var(--card-bg);
  color: var(--text-primary);
}

/* ---------- ITEM LIST ---------- */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}

/* ---------- VIDEO ITEM ---------- */
.video-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all var(--transition);
  cursor: pointer;
}

.video-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-hover);
  transform: scale(1.01);
}

.video-item__thumb {
  flex-shrink: 0;
  width: 120px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.video-item__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--yellow-dim);
  color: var(--yellow);
  font-size: 1.125rem;
}

.video-item__body {
  flex: 1;
  min-width: 0;
}

.video-item__title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-wrap: wrap;
}

.video-item__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--btn-radius);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge--downloaded,
.status-badge--tagged,
.status-badge--completed {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-badge--pending {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.status-badge--downloading,
.status-badge--processing {
  background: rgba(255, 235, 3, 0.1);
  color: var(--yellow);
  border: 1px solid rgba(255, 235, 3, 0.2);
  animation: pulse-badge 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.status-badge--transcribed,
.status-badge--segmented,
.status-badge--clipped {
  background: rgba(64, 196, 255, 0.1);
  color: var(--info);
  border: 1px solid rgba(64, 196, 255, 0.2);
}

.status-badge--error,
.status-badge--failed {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ---------- CLIP ITEM ---------- */
.clip-item {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all var(--transition);
  cursor: pointer;
}

.clip-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--yellow);
  box-shadow: 0 0 20px rgba(255, 235, 3, 0.05);
  transform: scale(1.01);
}

.clip-item__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.clip-item__transcript {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.clip-item__transcript::before {
  content: "\201C";
  color: var(--yellow);
  font-weight: 800;
}

.clip-item__transcript::after {
  content: "\201D";
  color: var(--yellow);
  font-weight: 800;
}

.clip-item__source {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.clip-item__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Virality dots */
.virality-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.virality-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.virality-dot--filled {
  background: var(--yellow);
}

/* Quality grade badge */
.grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 800;
}

.grade-badge--A {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.grade-badge--B {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.grade-badge--C {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.clip-item__virality {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--btn-radius);
  background: var(--yellow-dim);
  color: var(--yellow);
  font-size: 0.6875rem;
  font-weight: 700;
}

.clip-item__tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.clip-tag {
  padding: 2px 10px;
  border-radius: var(--btn-radius);
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid transparent;
}

/* Category-colored tags */
.clip-tag--topic {
  background: var(--tag-topic-bg);
  color: var(--tag-topic);
  border-color: rgba(255, 235, 3, 0.2);
}

.clip-tag--hook {
  background: var(--tag-hook-bg);
  color: var(--tag-hook);
  border-color: rgba(64, 196, 255, 0.2);
}

.clip-tag--emotion {
  background: var(--tag-emotion-bg);
  color: var(--tag-emotion);
  border-color: rgba(192, 132, 252, 0.2);
}

.clip-item__actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
}

.pagination:empty {
  display: none;
}

.pagination__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: "Work Sans", sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.pagination__btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.pagination__btn--active {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--yellow);
}

.pagination__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination__info {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 8px;
}

/* ---------- MODAL ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.modal-overlay--visible {
  display: flex;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 32px;
  overflow-x: hidden;
  box-shadow: 0 0 120px rgba(0, 50, 150, 0.15);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--red);
}

.modal-player {
  width: 100%;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-player video,
#clip-player {
  display: block;
  max-height: 50vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
  margin: 0 auto;
}

.modal-info {
  padding: 24px 28px;
}

.modal-info__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.modal-info__quote {
  display: block;
  padding: 12px 16px;
  margin: 12px 0;
  background: var(--yellow-dim);
  border-left: 3px solid var(--yellow);
  border-radius: 0 8px 8px 0;
  color: var(--yellow);
  font-size: 0.9375rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.5;
}

.modal-info__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.modal-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.modal-info__source {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 12px;
}

.modal-info__source a {
  color: var(--info);
  text-decoration: none;
}

.modal-info__source a:hover {
  text-decoration: underline;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px 24px;
  border-top: 1px solid var(--border);
}

/* ---------- SPINNER ---------- */
.spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner::after {
  content: "";
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 235, 3, 0.15);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Small inline spinner */
.spinner--inline {
  display: inline-flex;
  padding: 0;
}

.spinner--inline::after {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* ---------- LOADING SKELETON ---------- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton--text {
  height: 14px;
  width: 80%;
  margin-bottom: 8px;
}

.skeleton--title {
  height: 18px;
  width: 60%;
  margin-bottom: 12px;
}

.skeleton--card {
  height: 100px;
  border-radius: var(--card-radius);
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  text-align: center;
}

.empty-state__icon {
  font-size: 2rem;
  opacity: 0.3;
}

.empty-state__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- TOAST ---------- */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  padding: 14px 24px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: "Work Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  animation: toast-in 0.3s ease forwards;
  max-width: 380px;
}

.toast--success {
  border-color: rgba(34, 197, 94, 0.3);
}

.toast--error {
  border-color: rgba(239, 68, 68, 0.3);
}

.toast--info {
  border-color: rgba(64, 196, 255, 0.3);
}

.toast--exit {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ---------- TUTORIAL OVERLAY ---------- */
.tutorial-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 5000;
  align-items: center;
  justify-content: center;
}

.tutorial-overlay--visible {
  display: flex;
}

.tutorial-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.tutorial-dialog {
  position: relative;
  z-index: 5001;
  width: 100%;
  max-width: 480px;
  padding: 36px 32px 28px;
  background: var(--dark);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 0 80px rgba(255, 235, 3, 0.08), 0 32px 64px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.tutorial-dialog__step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.tutorial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all var(--transition);
}

.tutorial-dot--active {
  width: 24px;
  border-radius: 4px;
  background: var(--yellow);
}

.tutorial-dialog__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.tutorial-dialog__text {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 28px;
}

.tutorial-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tutorial-dialog__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Tutorial spotlight effect */
.tutorial-spotlight {
  position: relative;
  z-index: 5002;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7) !important;
  border-radius: var(--card-radius);
}

/* ---------- FOOTER ---------- */
.footer {
  position: relative;
  z-index: 1;
  padding: 24px 40px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__logo {
  height: 20px;
  width: auto;
  opacity: 0.5;
}

.footer__text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__link {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--yellow);
}

.footer__separator {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1100px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .top-bar {
    padding: 10px 16px;
    gap: 8px;
  }

  .top-bar__nav {
    display: none;
  }

  .top-bar__hamburger {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }

  .top-bar__logo {
    height: 22px;
  }

  .dashboard {
    padding: 16px 12px 40px;
    gap: 16px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .stat-card {
    padding: 16px 12px 14px;
    border-radius: 16px;
  }

  .stat-card__value {
    font-size: 1.75rem;
  }

  .stat-card__icon {
    width: 36px;
    height: 36px;
  }

  .card {
    padding: 16px;
    border-radius: 16px;
  }

  .pipeline-steps {
    gap: 6px;
  }

  .pipeline-step-arrow {
    display: none;
  }

  .pipeline-step-btn {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .search-bar {
    padding: 4px 4px 4px 14px;
  }

  .search-bar__input {
    font-size: 0.875rem;
  }

  .search-bar__shortcut {
    display: none;
  }

  .filter-bar {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .filter-bar__filters {
    gap: 6px;
  }

  .select-filter {
    font-size: 0.75rem;
    padding: 6px 28px 6px 10px;
  }

  .modal-overlay {
    padding: 16px;
  }

  .modal-content {
    border-radius: 20px;
  }

  .modal-actions {
    padding: 12px 16px 16px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .tutorial-dialog {
    margin: 16px;
    padding: 28px 20px 20px;
  }

  .tutorial-dialog__title {
    font-size: 1.125rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .top-bar__logo {
    height: 20px;
  }

  .top-bar__right {
    gap: 8px;
  }

  .btn--primary {
    padding: 10px 18px;
    font-size: 0.75rem;
  }

  .pipeline-status {
    padding: 6px 10px;
    font-size: 0.6875rem;
  }

  .card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card__controls {
    width: 100%;
  }

  .select-filter {
    flex: 1;
    min-width: 0;
  }

  .video-item__thumb {
    width: 80px;
    height: 45px;
  }

  .clip-item__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ============================================================
   GUIDE PAGE STYLES
   ============================================================ */

.guide-page {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 40px 80px;
}

.guide-hero {
  text-align: center;
  margin-bottom: 56px;
}

.guide-hero__title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.guide-hero__title span {
  color: var(--yellow);
}

.guide-hero__subtitle {
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-section {
  margin-bottom: 48px;
}

.guide-section__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.9375rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.guide-section__title {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.guide-section__what,
.guide-section__how,
.guide-section__expect {
  margin-bottom: 12px;
}

.guide-section__label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 4px;
}

.guide-section__text {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-section__code {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--info);
  font-family: "Consolas", "Monaco", monospace;
  font-size: 0.8125rem;
  font-weight: 500;
}

.guide-divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 48px 0;
}

.guide-subsection {
  margin-bottom: 32px;
}

.guide-subsection__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.guide-subsection__text {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

.guide-faq {
  margin-top: 16px;
}

.guide-faq__item {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-bottom: 12px;
  transition: all var(--transition);
}

.guide-faq__item:hover {
  border-color: var(--border-hover);
}

.guide-faq__question {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.guide-faq__answer {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .guide-page {
    padding: 24px 16px 60px;
  }

  .guide-hero__title {
    font-size: 1.5rem;
  }

  .guide-hero__subtitle {
    font-size: 1rem;
  }

  .guide-section__title {
    font-size: 1.125rem;
  }
}

/* ============================================================
   MULTI-PAGE LAYOUT — New page-specific styles
   ============================================================ */

/* ---------- PAGE CONTAINER ---------- */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  position: relative;
  z-index: 1;
}

/* ---------- PAGE HEADER ---------- */
.page-header {
  margin-bottom: 32px;
}

.page-header__title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.page-header__subtitle,
.page-header__count {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-top: 4px;
}

/* ---------- PIPELINE STATUS DOT ---------- */
.pipeline-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  cursor: default;
}

.pipeline-dot--active {
  background: var(--yellow);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 235, 3, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 235, 3, 0); }
}

/* ---------- HOME PAGE ---------- */
.home-hero {
  text-align: center;
  padding: 40px 0 32px;
}

.home-hero__title {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.home-hero__subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-top: 8px;
}

.home-search {
  max-width: 640px;
  margin: 0 auto 32px;
}

.home-search__form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg-alpha);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 6px 6px 6px 20px;
  transition: border-color var(--transition);
}

.home-search__form:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 20px rgba(255, 235, 3, 0.1);
}

.home-search__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.home-search__input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

.home-search__input::placeholder {
  color: var(--text-muted);
}

/* QUICK ACTIONS */
.home-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.home-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 16px;
  background: var(--card-bg-alpha);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

.home-action-card:hover {
  border-color: var(--yellow);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 235, 3, 0.08);
}

.home-action-card__icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.home-action-card__label {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.home-action-card__desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* RECENT CLIPS */
.home-recent__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.recent-clip-card {
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: border-color var(--transition);
}

.recent-clip-card:hover {
  border-color: var(--border-hover);
}

.recent-clip-card__quote {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-clip-card__desc {
  font-size: 0.8125rem;
  color: var(--yellow);
  font-weight: 500;
  margin-bottom: 10px;
}

.recent-clip-card__source {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.recent-clip-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.recent-clip-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ---------- VIDEOS PAGE ---------- */
.videos-filters {
  margin-bottom: 24px;
}

.videos-filters__row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.videos-filters__search {
  flex: 1;
  min-width: 200px;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 8px 32px 8px 12px;
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23A8A8A8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-input {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition);
}

.filter-input:focus {
  border-color: var(--yellow);
}

/* VIDEO ACCORDION */
.video-accordion__item {
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-bg-alpha);
  transition: border-color var(--transition);
}

.video-accordion__item:hover {
  border-color: var(--border-hover);
}

.video-accordion__item--expanded {
  border-color: var(--yellow-glow);
}

.video-accordion__header {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.video-accordion__arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 16px;
}

.video-accordion__info {
  flex: 1;
  min-width: 0;
}

.video-accordion__title {
  font-weight: 600;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-accordion__meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.video-accordion__body {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

/* CLIPS WITHIN VIDEO */
.video-clips-list {
  padding-top: 12px;
}

.video-clip-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.video-clip-item:last-child {
  border-bottom: none;
}

.video-clip-item__number {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-shrink: 0;
  width: 24px;
}

.video-clip-item__content {
  flex: 1;
  min-width: 0;
}

.video-clip-item__quote {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.video-clip-item__desc {
  font-size: 0.8125rem;
  color: var(--yellow);
  font-weight: 500;
  margin-bottom: 8px;
}

.video-clip-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  margin-bottom: 8px;
}

.video-clip-item__time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.video-clip-item__actions {
  display: flex;
  gap: 8px;
}

/* ---------- SEARCH PAGE ---------- */
.search-hero {
  max-width: 720px;
  margin: 0 auto 24px;
}

.search-hero__form {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg-alpha);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 8px 8px 8px 20px;
  transition: border-color var(--transition);
}

.search-hero__form:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 24px rgba(255, 235, 3, 0.12);
}

.search-hero__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.search-hero__input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.0625rem;
  outline: none;
  padding: 8px 0;
}

.search-hero__input::placeholder {
  color: var(--text-muted);
}

.search-hero__recent {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.tag-pill--recent {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--btn-radius);
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition);
}

.tag-pill--recent:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* SEARCH FILTERS */
.search-filters {
  max-width: 720px;
  margin: 0 auto 20px;
}

.search-filters__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 8px 0;
}

.search-filters__toggle:hover {
  color: var(--yellow);
}

.search-filters__panel {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 0;
}

.search-status {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 16px;
}

/* SEARCH RESULT CARDS */
.search-result-card {
  padding: 20px 24px;
  background: var(--card-bg-alpha);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 12px;
  transition: border-color var(--transition);
}

.search-result-card:hover {
  border-color: var(--border-hover);
}

.search-result-card__quote {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.search-result-card__desc {
  font-size: 0.875rem;
  color: var(--yellow);
  font-weight: 500;
  margin-bottom: 10px;
}

.search-result-card__source {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.search-result-card__source a {
  color: var(--info);
  text-decoration: none;
}

.search-result-card__source a:hover {
  text-decoration: underline;
}

.search-result-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.search-result-card__match {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
}

.search-result-card__duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-result-card__actions {
  display: flex;
  gap: 8px;
}

/* TAG CLOUD BROWSE */
.tag-cloud-browse {
  max-width: 720px;
  margin: 0 auto;
}

.tag-cloud-browse__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ---------- PIPELINE PAGE ---------- */
.pipeline-flow {
  text-align: center;
  padding: 32px;
  margin-bottom: 24px;
}

.pipeline-flow__steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  min-width: 80px;
}

.pipeline-step--active {
  border-color: var(--yellow);
  background: var(--yellow-dim);
}

.pipeline-step__icon {
  font-size: 1.5rem;
}

.pipeline-step__label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.pipeline-step__count {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.pipeline-step__arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
}

.step-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.step-card {
  padding: 24px;
}

.step-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.step-card__icon {
  font-size: 1.5rem;
}

.step-card__title {
  font-weight: 700;
  font-size: 1rem;
}

.step-card__stats {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.step-card__stat {
  display: flex;
  flex-direction: column;
}

.step-card__stat-value {
  font-weight: 700;
  font-size: 1.125rem;
}

.step-card__stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.step-card__run {
  width: 100%;
}

/* QUEUE MONITOR */
.pipeline-monitor {
  margin-bottom: 24px;
}

.pipeline-monitor__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.pipeline-monitor__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pipeline-monitor__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.pipeline-monitor__value {
  font-weight: 700;
  font-size: 1.25rem;
}

/* EXPLAINER */
.pipeline-explainer__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
}

.pipeline-explainer__toggle span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.pipeline-explainer__body {
  padding-top: 16px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.guide-steps {
  padding-left: 20px;
  margin-bottom: 12px;
}

.guide-steps li {
  margin-bottom: 8px;
}

/* ---------- SHARED COMPONENTS ---------- */

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
}

.pagination__info {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Empty state */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
  padding: 40px 20px;
}

/* Clip tags (reusable) */
.clip-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--btn-radius);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Tag pills in tag cloud */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--btn-radius);
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.tag-pill:hover {
  transform: scale(1.02);
  border-color: var(--yellow);
}

.tag-pill__count {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* Modal overlay open state */
.modal-overlay--open {
  display: flex;
}

/* How It Works modal (guide) */
.modal-content--guide {
  max-width: 560px;
  padding: 32px;
}

.modal-content--guide h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

/* Button sizes */
.btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* Spinner */
.spinner {
  display: flex;
  justify-content: center;
  padding: 32px;
}

.spinner::after {
  content: "";
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .home-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .home-recent__grid {
    grid-template-columns: 1fr;
  }

  .pipeline-monitor__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .step-cards-grid {
    grid-template-columns: 1fr;
  }

  .videos-filters__row {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header__title {
    font-size: 1.5rem;
  }

  .home-hero__title {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .home-actions {
    grid-template-columns: 1fr;
  }

  .pipeline-flow__steps {
    flex-direction: column;
  }

  .pipeline-step__arrow {
    transform: rotate(90deg);
  }
}
