/* ============================================================
   Vibe Coding with Gemini — Presentation Viewer
   Premium Dark Theme with Glassmorphism
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-primary: #0c0d12;
  --bg-secondary: #15161f;
  --bg-card: rgba(21, 22, 31, 0.75);

  /* Accent Colors */
  --accent-primary: #00ff66;
  --accent-secondary: #00ff66;
  --accent-tertiary: #10b981;

  /* Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  /* Status */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Borders & Glows */
  --border: rgba(255, 255, 255, 0.06);
  --glow-cyan: 0 0 20px rgba(0, 255, 102, 0.35);
  --glow-purple: 0 0 20px rgba(16, 185, 129, 0.25);

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Theme-dependent style hooks */
  --bg-pattern: radial-gradient(ellipse at 20% 50%, rgba(0, 255, 102, 0.025) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
  --logo-bg: var(--accent-primary);
  --logo-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
  --title-bg: var(--accent-primary);
  --title-shadow: 0 0 20px rgba(0, 255, 102, 0.25);
  --btn-primary-bg: var(--accent-primary);
  --btn-primary-text: #0c0d12;
  --progress-bar-bg: var(--accent-primary);
  --progress-bar-glow: 0 0 10px rgba(0, 255, 102, 0.5);
  --recap-badge-bg: rgba(0, 255, 102, 0.12);
  --recap-border: var(--accent-primary);
  --bg-input: rgba(0, 0, 0, 0.25);
  --bg-input-focus: rgba(0, 0, 0, 0.45);
  --input-focus-border: rgba(0, 255, 102, 0.5);
  --input-focus-shadow: var(--glow-cyan);
  --bg-header: rgba(21, 22, 31, 0.85);
  --bg-code: rgba(0, 0, 0, 0.45);
  --code-text: var(--accent-primary);
  --code-glow: var(--glow-cyan);
}

body.light-theme {
  /* Backgrounds */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  
  /* Accent Colors */
  --accent-primary: #059669;
  --accent-secondary: #059669;
  --accent-tertiary: #047857;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Borders & Glows */
  --border: rgba(15, 23, 42, 0.08);
  --glow-cyan: 0 0 20px rgba(5, 150, 105, 0.15);
  --glow-purple: 0 0 20px rgba(4, 120, 87, 0.1);

  /* Theme-dependent style hooks */
  --bg-pattern: radial-gradient(ellipse at 20% 50%, rgba(5, 150, 105, 0.02) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(4, 120, 87, 0.02) 0%, transparent 50%);
  --logo-bg: var(--accent-primary);
  --logo-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  --title-bg: var(--accent-primary);
  --title-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  --btn-primary-bg: var(--accent-primary);
  --btn-primary-text: #ffffff;
  --progress-bar-bg: var(--accent-primary);
  --progress-bar-glow: 0 0 8px rgba(5, 150, 105, 0.3);
  --recap-badge-bg: rgba(5, 150, 105, 0.08);
  --recap-border: var(--accent-primary);
  --bg-input: rgba(0, 0, 0, 0.04);
  --bg-input-focus: rgba(0, 0, 0, 0.07);
  --input-focus-border: rgba(5, 150, 105, 0.5);
  --input-focus-shadow: var(--glow-cyan);
  --bg-header: rgba(255, 255, 255, 0.85);
  --bg-code: #0f172a;
  --code-text: #00ff66;
  --code-glow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Theme Switcher Toggle Button Icon top-right */
.theme-toggle-btn {
  position: fixed;
  top: 12px;
  right: 24px;
  z-index: 250;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: var(--glow-cyan);
}

body.light-theme .theme-toggle-btn:hover {
  background: rgba(15, 23, 42, 0.05);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: transform var(--transition-normal);
}

.theme-toggle-btn:active svg {
  transform: scale(0.9);
}

/* Display sun/moon based on theme */
.theme-toggle-btn .sun-icon {
  display: block;
}

.theme-toggle-btn .moon-icon {
  display: none;
}

body.light-theme .theme-toggle-btn .sun-icon {
  display: none;
}

body.light-theme .theme-toggle-btn .moon-icon {
  display: block;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle background pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--bg-pattern);
  pointer-events: none;
  z-index: 0;
}

/* --- Utility Classes --- */
.hidden {
  display: none !important;
}

.view {
  display: none;
  position: relative;
  z-index: 1;
}

.view.active {
  display: flex;
  flex-direction: column;
}

/* --- Loading State --- */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 1.5rem;
}

.loading-state .spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-state p {
  color: var(--text-secondary);
  font-size: 1rem;
}

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

/* ============================================================
   DASHBOARD VIEW
   ============================================================ */

#dashboard {
  min-height: 100vh;
  padding: 2rem;
}

/* --- Dashboard Header --- */
.dashboard-header {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
}

.dashboard-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.dashboard-header .tagline {
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Deck Grid --- */
.deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* --- Deck Card --- */
.deck-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  cursor: pointer;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal);
  overflow: hidden;
}

.deck-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(139, 92, 246, 0.05));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.deck-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    var(--glow-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

.deck-card:hover::before {
  opacity: 1;
}

.deck-card:active {
  transform: translateY(-2px);
}

.deck-card .card-number {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.deck-card .card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  line-height: 1;
}

.deck-card .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  position: relative;
}

.deck-card .card-theme {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  position: relative;
}

.deck-card .card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
}

.deck-card .card-meta .slide-count {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* --- Dashboard Footer --- */
.dashboard-footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  margin-top: auto;
}

.dashboard-footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

/* ============================================================
   PRESENTATION VIEW
   ============================================================ */

#presentation {
  height: 100vh;
  overflow: hidden;
}

#presentation.active {
  display: flex;
  flex-direction: column;
}

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent-primary);
  z-index: 100;
  transition: width var(--transition-normal);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.5);
}

/* --- Slide Area --- */
.slide-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 3rem;
  overflow-y: auto;
  transition: margin-right var(--transition-normal);
}

.slide-area.notes-open {
  margin-right: 360px;
}

/* --- Slide Container --- */
.slide {
  width: 100%;
  max-width: 1100px;
  min-height: 400px;
  animation: slideIn var(--transition-slow) ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInReverse {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide.slide-reverse {
  animation-name: slideInReverse;
}

/* ============================================================
   SLIDE TYPES
   ============================================================ */

/* --- Title Slide --- */
.slide-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  position: relative;
}

.slide-title::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.slide-title .slide-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.slide-title h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: var(--title-bg);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(var(--title-shadow));
  margin-bottom: 1rem;
}

.slide-title .slide-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 700px;
}

/* --- Section Slide --- */
.slide-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 50vh;
}

.slide-section h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.slide-section h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: 2px;
  margin-top: 0.75rem;
}

.slide-section .slide-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  max-width: 700px;
}

/* --- Content Slide --- */
.slide-content h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.slide-content .slide-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

/* --- Activity Slide --- */
.slide-activity {
  border-left: 4px solid var(--success);
  padding-left: 2rem;
}

.slide-activity .slide-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slide-activity h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* --- Demo Slide --- */
.slide-demo {
  border-left: 4px solid var(--accent-tertiary);
  padding-left: 2rem;
}

.slide-demo .slide-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(236, 72, 153, 0.12);
  color: var(--accent-tertiary);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slide-demo h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* --- Recap Slide --- */
.slide-recap {
  border-left: 4px solid var(--accent-primary);
  padding-left: 2rem;
}

.slide-recap .slide-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 255, 102, 0.12);
  color: var(--accent-primary);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.slide-recap h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.slide-recap .bullet-list li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  font-size: 0.9rem;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 50%;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

/* ============================================================
   CONTENT ELEMENTS
   ============================================================ */

/* --- Bullet List --- */
.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  padding: 0.45rem 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  line-height: 1.55;
  opacity: 0;
  animation: bulletAppear 0.4s ease-out forwards;
}

.bullet-list li:nth-child(1) { animation-delay: 0.05s; }
.bullet-list li:nth-child(2) { animation-delay: 0.1s; }
.bullet-list li:nth-child(3) { animation-delay: 0.15s; }
.bullet-list li:nth-child(4) { animation-delay: 0.2s; }
.bullet-list li:nth-child(5) { animation-delay: 0.25s; }
.bullet-list li:nth-child(6) { animation-delay: 0.3s; }
.bullet-list li:nth-child(7) { animation-delay: 0.35s; }
.bullet-list li:nth-child(8) { animation-delay: 0.4s; }
.bullet-list li:nth-child(9) { animation-delay: 0.45s; }
.bullet-list li:nth-child(10) { animation-delay: 0.5s; }

@keyframes bulletAppear {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.bullet-list li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 2px;
  margin-right: 0.85rem;
  margin-top: 0.55rem;
  flex-shrink: 0;
  transform: rotate(45deg);
}

.bullet-list li .bullet-text {
  flex: 1;
}

/* Sub-bullets */
.sub-bullet-list {
  list-style: none;
  padding: 0.25rem 0 0.25rem 0;
  margin: 0;
}

.sub-bullet-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 0.3rem 0;
  padding-left: 1.5rem;
}

.sub-bullet-list li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent-secondary);
  border-radius: 50%;
  margin-right: 0.7rem;
  margin-top: 0.5rem;
  flex-shrink: 0;
  transform: none;
}

/* --- Table --- */
.slide-table-wrapper {
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.slide-table thead th {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.slide-table tbody td {
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.slide-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.slide-table tbody tr:last-child td {
  border-bottom: none;
}

.slide-table tbody tr:hover {
  background: rgba(6, 182, 212, 0.05);
}

/* --- Code Block --- */
.code-block {
  margin: 1.5rem 0;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  overflow-x: auto;
  position: relative;
  box-shadow: var(--code-glow);
}

.code-block pre {
  padding: 1.25rem 1.5rem;
  margin: 0;
  overflow-x: auto;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--code-text);
  white-space: pre;
  tab-size: 2;
}

/* --- Callout / Highlight Box --- */
.callout-box {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary)) 1;
  border-image-slice: 0 0 0 1;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.callout-box p {
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

.callout-box::before {
  content: '💡';
  display: block;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

/* --- Fragments / Incremental Reveals --- */
.fragment {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.fragment.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* --- Column Layout --- */
.columns-container {
  display: flex;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.column-card {
  flex: 1;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition-fast);
}

.column-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.column-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.column-card ul {
  list-style: none;
  padding: 0;
}

.column-card ul li {
  padding: 0.3rem 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.column-card ul li::before {
  content: '›';
  color: var(--accent-secondary);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.3;
  flex-shrink: 0;
}

/* ============================================================
   TIMER DISPLAY
   ============================================================ */

.timer-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.5rem 0.3rem 1rem;
}

.timer-display #timer-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 600;
  min-width: 60px;
  text-align: center;
  letter-spacing: 0.05em;
}

.timer-green #timer-value { color: var(--success); }
.timer-yellow #timer-value { color: var(--warning); }
.timer-red #timer-value { color: var(--danger); }

.timer-red {
  animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 16px rgba(239, 68, 68, 0.4); }
}

.timer-expired {
  animation: timerExpired 0.5s ease-in-out infinite;
}

@keyframes timerExpired {
  0%, 100% {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
  }
  50% {
    background: rgba(239, 68, 68, 0.3);
    border-color: var(--danger);
  }
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 50;
  flex-shrink: 0;
  transition: margin-right var(--transition-normal);
}

.nav-bar.notes-open {
  margin-right: 360px;
}

.nav-left,
.nav-center,
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-left {
  flex: 1;
}

.nav-center {
  flex: 0 0 auto;
}

.nav-right {
  flex: 1;
  justify-content: flex-end;
}

/* --- Nav Buttons --- */
.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
  font-family: inherit;
  line-height: 1;
}

.btn-nav:hover {
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-primary);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: var(--glow-cyan);
}

.btn-nav:active {
  transform: scale(0.96);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.35rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.1);
}

/* --- Slide Counter --- */
.slide-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0 0.75rem;
  min-width: 70px;
  text-align: center;
}

/* ============================================================
   SPEAKER NOTES SIDEBAR
   ============================================================ */

.speaker-notes {
  position: fixed;
  top: 0;
  right: -360px;
  width: 360px;
  height: 100vh;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
}

.speaker-notes.open {
  right: 0;
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notes-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notes-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.notes-content .no-notes {
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   RESUME MODAL
   ============================================================ */

.resume-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.25s ease-out;
}

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

.resume-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), var(--glow-purple);
}

.resume-modal h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.resume-modal p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.resume-modal .modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.resume-modal .btn-resume {
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--border);
  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  font-family: inherit;
}

.resume-modal .btn-resume.primary {
  background: var(--accent-primary);
  color: #0c0d12;
  border: none;
}

.resume-modal .btn-resume.primary:hover {
  box-shadow: var(--glow-cyan);
}

.resume-modal .btn-resume.secondary {
  background: transparent;
  color: var(--text-secondary);
}

.resume-modal .btn-resume.secondary:hover {
  background: rgba(148, 163, 184, 0.1);
}

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

/* Tablet */
@media (max-width: 1024px) {
  .deck-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .slide-area {
    padding: 1.5rem 2rem;
  }

  .slide-area.notes-open {
    margin-right: 300px;
  }

  .speaker-notes {
    width: 300px;
    right: -300px;
  }

  .columns-container {
    flex-direction: column;
  }
}

/* Mobile */
@media (max-width: 640px) {
  #dashboard {
    padding: 1rem;
  }

  .dashboard-header {
    padding: 2rem 0.5rem 1.5rem;
  }

  .deck-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .deck-card {
    padding: 1.5rem 1.25rem;
  }

  .slide-area {
    padding: 1rem;
  }

  .slide-area.notes-open {
    margin-right: 0;
  }

  .speaker-notes {
    width: 100%;
    right: -100%;
  }

  .nav-bar {
    padding: 0.5rem 0.75rem;
  }

  .slide-title h1 {
    font-size: 2rem;
  }

  .columns-container {
    flex-direction: column;
  }

  .slide-table {
    font-size: 0.82rem;
  }

  .slide-table thead th,
  .slide-table tbody td {
    padding: 0.5rem 0.75rem;
  }
}

/* Large screens */
@media (min-width: 1920px) {
  .slide-area {
    padding: 3rem 5rem;
  }

  .slide {
    max-width: 1300px;
  }

  .bullet-list li {
    font-size: 1.2rem;
  }
}

}

/* ============================================================
   HEADER & TOP TABS NAVIGATION
   ============================================================ */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--bg-header);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 150;
  flex-shrink: 0;
}

.app-header .logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-primary);
  text-shadow: 0 0 10px rgba(0, 255, 102, 0.2);
}

.header-tabs {
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.tab-btn.active {
  color: var(--text-primary);
  border-color: rgba(0, 255, 102, 0.3);
  background: rgba(0, 255, 102, 0.1);
  box-shadow: var(--glow-cyan);
}

/* ============================================================
   STUDENT PORTAL VIEW
   ============================================================ */

#student-portal {
  padding: 2rem;
  min-height: calc(100vh - 65px);
}

.portal-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.portal-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
}

.portal-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.portal-help {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.portal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
  outline: none;
  width: 100%;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--input-focus-border);
  box-shadow: var(--input-focus-shadow);
  background: var(--bg-input-focus);
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Drag and Drop Zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
  background: rgba(255, 255, 255, 0.01);
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--accent-primary);
  background: var(--bg-input-focus);
}

.drop-icon {
  font-size: 2rem;
}

.drop-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

#file-preview-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

#file-preview-name {
  color: var(--accent-primary);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80%;
}

.btn-clear {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-weight: 600;
}

.btn-clear:hover {
  text-decoration: underline;
}

/* Buttons */
.btn-primary {
  background: var(--accent-primary);
  color: #0c0d12;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn-primary:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-secondary.sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Status Message */
.status-msg {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: center;
  min-height: 20px;
}

.status-msg.success {
  color: var(--success);
}

.status-msg.error {
  color: var(--danger);
}

/* ============================================================
   TRAINER DASHBOARD VIEW
   ============================================================ */

#trainer-dashboard {
  padding: 2rem;
  min-height: calc(100vh - 65px);
}

.trainer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Trainer Settings Config Card */
.trainer-settings-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
}

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

.card-header-toggle h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-fields {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.settings-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

.settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.connection-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.connection-badge.connected {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.connection-badge.disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.apps-script-details {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.apps-script-details summary {
  cursor: pointer;
  color: var(--accent-secondary);
  font-weight: 600;
  outline: none;
}

.apps-script-details p {
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Scoreboard Table */
.scoreboard-section {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.scoreboard-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.scoreboard-header-actions h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.scoreboard-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

.student-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
  font-weight: 600;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.student-table td {
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.student-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.student-table tr:last-child td {
  border-bottom: none;
}

.student-name-col {
  font-weight: 600;
  color: var(--text-primary);
}

.student-email-col {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}

.score-col {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
}

.score-col.high { color: var(--success); }
.score-col.mid { color: var(--warning); }
.score-col.low { color: var(--text-muted); }

/* Class Submissions Grid in Table */
.uploads-indicator-row {
  display: flex;
  gap: 0.35rem;
}

.upload-badge-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: default;
  transition: all var(--transition-fast);
}

.upload-badge-dot.submitted {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-primary);
  border-color: rgba(6, 182, 212, 0.4);
  cursor: pointer;
}

.upload-badge-dot.submitted:hover {
  background: rgba(6, 182, 212, 0.25);
  box-shadow: var(--glow-cyan);
}

/* Actions Column */
.table-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-table-action {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.btn-table-action:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-table-action.grade {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-secondary);
  border-color: rgba(139, 92, 246, 0.3);
  font-weight: 600;
}

.btn-table-action.grade:hover {
  background: rgba(139, 92, 246, 0.25);
  box-shadow: var(--glow-purple);
}

.btn-table-action.delete {
  color: var(--danger);
}

.btn-table-action.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================================
   MODALS & LIGHTBOXES
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
  animation: fadeIn 0.25s ease-out;
  padding: 1.5rem;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), var(--glow-purple);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-card.sm {
  max-width: 400px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

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

.modal-body {
  padding: 2rem;
  overflow-y: auto;
  flex: 1;
}

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

/* Rubric Sliders */
.rubric-slider-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slider-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-val-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.rubric-slider-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  outline: none;
  transition: background var(--transition-fast);
}

.rubric-slider-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  cursor: pointer;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  transition: transform var(--transition-fast);
}

.rubric-slider-group input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.grade-total-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-top: 2rem;
  font-weight: 700;
}

.grade-total-section span:first-child {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

#grade-total-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  color: var(--accent-primary);
  text-shadow: var(--glow-cyan);
}

/* Lightbox Image expanded */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUp {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--accent-primary);
}

#lightbox-caption {
  margin-top: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

/* Email text Area */
.email-body-area {
  min-height: 180px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ============================================================
   LAYOUT UPDATES FOR MAIN VIEWS
   ============================================================ */

#app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Overwrite active dashboard to sit nicely inside header container */
#dashboard {
  min-height: calc(100vh - 65px);
}

/* ============================================================
   RESPONSIVE LAYOUT UPDATES FOR NEW VIEWS
   ============================================================ */

@media (max-width: 1024px) {
  .portal-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
}


/* Student Portal Auth States */

.portal-container-auth {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  width: 100%;
}

.portal-card.single-card {
  width: 100%;
  max-width: 500px;
  margin: 2rem auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), var(--glow-purple);
  border-color: rgba(139, 92, 246, 0.2);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.dashboard-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.student-profile-badge {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
}

.profile-info-row .badge-label {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-info-row .badge-val {
  color: var(--text-primary);
  font-weight: 700;
}

.profile-info-row .badge-val-email {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-primary);
  font-size: 0.85rem;
}

.student-grade-summary {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.student-grade-summary h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

.score-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--glow-cyan);
}

.score-summary-bar span {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.score-summary-bar strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  color: var(--accent-primary);
}

.grade-list-breakdown {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.grade-list-breakdown li {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.08);
}

.grade-list-breakdown li span {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 1024px) {
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}


/* Large Slide Timer Card (Classroom Countdown) */

.slide-timer-container {
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 2.5rem 0;
}

.slide-large-timer {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: all var(--transition-normal);
  min-width: 280px;
}

.slide-large-timer .timer-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

#slide-large-timer-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: 0.02em;
  transition: color var(--transition-fast);
}

.slide-large-timer.timer-green #slide-large-timer-value {
  color: var(--success);
  text-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.slide-large-timer.timer-yellow #slide-large-timer-value {
  color: var(--warning);
  text-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

.slide-large-timer.timer-red #slide-large-timer-value {
  color: var(--danger);
  text-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.slide-large-timer.timer-red {
  border-color: rgba(239, 68, 68, 0.3);
  animation: timerPulse 1s ease-in-out infinite;
}

.slide-large-timer.timer-expired {
  border-color: var(--danger);
  animation: timerExpired 0.5s ease-in-out infinite;
}

.large-timer-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}


@media print {
  *,
  *::before,
  *::after {
    background: white !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-text-fill-color: #1a1a1a !important;
    border-color: #ccc !important;
  }

  body::before {
    display: none;
  }

  .nav-bar,
  .progress-bar,
  .speaker-notes,
  .timer-display,
  .dashboard-footer,
  .resume-modal-overlay,
  .btn-nav,
  .btn-icon {
    display: none !important;
  }

  .slide-area {
    padding: 1rem;
    margin: 0;
  }

  .slide {
    max-width: 100%;
    page-break-inside: avoid;
  }

  .bullet-list li {
    opacity: 1 !important;
    animation: none !important;
  }

  .code-block {
    border: 1px solid #ccc !important;
    border-left: 3px solid #333 !important;
  }

  .code-block code {
    color: #1a1a1a !important;
  }

  .slide-table thead th {
    background: #e5e5e5 !important;
  }
}
