/* PRISM Demo — Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

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

:root {
  --blue: #0000FF;
  --blue-light: #4040FF;
  --blue-glow: rgba(0,0,255,0.15);
  --blue-subtle: rgba(0,0,255,0.06);
  --navy: #050522;
  --navy-soft: #0a0a3a;
  --slate: #0A718C;
  --gray: #F4F4F4;
  --white: #FFFFFF;
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --green: #10b981;
  --green-bg: rgba(16,185,129,0.08);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,0.08);
  --amber: #f59e0b;
  --amber-bg: rgba(245,158,11,0.08);
  --border: #e5e7eb;
  --surface: #FAFBFC;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* LAYOUT */
.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* HEADER */
.app-header {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
}
.app-header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo svg { height: 28px; width: auto; }
.logo-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 4px 12px;
  border-radius: 100px;
}
.logout-btn {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.logout-btn:hover { color: rgba(255,255,255,0.7); }

/* HERO TEXT */
.page-hero {
  text-align: center;
  padding: 60px 0 40px;
}
.page-hero h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.page-hero p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  max-width: 480px;
  margin: 0 auto;
}

/* SEARCH BAR */
.search-container {
  position: relative;
  max-width: 600px;
  margin: 0 auto 48px;
}
.search-input {
  width: 100%;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 16px 20px 16px 48px;
  outline: none;
  transition: all 0.2s;
}
.search-input::placeholder { color: rgba(255,255,255,0.3); }
.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,0,255,0.15);
  background: rgba(255,255,255,0.08);
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.3);
  font-size: 18px;
}

/* RESULTS */
.results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
  margin: 0 auto 48px;
}
.result-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.result-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(0,0,255,0.3);
  transform: translateY(-1px);
}
.result-card img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.result-info { flex: 1; }
.result-name { font-weight: 600; font-size: 15px; }
.result-meta { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 2px; }
.result-arrow { color: rgba(255,255,255,0.2); font-size: 18px; }

/* SAVED SHOWS */
.saved-section {
  max-width: 600px;
  margin: 0 auto;
}
.saved-section h3 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 16px;
}
.saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.saved-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--white);
}
.saved-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(0,0,255,0.3);
}
.saved-card img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.saved-card-name { font-size: 13px; font-weight: 500; }
.saved-card-subs { font-size: 11px; color: rgba(255,255,255,0.4); }

/* EPISODE LIST */
.episode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.episode-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.episode-card:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(0,0,255,0.3);
}
.episode-card.selected {
  border-color: var(--blue);
  background: rgba(0,0,255,0.08);
}
.episode-thumb {
  width: 120px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.episode-info { flex: 1; }
.episode-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.episode-meta { font-size: 12px; color: rgba(255,255,255,0.4); margin-top: 4px; }

/* SPONSOR PILLS */
.sponsor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.sponsor-pill {
  padding: 10px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.sponsor-pill:hover {
  background: rgba(0,0,255,0.1);
  border-color: rgba(0,0,255,0.3);
}
.sponsor-pill.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

/* GO BUTTON */
.go-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 24px;
}
.go-btn:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,255,0.3); }
.go-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* SHOW HEADER (on analyze page) */
.show-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.show-header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}
.show-header-info h2 { font-size: 20px; font-weight: 700; }
.show-header-info p { font-size: 13px; color: rgba(255,255,255,0.4); margin-top: 2px; }

/* STEP INDICATOR */
.steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
}
.step.active { color: var(--white); }
.step.done { color: var(--green); }
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}
.step.active .step-num { background: var(--blue); color: white; }
.step.done .step-num { background: var(--green); color: white; }
.step-line { width: 32px; height: 1px; background: rgba(255,255,255,0.1); }

/* LOADING */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px;
  text-align: center;
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: rgba(255,255,255,0.5); }

/* STATUS MESSAGES */
.status-msg {
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.status-msg.info { background: rgba(0,0,255,0.08); border: 1px solid rgba(0,0,255,0.2); color: rgba(255,255,255,0.7); }
.status-msg.error { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #fca5a5; }
.status-msg.success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #6ee7b7; }

/* SECTION LABELS */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .page-container { padding: 24px 16px; }
  .page-hero { padding: 40px 0 24px; }
  .page-hero h1 { font-size: 22px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .saved-grid { grid-template-columns: 1fr; }
  .episode-thumb { display: none; }
}
