/* -------------------------------------------------------------
 * Theme variables & Core Design Tokens
 * ------------------------------------------------------------- */
:root {
  --bg-app: #090C15;
  --bg-sidebar: rgba(13, 17, 31, 0.7);
  --bg-card: rgba(20, 26, 46, 0.55);
  --bg-input: rgba(10, 14, 26, 0.8);
  
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(128, 90, 213, 0.6);
  
  --text-primary: #F7FAFC;
  --text-secondary: #A0AEC0;
  --text-muted: #718096;
  
  --purple: #9F7AEA;
  --purple-glow: rgba(159, 122, 234, 0.15);
  --blue: #38B2AC;
  --blue-glow: rgba(56, 178, 172, 0.15);
  --pink: #ED64A6;
  --pink-glow: rgba(237, 100, 166, 0.15);
  --danger: #E53E3E;
  
  --sidebar-width: 260px;
  --header-height: 80px;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-code: 'Space Grotesk', Courier, monospace;
}

/* -------------------------------------------------------------
 * General Reset & Globals
 * ------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Decorative glowing blobs in the background */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}
.blob-purple {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--purple) 0%, rgba(0,0,0,0) 70%);
  top: -10%;
  left: 20%;
}
.blob-blue {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--blue) 0%, rgba(0,0,0,0) 70%);
  bottom: -10%;
  right: 10%;
}
.blob-pink {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--pink) 0%, rgba(0,0,0,0) 70%);
  top: 40%;
  left: -10%;
}

/* -------------------------------------------------------------
 * Layout Structure
 * ------------------------------------------------------------- */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
  z-index: 1;
  background: rgba(9, 12, 21, 0.3);
  backdrop-filter: blur(10px);
}

/* Sidebar navigation */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  backdrop-filter: blur(25px);
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px 28px 12px;
  border-bottom: 1px solid var(--border-color);
}
.logo-icon {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(237, 100, 166, 0.4);
}
.logo-icon i {
  color: white;
  width: 22px;
  height: 22px;
}
.brand-text h1 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #FFF, #CBD5E0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-text span {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  display: block;
}

.sidebar-nav {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-radius: 12px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.nav-item i {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.03);
}
.nav-item:hover i {
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(159, 122, 234, 0.15), rgba(56, 178, 172, 0.15));
  color: white;
  border: 1px solid rgba(159, 122, 234, 0.25);
  box-shadow: 0 4px 20px rgba(159, 122, 234, 0.05);
}

.api-status-panel {
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background-color: var(--danger);
  box-shadow: 0 0 8px rgba(229, 62, 98, 0.6);
  transition: all 0.3s ease;
}
.status-indicator.active {
  background-color: var(--blue);
  box-shadow: 0 0 8px rgba(56, 178, 172, 0.6);
}

/* Main workspace layout */
.main-content {
  flex-grow: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(9, 12, 21, 0.15);
}

.content-header {
  height: var(--header-height);
  padding: 0 40px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
}
.header-title h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.header-title p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.scroll-area {
  flex-grow: 1;
  padding: 40px;
  overflow-y: auto;
}
/* Scrollbar style */
.scroll-area::-webkit-scrollbar {
  width: 6px;
}
.scroll-area::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
}
.scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* -------------------------------------------------------------
 * Tab panes configuration
 * ------------------------------------------------------------- */
.tab-pane {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.tab-pane.active {
  display: block;
}

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

/* -------------------------------------------------------------
 * UI Cards & Grid Frameworks
 * ------------------------------------------------------------- */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  margin-bottom: 24px;
  transition: all 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.flex-col {
  display: flex;
  flex-direction: column;
}
.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.justify-end {
  justify-content: flex-end;
}
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* Grid systems */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-purple {
  background: var(--purple-glow);
  color: var(--purple);
}
.icon-blue {
  background: var(--blue-glow);
  color: var(--blue);
}
.icon-pink {
  background: var(--pink-glow);
  color: var(--pink);
}
.stat-info {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 2px;
}

.two-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}
.card-header h4 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Welcome panel style */
.welcome-card {
  background: linear-gradient(135deg, rgba(159, 122, 234, 0.08) 0%, rgba(56, 178, 172, 0.08) 100%), var(--bg-card);
  border: 1px solid rgba(159, 122, 234, 0.15);
  display: flex;
  align-items: center;
}
.welcome-text h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}
.welcome-text p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* -------------------------------------------------------------
 * Competitors Grid & Items
 * ------------------------------------------------------------- */
.competitors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.competitor-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.competitor-card:hover {
  transform: translateY(-5px);
  border-color: rgba(159, 122, 234, 0.3);
  box-shadow: 0 12px 28px rgba(159, 122, 234, 0.08);
}
.btn-delete-card {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-delete-card:hover {
  background: rgba(229, 62, 62, 0.2);
  color: var(--danger);
  border-color: rgba(229, 62, 62, 0.4);
}
.competitor-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  margin-bottom: 14px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(159, 122, 234, 0.2);
}
.competitor-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.competitor-handle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.competitor-stats-row {
  display: flex;
  gap: 16px;
  width: 100%;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  justify-content: center;
}
.comp-stat {
  display: flex;
  flex-direction: column;
}
.comp-stat-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.comp-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Competitor / Keyword lists in preview cards */
.competitor-list-short, .keywords-list-short {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comp-item-short {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}
.comp-item-short img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.comp-item-info {
  margin-left: 10px;
  flex-grow: 1;
}
.comp-item-info h5 {
  font-size: 13px;
  font-weight: 600;
}
.comp-item-info span {
  font-size: 11px;
  color: var(--text-muted);
}

.kw-item-short {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  font-size: 13px;
}

.empty-state {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px 10px;
}

/* -------------------------------------------------------------
 * Keywords Section Details
 * ------------------------------------------------------------- */
.keywords-container-box {
  margin-top: 24px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 18px;
}
.keywords-container-box h5 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.keywords-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.keyword-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(56, 178, 172, 0.1) 0%, rgba(159, 122, 234, 0.1) 100%);
  border: 1px solid rgba(56, 178, 172, 0.2);
  color: var(--text-primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.keyword-pill button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  transition: color 0.2s ease;
}
.keyword-pill button:hover {
  color: var(--danger);
}

/* -------------------------------------------------------------
 * Input & Form Elements
 * ------------------------------------------------------------- */
.section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.form-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-group i {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.input-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 14px 16px 14px 44px;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}
.input-group input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.15);
}
.flex-grow {
  flex-grow: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.help-text {
  font-size: 11px;
  color: var(--text-muted);
}

/* Button frameworks */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  outline: none;
}
.btn i {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(159, 122, 234, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(159, 122, 234, 0.4);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}
.text-btn {
  background: transparent;
  border: none;
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.text-btn:hover {
  opacity: 0.8;
}

/* -------------------------------------------------------------
 * Research Center Layout & Loading
 * ------------------------------------------------------------- */
.research-launcher-box {
  padding: 60px 40px;
  background: radial-gradient(circle at top, rgba(159, 122, 234, 0.1) 0%, rgba(0,0,0,0) 60%), var(--bg-card);
  border: 1px solid rgba(159, 122, 234, 0.15);
  margin-bottom: 30px;
}
.text-center {
  text-align: center;
}
.research-launcher-box h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}
.research-launcher-box p {
  max-width: 600px;
  margin: 0 auto 24px auto;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.loader-container {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.loader-container p {
  font-size: 13px;
  color: var(--purple);
  font-weight: 500;
}
.pulse-loader {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  position: relative;
  animation: pulse 1.6s infinite ease-in-out;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(159, 122, 234, 0.4); }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 20px 10px rgba(159, 122, 234, 0); }
  100% { transform: scale(0.8); opacity: 0.5; box-shadow: 0 0 0 0 rgba(159, 122, 234, 0); }
}

.hidden {
  display: none !important;
}

/* Research results structures */
.results-summary-card {
  border-left: 4px solid var(--purple);
}
.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  background: var(--purple-glow);
  color: var(--purple);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.results-summary-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
}

.trending-topics-list, .content-gaps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trend-item-card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
}
.trend-item-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(159, 122, 234, 0.2);
}
.trend-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.trend-topic-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}
.badge-high {
  background: rgba(229, 62, 62, 0.15);
  color: var(--danger);
  border: 1px solid rgba(229, 62, 62, 0.2);
}
.badge-medium {
  background: rgba(237, 100, 166, 0.15);
  color: var(--pink);
  border: 1px solid rgba(237, 100, 166, 0.2);
}
.badge-purple {
  background: var(--purple-glow);
  color: var(--purple);
  border: 1px solid rgba(159, 122, 234, 0.2);
}
.trend-rationale {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.trend-actions {
  display: flex;
  justify-content: flex-end;
}

.text-purple { color: var(--purple); }
.text-blue { color: var(--blue); }
.text-pink { color: var(--pink); }

.gap-item-card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--blue);
}
.gap-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.gap-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.insights-body-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-line;
}

/* -------------------------------------------------------------
 * Content Creator Layout & Cards
 * ------------------------------------------------------------- */
.generator-output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.output-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Title options */
.titles-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.title-option-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}
.title-option-card:hover {
  background: rgba(255, 255, 255, 0.04);
}
.title-opt-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.title-opt-val {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
}
.title-opt-style {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}
.btn-copy-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.btn-copy-small:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Thumbnail Visual Guides */
.thumbnail-concepts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.thumb-concept-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}
.thumb-concept-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.thumb-concept-detail {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.thumb-concept-detail strong {
  color: var(--text-primary);
}

/* Description & Timing */
.timing-box {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tags-pill-box {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-pill-static {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* Script Box layout */
.relative-card {
  position: relative;
}
.script-scroller {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 8px;
}
.script-scroller::-webkit-scrollbar {
  width: 4px;
}
.script-scroller::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.script-section {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
}
.script-section:last-child {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.script-sec-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.script-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.script-sec-visual {
  font-size: 11.5px;
  font-style: italic;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  border-left: 2px solid var(--blue);
}
.script-sec-content {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* Live Timetable schedule styles */
.live-timetable-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.live-topic-lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--pink);
  margin-bottom: 4px;
}
.live-timetable-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-time-item {
  display: flex;
  gap: 12px;
  font-size: 12px;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 6px;
}
.live-time-val {
  font-weight: 700;
  color: var(--text-primary);
  min-width: 70px;
}
.live-activity-val {
  color: var(--text-secondary);
}

.live-qa-box {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border-color);
}
.live-qa-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.live-qa-prompts {
  list-style: decimal;
  padding-left: 18px;
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* -------------------------------------------------------------
 * Toast notification
 * ------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--purple);
  padding: 12px 24px;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(159, 122, 234, 0.25);
  z-index: 999;
  font-size: 13px;
  font-weight: 500;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
}
@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Helper Utilities */
.justify-between { justify-content: space-between; }
