/* ============================================================
   LokLöwen TF14 - Eisenbahn-Quizplattform Design System
   Modernes Bahn-Cockpit, Glassmorphism, Signal-Farben & Dark Mode
   ============================================================ */

:root {
  --bg-main: #0a0d14;
  --bg-gradient: radial-gradient(circle at 50% 0%, #151d2e 0%, #0a0d14 70%);
  --surface-card: rgba(17, 24, 39, 0.82);
  --surface-elevated: rgba(26, 36, 56, 0.9);
  --surface-active: rgba(38, 52, 78, 0.95);
  
  --brand-gold: #f59e0b;
  --brand-gold-glow: rgba(245, 158, 11, 0.45);
  --brand-gold-light: #fbbf24;
  --brand-yellow: #facc15;
  --brand-orange: #ea580c;
  
  --rail-blue: #38bdf8;
  --rail-blue-glow: rgba(56, 189, 248, 0.35);
  --signal-green: #10b981;
  --signal-green-glow: rgba(16, 185, 129, 0.35);
  --signal-red: #ef4444;
  --signal-red-glow: rgba(239, 68, 68, 0.35);
  --signal-amber: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-brand: rgba(245, 158, 11, 0.4);
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --shadow-card: 0 16px 36px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px var(--border-subtle);
  --shadow-glow: 0 0 25px var(--brand-gold-glow);
  --shadow-signal: 0 0 20px var(--signal-green-glow);
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-main);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background Railway Ambient Track Lines */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
  background-size: 60px 60px;
  background-image: 
    linear-gradient(to right, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.05) 1px, transparent 1px);
}

.bg-track-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(245, 158, 11, 0.12) 0%, rgba(56, 189, 248, 0.05) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}

/* Application Container */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.25rem 3rem;
}

/* Header & Top Bar */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-icon-box {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-text h1 span.tf-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid var(--brand-gold);
  border-radius: var(--radius-full);
  -webkit-text-fill-color: var(--brand-gold-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-user-status {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--rail-blue), #2563eb);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

/* Signal Indicator Lights Widget */
.signal-lights-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #05070a;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #1e293b;
}

.signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.25;
  transition: var(--transition-fast);
}

.signal-dot.red { background-color: var(--signal-red); }
.signal-dot.amber { background-color: var(--signal-amber); }
.signal-dot.green { background-color: var(--signal-green); }

.signal-dot.active.green {
  opacity: 1;
  box-shadow: 0 0 10px var(--signal-green);
}
.signal-dot.active.red {
  opacity: 1;
  box-shadow: 0 0 10px var(--signal-red);
}
.signal-dot.active.amber {
  opacity: 1;
  box-shadow: 0 0 10px var(--signal-amber);
}

/* Screens / Views Manager */
.screen {
  display: none;
  animation: fadeIn 0.35s ease forwards;
}

.screen.active {
  display: block;
}

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

/* ============================================================
   SCREEN 1: WELCOME & GATEKEEPER / LOGIN
   ============================================================ */
.welcome-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 65vh;
}

.login-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--shadow-card), 0 0 40px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #e11d48, #38bdf8);
}

.hero-emblem {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-emblem-icon {
  width: 76px;
  height: 76px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border: 2px solid var(--brand-gold);
  border-radius: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  box-shadow: var(--shadow-glow);
  animation: pulseEmblem 3s infinite alternate;
}

@keyframes pulseEmblem {
  from { box-shadow: 0 0 20px rgba(245, 158, 11, 0.2); }
  to { box-shadow: 0 0 35px rgba(245, 158, 11, 0.5); }
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.welcome-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Security Notice Box */
.admin-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.notice-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
}

.notice-content h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-gold-light);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notice-content p {
  font-size: 0.82rem;
  color: #e2e8f0;
  line-height: 1.45;
}

/* Privacy & Disclaimer Notice Box */
.disclaimer-notice-box {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
}

.disclaimer-notice-box .notice-content h4 {
  color: #38bdf8;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  letter-spacing: 0.02em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
  font-size: 1.1rem;
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem 0.85rem 2.8rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-input.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  font-size: 1.1rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-gold);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.form-input::placeholder {
  color: var(--text-dim);
  letter-spacing: normal;
  font-family: var(--font-main);
}

.btn-toggle-pin {
  position: absolute;
  right: 0.85rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0.3rem;
  font-size: 1.05rem;
  transition: var(--transition-fast);
}

.btn-toggle-pin:hover {
  color: var(--text-main);
}

.form-error-msg {
  display: none;
  color: var(--signal-red);
  font-size: 0.82rem;
  margin-top: 0.4rem;
  font-weight: 500;
}

.form-error-msg.visible {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 0.95rem 1.5rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  color: #0b0f17;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
  transition: var(--transition-fast);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

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

/* ============================================================
   SCREEN 2: DASHBOARD & QUIZ BUILDER
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}

/* Welcome Cockpit Banner */
.cockpit-banner {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  box-shadow: var(--shadow-card);
}

.banner-title-area h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.banner-title-area p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.stats-ribbon {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  text-align: center;
  min-width: 90px;
}

.stat-pill .stat-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-gold-light);
  font-family: var(--font-mono);
}

.stat-pill .stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Navigation Tabs (Quiz erstellen vs. Lernkarten Bibliothek) */
.nav-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #0b0f17;
  background: var(--brand-gold);
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.35);
}

/* Studio Builder Card */
.builder-card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.section-head h3 {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-select-all {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--rail-blue);
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-select-all:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--rail-blue);
}

/* Category Selection Grid */
.category-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.cat-checkbox-card {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.cat-checkbox-card:hover {
  background: rgba(26, 36, 56, 0.7);
  border-color: var(--border-medium);
}

.cat-checkbox-card.checked {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--brand-gold);
}

.cat-icon-badge {
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.cat-info {
  flex: 1;
}

.cat-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.cat-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.cat-badge-code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
}

.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-dim);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.cat-checkbox-card.checked .custom-checkbox {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #0b0f17;
}

/* Question Count Selector & Modes */
.config-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.25rem;
}

.config-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.config-box h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.pills-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-choice {
  flex: 1 1 calc(33.333% - 0.5rem);
  min-width: 60px;
  text-align: center;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.pill-choice:hover {
  background: rgba(255, 255, 255, 0.08);
}

.pill-choice.active {
  background: var(--rail-blue);
  border-color: var(--rail-blue);
  color: #0b0f17;
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3);
}

.modes-select-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mode-option {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--transition-fast);
  user-select: none;
}

.mode-option:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mode-option.active {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--brand-gold);
}

.mode-option .mode-icon {
  font-size: 1.3rem;
}

.mode-text h5 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

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

/* Switch for Shuffle */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.25rem 0;
}

.toggle-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--brand-gold);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* Start Quiz CTA */
.btn-launch-quiz {
  width: 100%;
  padding: 1.15rem;
  font-size: 1.15rem;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* ============================================================
   LERNKARTEN BIBLIOTHEK (KARTEN-EXPLORER)
   ============================================================ */
.library-card {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.library-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.lib-search-wrapper {
  flex: 2;
  min-width: 260px;
}

.lib-filter-select {
  flex: 1;
  min-width: 200px;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
}

.lib-filter-select:focus {
  border-color: var(--brand-gold);
}

.library-cards-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Custom Scrollbar */
.library-cards-list::-webkit-scrollbar,
.review-list::-webkit-scrollbar {
  width: 6px;
}

.library-cards-list::-webkit-scrollbar-thumb,
.review-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}

.lib-flashcard-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.lib-flashcard-item:hover {
  border-color: var(--border-brand);
  background: rgba(20, 29, 47, 0.8);
}

.lib-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
}

.badge-tag {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-weight: 600;
}

.badge-tag.brand {
  background: rgba(245, 158, 11, 0.15);
  color: var(--brand-gold-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.lib-card-question {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.lib-card-answer {
  font-size: 0.85rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--brand-gold);
  line-height: 1.5;
  white-space: pre-line;
}

/* ============================================================
   SCREEN 3: ACTIVE QUIZ PLAYER
   ============================================================ */
.quiz-header-bar {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.quiz-progress-section {
  flex: 1;
  min-width: 220px;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-label-row .q-counter {
  color: var(--brand-gold-light);
  font-family: var(--font-mono);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #38bdf8);
  border-radius: 99px;
  transition: width 0.35s ease;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.live-score-pill {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 700;
}

.live-score-pill .score-val {
  color: var(--signal-green);
  font-family: var(--font-mono);
}

.btn-quit-quiz {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-quit-quiz:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--signal-red);
  color: #fca5a5;
}

/* The Main Question Card */
.quiz-play-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  position: relative;
}

.question-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.q-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-full);
  color: var(--brand-gold-light);
  font-size: 0.82rem;
  font-weight: 700;
}

.q-source-tag {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.question-text-title {
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 2rem;
  letter-spacing: -0.01em;
}

/* Multiple Choice Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.mc-option-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  color: var(--text-main);
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.mc-option-btn:hover:not(:disabled) {
  background: rgba(26, 36, 56, 0.85);
  border-color: var(--border-medium);
  transform: translateX(4px);
}

.mc-option-btn .opt-badge {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  font-family: var(--font-mono);
  flex-shrink: 0;
  margin-top: 1px;
}

.mc-option-btn .opt-text {
  flex: 1;
  line-height: 1.45;
}

/* Feedback states */
.mc-option-btn.selected-correct,
.mc-option-btn.correct-highlight {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--signal-green) !important;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3) !important;
}

.mc-option-btn.selected-correct .opt-badge,
.mc-option-btn.correct-highlight .opt-badge {
  background: var(--signal-green);
  border-color: var(--signal-green);
  color: #05160e;
}

.mc-option-btn.selected-wrong {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--signal-red) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.3) !important;
}

.mc-option-btn.selected-wrong .opt-badge {
  background: var(--signal-red);
  border-color: var(--signal-red);
  color: #fff;
}

.mc-option-btn:disabled {
  cursor: default;
}

/* Flashcard Self-Test Mode View */
.flashcard-view-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.flashcard-reveal-btn {
  padding: 1rem 2rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid var(--rail-blue);
  color: var(--rail-blue);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
}

.flashcard-reveal-btn:hover {
  background: var(--rail-blue);
  color: #0b0f17;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.4);
}

.flashcard-answer-revealed {
  display: none;
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border-left: 4px solid var(--brand-gold);
}

.flashcard-answer-revealed.visible {
  display: block;
  animation: fadeIn 0.3s ease;
}

.flashcard-answer-revealed h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--brand-gold-light);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.flashcard-answer-revealed p {
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-line;
  color: #f1f5f9;
}

.flashcard-grade-buttons {
  display: none;
  gap: 1rem;
  width: 100%;
}

.flashcard-grade-buttons.visible {
  display: flex;
}

.btn-grade {
  flex: 1;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-grade.know {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--signal-green);
  color: #6ee7b7;
}

.btn-grade.know:hover {
  background: var(--signal-green);
  color: #05160e;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.4);
}

.btn-grade.dontknow {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--signal-red);
  color: #fca5a5;
}

.btn-grade.dontknow:hover {
  background: var(--signal-red);
  color: #fff;
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.4);
}

/* Post-Answer Feedback Banner (Multiple Choice) */
.answer-explanation-box {
  display: none;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
  animation: fadeIn 0.25s ease;
}

.answer-explanation-box.visible {
  display: block;
}

.exp-status-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.exp-status-row.correct { color: var(--signal-green); }
.exp-status-row.wrong { color: var(--signal-red); }

.exp-body {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
  white-space: pre-line;
}

.exp-source {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Footer Action Toolbar */
.quiz-actions-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.btn-next-question {
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

/* ============================================================
   SCREEN 4: RESULTS & SCORE EVALUATION
   ============================================================ */
.results-card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.result-badge-container {
  margin-bottom: 1.5rem;
}

.result-badge-icon {
  width: 90px;
  height: 90px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

.result-badge-icon.pass {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.05));
  border: 2px solid var(--signal-green);
  box-shadow: 0 0 35px var(--signal-green-glow);
}

.result-badge-icon.fail {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
  border: 2px solid var(--signal-red);
  box-shadow: 0 0 35px var(--signal-red-glow);
}

.results-headline {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.results-subline {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Large Score Stats Grid */
.score-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.score-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.score-box .num {
  font-size: 2.2rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--brand-gold-light);
  line-height: 1.2;
}

.score-box .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-top: 0.4rem;
}

/* Action Buttons Grid */
.results-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-secondary {
  padding: 0.9rem 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-retry-errors {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn-retry-errors:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: var(--signal-red);
}

/* Detailed Review Accordion Section */
.review-section {
  text-align: left;
  border-top: 1px solid var(--border-subtle);
  padding-top: 2rem;
}

.review-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.review-section-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.review-filters {
  display: flex;
  gap: 0.5rem;
}

.btn-filter-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-filter-tag.active {
  background: var(--rail-blue);
  color: #0b0f17;
  border-color: var(--rail-blue);
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.review-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
}

.review-card.correct { border-left: 4px solid var(--signal-green); }
.review-card.wrong { border-left: 4px solid var(--signal-red); }

.review-q-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.review-answers-grid {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
}

.review-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.review-row .tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.review-row.user-wrong .tag { background: rgba(239, 68, 68, 0.2); color: #fca5a5; }
.review-row.user-correct .tag { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.review-row.correct-solution .tag { background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }

.review-source-info {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ============================================================
   SIGNAL & DIAGRAM IMAGE STYLES & INTERACTIVE ZOOM
   ============================================================ */
.quiz-card-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin: 0.75rem 0 1.5rem;
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.5);
  max-height: 290px;
  overflow: hidden;
  cursor: zoom-in;
  user-select: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
  touch-action: manipulation;
}

.quiz-card-image-wrapper:hover {
  border-color: var(--brand-gold);
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.35), inset 0 0 25px rgba(0, 0, 0, 0.6);
}

.quiz-card-image-wrapper:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}

.quiz-card-image-wrapper:active {
  transform: scale(0.99);
}

.quiz-card-img {
  max-height: 240px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none; /* Let parent wrapper catch clicks cleanly */
}

.quiz-card-image-wrapper:hover .quiz-card-img {
  transform: scale(1.03);
}

/* Floating Zoom Badge on Question Image */
.image-zoom-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  color: var(--brand-gold-light);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  transition: all 0.2s ease;
}

.quiz-card-image-wrapper:hover .image-zoom-badge {
  background: rgba(245, 158, 11, 0.25);
  border-color: var(--brand-gold);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

/* Library Card Image Thumbnail */
.lib-card-img-thumb {
  position: relative;
  width: 100%;
  height: 130px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(10, 14, 23, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  padding: 0.35rem;
  cursor: zoom-in;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  touch-action: manipulation;
}

.lib-card-img-thumb::after {
  content: '🔍';
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  font-size: 0.75rem;
  padding: 2px 6px;
  line-height: 1;
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.lib-card-img-thumb:hover {
  border-color: var(--brand-gold);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.lib-card-img-thumb:hover::after {
  background: var(--brand-gold);
  color: #000;
  transform: scale(1.1);
}

.lib-card-img-thumb:active {
  transform: scale(0.98);
}

.lib-card-img-thumb img {
  max-height: 115px;
  max-width: 95%;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.lib-card-img-thumb:hover img {
  transform: scale(1.05);
}

/* Review List Card Image Thumbnail */
.review-card-with-img {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.review-card-img-thumb {
  position: relative;
  width: 120px;
  height: 95px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(10, 14, 23, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.3rem;
  overflow: hidden;
  cursor: zoom-in;
  user-select: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  touch-action: manipulation;
}

.review-card-img-thumb::after {
  content: '🔍';
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 4px;
  font-size: 0.68rem;
  padding: 2px 4px;
  line-height: 1;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.review-card-img-thumb:hover {
  border-color: var(--brand-gold);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.3);
}

.review-card-img-thumb:hover::after {
  background: var(--brand-gold);
  color: #000;
  transform: scale(1.1);
}

.review-card-img-thumb:active {
  transform: scale(0.97);
}

.review-card-img-thumb img {
  max-height: 85px;
  max-width: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.25s ease;
}

.review-card-img-thumb:hover img {
  transform: scale(1.05);
}

.review-card-content {
  flex: 1;
}

/* ============================================================
   LIGHTBOX / IMAGE ZOOM MODAL (COCKPIT DARK DESIGN)
   ============================================================ */
body.lightbox-open {
  overflow: hidden !important;
  touch-action: none !important;
}

.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeOverlayIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 20, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.image-lightbox-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1040px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.25);
  overflow: hidden;
  animation: zoomModalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.image-lightbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.4rem;
  background: rgba(26, 36, 56, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 1rem;
}

.lightbox-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.lightbox-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand-gold-light);
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.lightbox-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.btn-lightbox-action,
.btn-lightbox-close {
  min-width: 42px;
  min-height: 42px;
  padding: 0 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  touch-action: manipulation;
}

.btn-lightbox-action:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--brand-gold);
  color: #fff;
  transform: translateY(-1px);
}

.btn-lightbox-action:active {
  transform: scale(0.95);
}

.btn-lightbox-close {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 1.1rem;
  margin-left: 0.35rem;
}

.btn-lightbox-close:hover {
  background: var(--signal-red);
  color: #fff;
  border-color: var(--signal-red);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.btn-lightbox-close:active {
  transform: scale(0.95);
}

.image-lightbox-stage {
  position: relative;
  flex: 1;
  min-height: 280px;
  max-height: calc(90vh - 140px);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, rgba(22, 33, 54, 0.95) 0%, rgba(8, 12, 20, 0.98) 100%);
  padding: 1.25rem;
  user-select: none;
  touch-action: none;
}

.lightbox-img-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center center;
  cursor: grab;
  will-change: transform;
}

.lightbox-img-wrapper.is-dragging {
  cursor: grabbing !important;
  transition: none !important;
}

.lightbox-image {
  max-width: 100%;
  max-height: calc(90vh - 180px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.85));
  pointer-events: auto;
}

.image-lightbox-footer {
  padding: 0.6rem 1.25rem;
  background: rgba(15, 23, 42, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.lightbox-hint {
  display: inline-block;
}

@keyframes fadeOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomModalIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding-top: 2.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-rail-deco {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand-gold);
  opacity: 0.6;
}

.footer-copyright {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ============================================================
   RESPONSIVE DESIGN SYSTEM (TABLETS & SMARTPHONES)
   Optimiert für Desktop, iPad/Tablets und Smartphones (iOS & Android)
   ============================================================ */

/* Basis Touch & Safe Area Einstellungen */
html {
  -webkit-text-size-adjust: 100%;
}

button, input, select {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* TABLET OPTIMIERUNG (769px bis 1024px) */
@media (max-width: 1024px) {
  .app-wrapper {
    max-width: 95%;
    padding: 1.25rem 1rem 3rem;
  }

  .site-header {
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.5rem;
  }

  .cockpit-banner {
    padding: 1.5rem;
    gap: 1rem;
  }

  .stats-ribbon {
    gap: 0.75rem;
  }

  .stat-pill {
    min-width: 80px;
    padding: 0.5rem 0.8rem;
  }

  .category-select-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .config-subgrid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .library-cards-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .quiz-play-card {
    padding: 1.75rem;
  }

  .quiz-card-image-wrapper {
    max-height: 250px;
  }

  .quiz-card-img {
    max-height: 220px;
  }

  .score-stat-grid {
    max-width: 100%;
  }
}

/* SMARTPHONE & MOBILE OPTIMIERUNG (bis 768px) */
@media (max-width: 768px) {
  .app-wrapper {
    padding: 0.75rem 0.65rem max(2rem, env(safe-area-inset-bottom));
  }

  /* Header kompakt auf Handy */
  .site-header {
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
  }

  .brand-badge {
    gap: 0.6rem;
  }

  .brand-icon-box {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .brand-text h1 {
    font-size: 1.05rem;
  }

  .brand-text p {
    display: none; /* Untertitel ausblenden für mehr Platz */
  }

  .header-user-status {
    gap: 0.5rem;
  }

  .user-badge {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }

  .user-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  .btn-logout {
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
  }

  .signal-lights-bar {
    padding: 3px 6px;
    gap: 4px;
  }

  .signal-dot {
    width: 7px;
    height: 7px;
  }

  /* Login / Welcome Screen */
  .welcome-container {
    padding: 0;
  }

  .login-card {
    padding: 1.35rem 1rem;
    border-radius: var(--radius-lg);
  }

  .hero-emblem {
    margin-bottom: 0.85rem;
  }

  .hero-emblem-icon {
    width: 58px;
    height: 58px;
    font-size: 2rem;
  }

  .welcome-title {
    font-size: 1.3rem;
  }

  .welcome-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.15rem;
  }

  .admin-notice-box, 
  .disclaimer-notice-box {
    padding: 0.75rem 0.85rem;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
  }

  .notice-icon {
    font-size: 1.15rem;
  }

  .notice-content h4 {
    font-size: 0.8rem;
  }

  .notice-content p {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .form-group {
    margin-bottom: 1.1rem;
  }

  .form-label {
    font-size: 0.82rem;
    margin-bottom: 0.35rem;
  }

  .form-input {
    font-size: 16px; /* Verhindert iOS Auto-Zoom */
    padding: 0.75rem 0.85rem 0.75rem 2.6rem;
  }

  .btn-primary {
    padding: 0.85rem 1.25rem;
    font-size: 0.95rem;
  }

  /* Cockpit Banner auf Dashboard */
  .cockpit-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
    padding: 1.15rem;
    border-radius: var(--radius-md);
  }

  .banner-title-area h2 {
    font-size: 1.25rem;
  }

  .banner-title-area p {
    font-size: 0.82rem;
  }

  .stats-ribbon {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 0.4rem;
  }

  .stat-pill {
    min-width: unset;
    padding: 0.5rem 0.25rem;
  }

  .stat-pill .stat-num {
    font-size: 1.15rem;
  }

  .stat-pill .stat-label {
    font-size: 0.62rem;
  }

  /* Navigation Tabs */
  .nav-tabs-wrapper {
    display: flex;
    gap: 0.4rem;
    padding-bottom: 0.35rem;
    margin-bottom: 1rem;
  }

  .tab-btn {
    flex: 1;
    justify-content: center;
    padding: 0.65rem 0.4rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
  }

  /* Quiz Studio (Builder) */
  .builder-card {
    padding: 1.25rem 0.9rem;
    border-radius: var(--radius-md);
  }

  .section-head {
    margin-bottom: 1rem;
  }

  .section-head h3 {
    font-size: 1.05rem;
  }

  .category-select-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
  }

  .cat-checkbox-card {
    padding: 0.75rem 0.85rem;
    gap: 0.65rem;
    border-radius: var(--radius-sm);
  }

  .cat-icon-badge {
    font-size: 1.2rem;
    padding: 0.3rem;
  }

  .cat-title {
    font-size: 0.88rem;
  }

  .cat-meta {
    font-size: 0.72rem;
  }

  .config-subgrid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .config-box {
    padding: 1rem;
  }

  .config-box h4 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .pills-radio-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
  }

  #pillChoiceAll {
    grid-column: span 2;
  }

  .pill-choice {
    flex: unset;
    min-width: unset;
    padding: 0.6rem 0.25rem;
    font-size: 0.82rem;
  }

  .mode-option {
    padding: 0.65rem 0.85rem;
    gap: 0.6rem;
  }

  .mode-option .mode-icon {
    font-size: 1.15rem;
  }

  .mode-text h5 {
    font-size: 0.85rem;
  }

  .mode-text p {
    font-size: 0.72rem;
  }

  .btn-launch-quiz {
    padding: 0.95rem;
    font-size: 0.98rem;
    border-radius: var(--radius-md);
  }

  /* Aktiver Quiz Player */
  .quiz-header-bar {
    padding: 0.75rem 0.85rem;
    margin-bottom: 1rem;
    gap: 0.6rem;
    flex-wrap: wrap;
    border-radius: var(--radius-md);
  }

  .quiz-progress-section {
    flex: 1 1 100%;
    order: 1;
    min-width: unset;
  }

  .progress-label-row {
    font-size: 0.8rem;
  }

  .live-score-pill {
    order: 2;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
  }

  .btn-quit-quiz {
    order: 3;
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
  }

  .quiz-play-card {
    padding: 1.15rem 0.9rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
  }

  .question-meta-row {
    margin-bottom: 0.65rem;
    gap: 0.4rem;
  }

  .q-category-tag {
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
  }

  .q-source-tag {
    font-size: 0.72rem;
  }

  /* Bildanzeige auf mobilen Geräten */
  .quiz-card-image-wrapper {
    max-height: 200px;
    padding: 0.65rem;
    margin: 0.4rem 0 1rem;
    border-radius: var(--radius-md);
  }

  .quiz-card-img {
    max-height: 180px;
    max-width: 100%;
  }

  .question-text-title {
    font-size: 1.12rem;
    line-height: 1.35;
    margin-bottom: 1.1rem;
  }

  /* Multiple Choice Tasten für Touch optimiert */
  .options-grid {
    gap: 0.65rem;
    margin-bottom: 1.15rem;
  }

  .mc-option-btn {
    padding: 0.85rem 0.9rem;
    font-size: 0.88rem;
    gap: 0.65rem;
    border-radius: var(--radius-sm);
    min-height: 48px; /* Touch-freundliche Mindesthöhe */
  }

  .mc-option-btn .opt-badge {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .mc-option-btn:hover:not(:disabled) {
    transform: none; /* Kein Ruckeln beim Touch */
  }

  /* Flashcard Modus mobil */
  .flashcard-view-box {
    gap: 1rem;
    margin-bottom: 1.15rem;
  }

  .flashcard-reveal-btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 0.95rem;
  }

  .flashcard-answer-revealed {
    padding: 1rem;
  }

  .flashcard-answer-revealed p {
    font-size: 0.92rem;
  }

  .flashcard-grade-buttons {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .btn-grade {
    width: 100%;
    padding: 0.85rem;
    font-size: 0.9rem;
  }

  .answer-explanation-box {
    padding: 0.9rem;
    margin-top: 0.85rem;
  }

  .exp-body {
    font-size: 0.82rem;
  }

  .quiz-actions-bar {
    width: 100%;
  }

  .btn-next-question {
    width: 100%;
    justify-content: center;
    padding: 0.9rem;
    font-size: 1rem;
  }

  /* Ergebnisseite mobil */
  .results-card {
    padding: 1.25rem 0.9rem;
    border-radius: var(--radius-lg);
  }

  .result-badge-container {
    margin-bottom: 1rem;
  }

  .result-badge-icon {
    width: 65px;
    height: 65px;
    font-size: 2rem;
  }

  .results-headline {
    font-size: 1.3rem;
  }

  .results-subline {
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .score-stat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 1.25rem;
  }

  .score-box {
    padding: 0.75rem 0.35rem;
    border-radius: var(--radius-md);
  }

  .score-box .num {
    font-size: 1.25rem;
  }

  .score-box .label {
    font-size: 0.62rem;
  }

  .results-actions-row {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
  }

  .btn-primary, 
  .btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 0.92rem;
  }

  .review-section {
    padding-top: 1.25rem;
  }

  .review-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .review-section-header h3 {
    font-size: 1.05rem;
  }

  .review-filters {
    width: 100%;
    display: flex;
    gap: 0.3rem;
  }

  .btn-filter-tag {
    flex: 1;
    text-align: center;
    padding: 0.35rem 0.2rem;
    font-size: 0.72rem;
  }

  .review-card {
    padding: 0.9rem;
  }

  .review-q-title {
    font-size: 0.88rem;
  }

  .review-card-with-img {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .review-card-img-thumb {
    width: 100%;
    height: 120px;
  }

  .review-card-img-thumb img {
    max-height: 105px;
  }

  /* Lernkarten Bibliothek mobil */
  .library-card {
    padding: 1.25rem 0.9rem;
    border-radius: var(--radius-md);
  }

  .library-controls {
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
  }

  .lib-search-wrapper,
  .lib-filter-select {
    width: 100%;
    min-width: unset;
  }

  .library-cards-list {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    max-height: 60vh;
  }

  .lib-card-img-thumb {
    height: 120px;
  }

  .lib-card-img-thumb img {
    max-height: 105px;
  }

  /* Lightbox Modal mobil & tablet */
  .image-lightbox-overlay {
    padding: 0.5rem;
  }

  .image-lightbox-container {
    max-height: 96vh;
    border-radius: var(--radius-lg);
  }

  .image-lightbox-header {
    padding: 0.65rem 0.85rem;
    gap: 0.5rem;
  }

  .lightbox-title {
    font-size: 0.88rem;
  }

  .lightbox-badge {
    font-size: 0.68rem;
    padding: 0.15rem 0.5rem;
  }

  .lightbox-toolbar {
    gap: 0.3rem;
  }

  .btn-lightbox-action,
  .btn-lightbox-close {
    min-width: 38px;
    min-height: 38px;
    padding: 0 0.45rem;
    font-size: 0.85rem;
  }

  .btn-lightbox-close {
    font-size: 1rem;
    margin-left: 0.2rem;
  }

  .image-lightbox-stage {
    padding: 0.6rem;
    min-height: 220px;
    max-height: calc(96vh - 120px);
  }

  .lightbox-image {
    max-height: calc(96vh - 140px);
  }

  .image-lightbox-footer {
    padding: 0.45rem 0.75rem;
  }

  .lightbox-hint {
    font-size: 0.7rem;
  }

  .image-zoom-badge {
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    bottom: 8px;
    right: 8px;
  }
}

/* EXTREM KLEINE SMARTPHONES (< 400px, z. B. iPhone SE / Mini) */
@media (max-width: 400px) {
  #headerUserName {
    display: none; /* Nur Avatar auf extrem schmalen Displays */
  }

  .brand-text h1 {
    font-size: 0.95rem;
  }

  .stats-ribbon {
    gap: 0.25rem;
  }

  .stat-pill .stat-num {
    font-size: 1rem;
  }

  .score-stat-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* ============================================================
   ADMINBEREICH & AUSBILDER-COCKPIT STYLES
   ============================================================ */

/* Header Right Actions */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-admin-header {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--brand-gold-light);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
}

.btn-admin-header:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: var(--brand-gold);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
}

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

/* Welcome Screen Admin Link */
.welcome-admin-trigger {
  margin-top: 1.25rem;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-welcome-admin {
  background: transparent;
  border: 1px dashed rgba(245, 158, 11, 0.35);
  color: var(--brand-gold-light);
  font-family: var(--font-main);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-welcome-admin:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--brand-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

/* Footer Admin Link */
.footer-admin-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.footer-admin-link:hover {
  color: var(--brand-gold-light);
}

/* Admin Cockpit Container */
.admin-cockpit-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Admin Header Bar */
.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding: 1.5rem 1.75rem;
  background: var(--surface-card);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), 0 0 30px rgba(245, 158, 11, 0.08);
  position: relative;
  overflow: hidden;
}

.admin-header-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-gold), var(--rail-blue), var(--signal-green));
}

.admin-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-emblem-badge {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.25) 0%, rgba(17, 24, 39, 0.9) 80%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.admin-pretitle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.admin-security-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(245, 158, 11, 0.18);
  color: var(--brand-gold-light);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--signal-green);
  box-shadow: 0 0 8px var(--signal-green);
  animation: signalPulse 2s infinite;
}

.admin-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

.admin-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* KPI Cards Grid */
.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.admin-kpi-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.admin-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.kpi-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.kpi-icon-box.users {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.kpi-icon-box.quizzes {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.kpi-icon-box.questions {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.kpi-icon-box.rate {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.kpi-content {
  display: flex;
  flex-direction: column;
}

.kpi-num {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.2rem;
}

/* Admin Section Cards */
.admin-section-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.admin-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.admin-search-wrapper {
  flex: 1;
  min-width: 260px;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-refresh:hover {
  background: var(--surface-active);
  border-color: var(--rail-blue);
  color: var(--rail-blue);
}

/* Admin Table */
.admin-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(10, 13, 20, 0.4);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table thead {
  background: rgba(26, 36, 56, 0.6);
  border-bottom: 1px solid var(--border-subtle);
}

.admin-table th {
  padding: 0.9rem 1rem;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast);
}

.admin-table tbody tr:hover {
  background-color: rgba(38, 52, 78, 0.4);
}

.admin-table td {
  padding: 0.9rem 1rem;
  color: var(--text-main);
  vertical-align: middle;
}

.table-user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-gold), #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.88rem;
  flex-shrink: 0;
}

.table-username {
  font-weight: 700;
  color: var(--brand-gold-light);
}

.table-score-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 110px;
}

.table-score-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.table-score-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

.table-score-fill.pass {
  background: var(--signal-green);
}

.table-score-fill.warn {
  background: var(--signal-amber);
}

.table-score-fill.fail {
  background: var(--signal-red);
}

.table-score-percent {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  width: 42px;
}

.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.btn-table-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-table-action:hover {
  background: var(--rail-blue);
  border-color: var(--rail-blue);
  color: #0a0d14;
}

.btn-table-action.btn-delete-user:hover {
  background: var(--signal-red);
  border-color: var(--signal-red);
  color: #fff;
}

/* Modals Overlay & Backdrop */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 13, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Admin Password Modal Card */
.admin-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  background: var(--surface-card);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card), 0 0 35px rgba(245, 158, 11, 0.2);
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.admin-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}

.admin-modal-icon {
  font-size: 1.8rem;
  width: 46px;
  height: 46px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-modal-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  flex: 1;
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.btn-modal-close:hover {
  color: var(--text-main);
}

.admin-modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.admin-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* User Detail Inspector Modal */
.admin-detail-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card), 0 0 45px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem;
  background: rgba(26, 36, 56, 0.7);
  border-bottom: 1px solid var(--border-subtle);
}

.user-detail-title-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar.lg {
  width: 50px;
  height: 50px;
  font-size: 1.4rem;
}

.admin-detail-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.admin-detail-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.user-detail-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  background: rgba(10, 13, 20, 0.4);
  border-bottom: 1px solid var(--border-subtle);
}

.mini-stat-box {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
}

.mini-stat-box .val {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
}

.mini-stat-box .lbl {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.mini-stat-box.success .val {
  color: var(--signal-green);
}

.mini-stat-box.danger .val {
  color: var(--signal-red);
}

.mini-stat-box.highlight .val {
  color: var(--brand-gold-light);
}

.user-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.user-cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.user-cat-chip strong {
  color: var(--text-main);
}

.user-cat-chip.good strong {
  color: var(--signal-green);
}

.user-cat-chip.warn strong {
  color: var(--signal-amber);
}

.detail-filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.75rem;
  background: rgba(10, 13, 20, 0.2);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.filter-pill-group {
  display: flex;
  gap: 0.4rem;
}

.filter-pill {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill.active {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #0a0d14;
}

.filter-pill.wrong.active {
  background: var(--signal-red);
  border-color: var(--signal-red);
  color: #fff;
}

.filter-pill.correct.active {
  background: var(--signal-green);
  border-color: var(--signal-green);
  color: #fff;
}

.search-detail-wrapper {
  min-width: 220px;
}

.user-answers-timeline {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.answer-entry-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--border-subtle);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform var(--transition-fast);
}

.answer-entry-card.correct {
  border-left-color: var(--signal-green);
}

.answer-entry-card.wrong {
  border-left-color: var(--signal-red);
}

.answer-entry-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.answer-entry-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
}

.status-indicator-badge.correct {
  background: rgba(16, 185, 129, 0.18);
  color: var(--signal-green);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.status-indicator-badge.wrong {
  background: rgba(239, 68, 68, 0.18);
  color: var(--signal-red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.answer-entry-time {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.answer-entry-question {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
}

.answer-entry-responses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  background: rgba(10, 13, 20, 0.4);
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.resp-box .resp-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.15rem;
}

.resp-box.user.correct .resp-val {
  color: var(--signal-green);
  font-weight: 600;
}

.resp-box.user.wrong .resp-val {
  color: var(--signal-red);
  font-weight: 600;
}

.resp-box.solution .resp-val {
  color: var(--text-main);
}

/* Question Analytics List */
.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-section-head h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-section-head p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.admin-q-search-wrapper {
  min-width: 260px;
}

.admin-questions-analytics-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.analytics-q-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.analytics-q-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.analytics-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.analytics-q-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.analytics-q-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-item {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-item strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

.stat-item.fail strong {
  color: var(--signal-red);
}

/* Data Management Cards Grid */
.admin-data-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.admin-data-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-data-card .data-card-icon {
  font-size: 2rem;
}

.admin-data-card h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
}

.admin-data-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.backup-btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-file-upload {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.admin-data-card.danger-zone {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.admin-data-card.danger-zone h4 {
  color: var(--signal-red);
}

/* Responsive adjustments for Admin section */
@media (max-width: 900px) {
  .admin-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-data-grid {
    grid-template-columns: 1fr;
  }

  .user-detail-stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .answer-entry-responses {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .admin-header-bar {
    padding: 1.2rem;
  }

  .admin-main-title {
    font-size: 1.2rem;
  }

  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .user-detail-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-header-label {
    display: none;
  }
}

/* ============================================================
   REAL-TIME PARTICIPANT TRACKING & LIVE STREAM STYLES
   ============================================================ */

/* Admin Live Sync Indicator in Header */
.admin-live-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--signal-green);
  cursor: default;
}

.live-dot-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--signal-green);
  box-shadow: 0 0 8px var(--signal-green);
  animation: liveRadarPulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes liveRadarPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Table Live Status Pills */
.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.live-status-pill.in-quiz {
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--signal-green);
}

.live-status-pill.idle {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--brand-gold-light);
}

.live-status-pill.finished {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--rail-blue);
}

.live-status-pill.offline {
  background: rgba(100, 116, 139, 0.16);
  border: 1px solid rgba(100, 116, 139, 0.3);
  color: var(--text-dim);
}

/* Active Learners Live Ribbon / Grid */
.live-active-learners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.live-learner-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.live-learner-card.in-quiz {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.1);
}

.live-learner-card.in-quiz::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--signal-green), var(--rail-blue));
}

.live-learner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.live-learner-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.live-learner-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-gold), #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
}

.live-learner-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
}

.live-learner-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.live-learner-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.live-learner-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rail-blue), var(--signal-green));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Timeline Feed */
.live-timeline-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.live-feed-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.live-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  animation: feedSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.live-feed-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.live-feed-icon-box.correct {
  background: rgba(16, 185, 129, 0.18);
  color: var(--signal-green);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.live-feed-icon-box.wrong {
  background: rgba(239, 68, 68, 0.18);
  color: var(--signal-red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.live-feed-icon-box.quiz_start {
  background: rgba(56, 189, 248, 0.18);
  color: var(--rail-blue);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.live-feed-icon-box.login {
  background: rgba(245, 158, 11, 0.18);
  color: var(--brand-gold);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.live-feed-content {
  flex: 1;
  min-width: 0;
}

.live-feed-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.live-feed-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.live-feed-time {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
}

.live-feed-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


