/* AZELO STUDY - Design System & Styles
   Strictly adheres to:
   - 8pt Spatial Grid (8, 16, 24, 32, 40, 48, 64px)
   - ux-ui-design & emil-design-eng principles
   - Scratch 3.0 Block Category Color Palettes
   - Ultra-soft realistic multi-layer shadows
   - Responsive breakpoints (desktop, tablet, mobile)
*/

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

:root {
  /* Spatial System (8pt Grid) */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Slate & Neutral Colors (Never Pure Black) */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* Brand Accents */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-glow: rgba(79, 70, 229, 0.15);

  --accent-cyan: #0284c7;
  --accent-cyan-light: #f0f9ff;
  --accent-emerald: #10b981;
  --accent-emerald-light: #ecfdf5;
  --accent-amber: #f59e0b;
  --accent-amber-light: #fffbeb;
  --accent-purple: #7c3aed;
  --accent-purple-light: #f5f3ff;
  --accent-rose: #f43f5e;
  --accent-rose-light: #fff1f2;

  /* UI Tokens */
  --bg-main: var(--slate-50);
  --bg-surface: #ffffff;
  --bg-subtle: #f8fafc;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: var(--slate-900);
  --text-muted: var(--slate-600);
  --text-subtle: var(--slate-400);

  /* Scratch Block Category Palette */
  --scratch-motion: #4c97ff;
  --scratch-looks: #9966ff;
  --scratch-sound: #cf63cf;
  --scratch-events: #ffbf00;
  --scratch-control: #ffab19;
  --scratch-sensing: #5cb1d6;
  --scratch-operators: #59c059;
  --scratch-variables: #ff8c1a;
  --scratch-lists: #ff661a;
  --scratch-myblocks: #ff6680;
  --scratch-extension: #0fbd8c;

  /* Soft Multi-Layer Elevation Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 10px 15px -3px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 30px -4px rgba(15, 23, 42, 0.12), 0 8px 10px -4px rgba(15, 23, 42, 0.06);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Support */
[data-theme="dark"] {
  --bg-main: #0b0f17;
  --bg-surface: #121826;
  --bg-subtle: #1a2234;
  --border-subtle: #242f44;
  --border-strong: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --primary-light: rgba(79, 70, 229, 0.2);
  --accent-cyan-light: rgba(2, 132, 199, 0.2);
  --accent-emerald-light: rgba(16, 185, 129, 0.2);
  --accent-amber-light: rgba(245, 158, 11, 0.2);
  --accent-purple-light: rgba(124, 58, 237, 0.2);
  --accent-rose-light: rgba(244, 63, 94, 0.2);

  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-xs);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
  color: inherit;
}

.brand-img-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.4));
  transition: transform var(--transition-fast), filter var(--transition-fast);
}

.brand-group:hover .brand-img-logo {
  transform: scale(1.04);
  filter: drop-shadow(0 4px 14px rgba(6, 182, 212, 0.6));
}

.hero-banner-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xl);
  background: transparent !important;
}

.hero-logo-img {
  max-width: 440px;
  width: 100%;
  height: auto;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 15px 35px rgba(6, 182, 212, 0.45));
  transition: transform var(--transition-smooth), filter var(--transition-smooth);
}

.hero-logo-img:hover {
  transform: translateY(-3px) scale(1.02);
  filter: drop-shadow(0 20px 45px rgba(6, 182, 212, 0.65));
}

.slide-watermark-logo {
  height: 26px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
  background: transparent !important;
  border: none !important;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

.modal-header-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  margin-right: var(--space-xs);
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.4));
}

.kahoot-topbar-logo {
  height: 38px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  margin-right: var(--space-xs);
  background: transparent !important;
  border: none !important;
  filter: drop-shadow(0 2px 10px rgba(6, 182, 212, 0.5));
}

.kahoot-lobby-logo {
  max-width: 340px;
  width: 100%;
  height: auto;
  object-fit: contain;
  margin-bottom: var(--space-lg);
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 12px 30px rgba(6, 182, 212, 0.55));
}

.footer-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
  margin-bottom: var(--space-xs);
  display: block;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.35));
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.brand-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Base Buttons adhering to Malewicz & Kowalski guidelines */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px; /* 1.8x horizontal ratio */
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97); /* Emil Kowalski active state microinteraction */
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--slate-400);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-main) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-2xl) var(--space-lg);
}

.hero-content {
  max-width: 1440px;
  margin: 0 auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  border: 1px solid rgba(79, 70, 229, 0.15);
}

.hero-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: var(--space-md);
  color: var(--text-main);
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 840px;
  line-height: 1.6;
  margin-bottom: var(--space-xl);
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg); /* 24px Card Breathing Space */
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: var(--space-2xs);
}

.stat-subtext {
  font-size: 12px;
  color: var(--text-subtle);
}

/* Global Progress Bar */
.progress-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.progress-info {
  display: flex;
  flex-direction: column;
  min-width: 200px;
}

.progress-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.progress-detail {
  font-size: 12px;
  color: var(--text-muted);
}

.progress-bar-track {
  flex: 1;
  height: 10px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: var(--radius-full);
  transition: width 400ms ease;
}

.progress-percent {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent-emerald);
  min-width: 45px;
  text-align: right;
}

/* Main Layout & Controls */
.main-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  width: 100%;
  flex: 1;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Month Tabs Navigation */
.month-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  overflow-x: auto;
  padding-bottom: var(--space-2xs);
  scrollbar-width: thin;
}

.tab-pill {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-pill:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.tab-pill.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* Search & View Switcher */
.search-view-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  max-width: 480px;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}

.search-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  padding: 10px 14px 10px 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* View Mode Toggles */
.view-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.view-btn.active {
  background: var(--bg-subtle);
  color: var(--text-main);
  box-shadow: var(--shadow-xs);
}

/* Month Banner Card */
.month-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.month-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--banner-accent, var(--primary));
}

.month-banner-content h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.month-banner-content p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 900px;
  line-height: 1.6;
}

.month-banner-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xs);
}

/* Lessons Grid */
.lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg); /* 24px Base 8pt Grid spacing */
}

/* Lesson Card */
.lesson-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg); /* 24px card breathing space */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
  position: relative;
}

.lesson-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}

.lesson-card.is-completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(16, 185, 129, 0.03) 100%);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.lesson-num-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.check-input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-emerald);
  cursor: pointer;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-xs);
  color: var(--text-main);
}

.card-category {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-subtle);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  flex: 1;
  margin-bottom: var(--space-lg);
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.card-theory {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.card-practical {
  font-size: 13px;
  color: var(--text-main);
  background: var(--bg-subtle);
  border-left: 3px solid var(--accent-emerald);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-md);
  line-height: 1.45;
}

/* Key Scratch Blocks Badges */
.block-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-xs);
}

.scratch-block-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.slides-metric {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Table / Roadmap View */
.roadmap-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.roadmap-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.roadmap-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-weight: 700;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-strong);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.roadmap-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-main);
}

.roadmap-table tr:hover td {
  background: var(--bg-subtle);
}

/* Modal Backdrops & Containers */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform var(--transition-smooth);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--bg-surface);
}

.modal-title-group h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.modal-title-group p {
  font-size: 13px;
  color: var(--text-muted);
}

.modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  flex: 1;
}

/* Slide Deck Cinema Player */
.slide-player-modal .modal-card {
  max-width: 1200px;
  height: 90vh;
}

.slide-stage-container {
  background: #020617; /* Dark presentation canvas */
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-2xl);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.slide-stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.slide-badge {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
}

.slide-timer-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.slide-stage-body {
  z-index: 2;
  max-width: 900px;
}

.slide-main-title {
  font-size: clamp(22px, 3.2vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-xs);
  letter-spacing: -0.02em;
}

.slide-sub-title {
  font-size: clamp(14px, 1.8vw, 18px);
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: var(--space-lg);
}

.slide-content-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  font-size: 15px;
  line-height: 1.6;
  white-space: pre-line;
  max-height: 240px;
  overflow-y: auto;
}

/* Scratch Block Mockup Display inside Slide */
.scratch-block-display {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.scratch-block-tag {
  background: var(--block-bg, #4f46e5);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slide-stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
}

.slide-brand-watermark {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
}

.slide-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* Slide Deck Controls Bar */
.slide-player-controls {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.slide-nav-group {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Slide Thumbnails Rail */
.slide-thumbnails-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: var(--space-sm) 0;
  scrollbar-width: thin;
}

.thumb-item {
  min-width: 68px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.thumb-item:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.thumb-item.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-glow);
}

/* Teacher Notes Drawer */
.teacher-notes-panel {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  display: none;
}

.teacher-notes-panel.active {
  display: block;
}

/* Interactive Quiz Box */
.interactive-quiz-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.quiz-reveal-btn {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-emerald);
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  margin-top: 8px;
}

/* Fullscreen Presentation Engine */
:fullscreen .slide-player-modal .modal-card {
  max-width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
}

:fullscreen .slide-stage-container {
  height: 100%;
  border-radius: 0;
}

/* Export Modal Code Area */
.export-code-box {
  background: var(--slate-900);
  color: var(--slate-100);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  margin: var(--space-md) 0;
  border: 1px solid var(--slate-700);
}

/* Toast Notification (Emil Kowalski feedback microinteraction) */
.toast-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--slate-900);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 200;
  transform: translateY(100px);
  opacity: 0;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.toast-notice.show {
  transform: translateY(0);
  opacity: 1;
}

/* Footer */
.app-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-xl) var(--space-lg);
  margin-top: auto;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-subtle);
  font-size: 12px;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .header-container {
    padding: var(--space-sm) var(--space-md);
  }
  
  .hero-section {
    padding: var(--space-xl) var(--space-md);
  }

  .main-wrapper {
    padding: var(--space-lg) var(--space-md);
  }

  .lessons-grid {
    grid-template-columns: 1fr;
  }

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

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

  .progress-bar-track {
    width: 100%;
  }

  .slide-stage-container {
    padding: var(--space-md);
    aspect-ratio: auto;
    min-height: 380px;
  }
}

/* ==========================================================================
   KAHOOT ARENA STYLES & GAMIFICATION ENGINE
   Strictly follows 4 shapes (▲, ◆, ●, ■), high-contrast accessibility,
   tactile button feedback, real-time leaderboard and celebratory podium.
   ========================================================================== */

.btn-kahoot {
  background: linear-gradient(135deg, #46178F, #E21B3C);
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(70, 23, 143, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-kahoot:hover {
  background: linear-gradient(135deg, #571eb3, #ea2a4a);
  box-shadow: 0 6px 18px rgba(70, 23, 143, 0.45);
  transform: translateY(-1px);
}

.btn-kahoot:active {
  transform: scale(0.97);
}

/* Kahoot Fullscreen Modal */
.kahoot-modal .modal-card {
  max-width: 1100px;
  height: 92vh;
  background: #1e0d36; /* Deep Kahoot signature purple */
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#kahootConfettiCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.kahoot-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.kahoot-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.kahoot-logo-badge {
  background: #E21B3C;
  color: white;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 800;
}

.pin-tag {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Kahoot Screen Container */
.kahoot-screen {
  flex: 1;
  padding: var(--space-xl);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10;
}

/* 1. LOBBY SCREEN */
.lobby-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  max-width: 600px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lobby-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.lobby-meta {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: var(--space-xl);
}

.avatar-selector {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.avatar-pill {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.avatar-pill:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.avatar-pill.active {
  border-color: #06B6D4;
  background: rgba(6, 182, 212, 0.25);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
  transform: scale(1.15);
}

.kahoot-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  outline: none;
  margin-bottom: var(--space-lg);
  transition: border-color var(--transition-fast);
}

.kahoot-input:focus {
  border-color: #06B6D4;
  background: rgba(255, 255, 255, 0.2);
}

/* 2. GAME QUESTION SCREEN */
.game-header-bar {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.game-counter-pill {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.game-streak-pill {
  font-size: 13px;
  font-weight: 700;
  color: #F59E0B;
}

.game-timer-container {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.timer-seconds-circle {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
}

.timer-track {
  flex: 1;
  height: 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10B981, #06B6D4);
  border-radius: var(--radius-full);
  transition: width 100ms linear;
}

.question-card {
  width: 100%;
  max-width: 960px;
  background: #ffffff;
  color: #0F172A;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--space-xl);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.question-card h3 {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* The 4 Kahoot Answer Buttons Grid */
.kahoot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  width: 100%;
  max-width: 960px;
}

.kahoot-ans-btn {
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  font-family: var(--font-sans);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  text-align: left;
  min-height: 90px;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 200ms ease;
  user-select: none;
}

.kahoot-ans-btn:hover {
  filter: brightness(1.08);
}

.kahoot-ans-btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.kahoot-ans-btn.selected {
  outline: 4px solid #ffffff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
  transform: scale(1.02);
}

.kahoot-ans-btn.dimmed {
  opacity: 0.3;
  filter: grayscale(40%);
  cursor: default;
}

.btn-shape-icon {
  font-size: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.btn-ans-text {
  font-size: clamp(15px, 1.8vw, 19px);
  font-weight: 700;
  line-height: 1.3;
  flex: 1;
}

/* 4 Official Kahoot Colors */
.btn-red {
  background-color: #E21B3C;
}

.btn-blue {
  background-color: #1368CE;
}

.btn-yellow {
  background-color: #D89E00;
}

.btn-green {
  background-color: #26890C;
}

/* 3. REVEAL SCREEN */
.reveal-box {
  width: 100%;
  max-width: 760px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.reveal-banner {
  width: 100%;
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.reveal-banner.correct {
  background: linear-gradient(135deg, #10B981, #059669);
  color: white;
}

.reveal-banner.wrong {
  background: linear-gradient(135deg, #EF4444, #B91C1C);
  color: white;
}

.reveal-score-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  font-size: 24px;
  font-weight: 800;
}

.reveal-explanation-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
}

/* 4. LEADERBOARD SCREEN */
.leaderboard-container {
  width: 100%;
  max-width: 640px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.leaderboard-title {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.01em;
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: transform var(--transition-fast);
}

.leaderboard-row.is-player {
  background: rgba(79, 70, 229, 0.25);
  border-color: #6366F1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.rank-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 16px;
  width: 28px;
}

.score-pill {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #06B6D4;
}

/* 5. PODIUM SCREEN */
.podium-container {
  width: 100%;
  max-width: 800px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.podium-stage-graphic {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
  margin: var(--space-xl) 0;
  height: 280px;
}

.podium-pillar {
  flex: 1;
  max-width: 180px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: var(--space-md);
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.pillar-1 {
  height: 240px;
  background: linear-gradient(180deg, #F59E0B 0%, #B45309 100%);
  order: 2;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.5);
}

.pillar-2 {
  height: 180px;
  background: linear-gradient(180deg, #94A3B8 0%, #475569 100%);
  order: 1;
}

.pillar-3 {
  height: 140px;
  background: linear-gradient(180deg, #D97706 0%, #78350F 100%);
  order: 3;
}

.crown-icon {
  font-size: 32px;
  margin-top: -36px;
  filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.8));
  animation: crownBounce 1.5s ease-in-out infinite alternate;
}

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

.podium-avatar {
  font-size: 36px;
  margin-bottom: 4px;
}

.podium-name {
  font-size: 15px;
  font-weight: 800;
  color: white;
  margin-bottom: 2px;
}

.podium-score {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.podium-summary-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xs);
}

/* Responsive adjustments for Kahoot */
@media (max-width: 768px) {
  .kahoot-grid {
    grid-template-columns: 1fr;
  }
  
  .kahoot-ans-btn {
    min-height: 70px;
    padding: var(--space-md);
  }

  .podium-stage-graphic {
    height: 220px;
  }

  .pillar-1 { height: 180px; }
  .pillar-2 { height: 140px; }
  .pillar-3 { height: 110px; }
}


/* =========================================================
   DUAL ROLE AUTHENTICATION (USTOZ & O'QUVCHI)
   ========================================================= */
.user-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.role-switch-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
}

.auth-modal {
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.78);
  z-index: 2000;
}

.auth-card {
  max-width: 480px;
  width: 94%;
  padding: 32px;
  border-radius: var(--radius-xl);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  max-width: 190px;
  height: auto;
  margin: 0 auto 12px;
  display: block;
  background: transparent !important;
}

.auth-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
  background: var(--bg-main);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.auth-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-info-box {
  background: var(--primary-light);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
  border-left: 4px solid var(--primary);
}

.auth-info-box.student-info {
  background: rgba(16, 185, 129, 0.12);
  border-left-color: var(--accent-emerald);
}

.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.auth-input:focus {
  border-color: var(--primary);
}

.auth-avatars {
  margin-bottom: 4px;
  justify-content: flex-start;
}

.auth-avatars .avatar-pill {
  background: var(--bg-main);
  border: 1.5px solid var(--border-subtle);
}

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
}

/* Role-based visibility: hide teacher-only controls in Student mode */
body.role-student .teacher-only,
body.role-student #btnMethodology,
body.role-student #btnTeacherNotes,
body.role-student #btnExportCurrentDeck,
body.role-student .btn-export-card,
body.role-student .btn-export-table {
  display: none !important;
}


/* =========================================================
   STUDENT PORTAL, ANTI-SCREENSHOT, TYPING & HOMEWORK UI
   ========================================================= */
.student-xp-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(234, 179, 8, 0.24));
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  color: #b45309;
  font-weight: 800;
  font-size: 13px;
}

[data-theme="dark"] .student-xp-pill {
  color: #fbbf24;
}

.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  margin-left: 4px;
}

/* Student Portal Anti-Select & Touch Callout Protection */
body.role-student {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

body.role-student input,
body.role-student textarea,
body.role-student select {
  -webkit-user-select: text;
  user-select: text;
}

/* Block Browser Print / Save-as-PDF in Student Mode */
@media print {
  body.role-student #studentPortalShell,
  body.role-student header,
  body.role-student footer {
    display: none !important;
  }
  body.role-student::after {
    content: "AZELO STUDY: O'quvchi platformasida chop etish va saqlash taqiqlangan!";
    display: block;
    font-size: 24px;
    font-weight: 800;
    padding: 40px;
    text-align: center;
  }
}

.student-portal-shell {
  min-height: calc(100vh - 180px);
  padding: var(--space-lg) var(--space-md) var(--space-2xl);
}

.student-portal-container {
  max-width: 1120px;
  margin: 0 auto;
}

.student-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.student-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.student-identity h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.student-room-status {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.student-xp-card {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  text-align: right;
}

.xp-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.xp-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary);
}

.xp-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.student-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.student-tab-btn {
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.student-tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

/* Join Classroom Card */
.sp-join-card {
  max-width: 560px;
  margin: 24px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.sp-join-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.sp-join-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.sp-join-card p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.sp-join-form {
  display: flex;
  gap: 10px;
}

.sp-code-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-subtle);
  background: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
}

.sp-code-input:focus {
  border-color: var(--primary);
}

.sp-open-rooms-list {
  margin-top: 24px;
  text-align: left;
}

.sp-no-rooms {
  font-size: 13px;
  color: var(--text-muted);
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-main);
  text-align: center;
}

.sp-open-room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-main);
  margin-bottom: 8px;
}

/* Protected Active Classroom Slides */
.sp-classroom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.sp-live-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  margin-bottom: 6px;
}

.sp-classmates-inline {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sp-protected-badge {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #dc2626;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.sp-protected-stage {
  position: relative;
  overflow: hidden;
}

.sp-watermark-layer {
  position: absolute;
  inset: -40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  align-items: center;
  justify-items: center;
  transform: rotate(-22deg);
  pointer-events: none;
  z-index: 4;
  opacity: 0.09;
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.sp-slide-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Anti-Screenshot Shield */
.screenshot-shield {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.96);
  backdrop-filter: blur(24px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #ffffff;
  text-align: center;
}

.shield-box {
  max-width: 460px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  padding: 32px;
}

/* Classroom Typing Competition */
.sp-empty-state {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px 24px;
  text-align: center;
}

.sp-typing-arena {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}

.sp-typing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.sp-typing-lanes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}

.typing-lane-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.you-tag {
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  margin-left: 4px;
}

.typing-track {
  height: 12px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.typing-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #4f46e5);
  transition: width 150ms linear;
}

.typing-lane.is-me .typing-fill {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.sp-typing-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.typing-metric-pill {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
}

.sp-typing-countdown {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.sp-typing-prompt-box {
  font-family: var(--font-mono);
  font-size: 17px;
  line-height: 1.7;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--bg-main);
  border: 1.5px solid var(--border-subtle);
  margin-bottom: 12px;
}

.char-correct { color: #10b981; font-weight: 700; }
.char-wrong { background: rgba(239, 68, 68, 0.25); color: #ef4444; border-radius: 2px; }
.char-current { border-bottom: 2px solid var(--primary); background: rgba(79, 70, 229, 0.12); }

.sp-typing-input {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 16px;
  outline: none;
  resize: none;
}

/* Dedicated Homework Section */
.sp-homework-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-lg);
}

@media (max-width: 860px) {
  .sp-homework-grid {
    grid-template-columns: 1fr;
  }
}

.sp-hw-form-card,
.sp-hw-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}

.sp-hw-rule-hint {
  font-size: 12.5px;
  line-height: 1.5;
  background: var(--bg-main);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  margin: 10px 0 16px;
  border-left: 3px solid var(--primary);
}

.sp-resubmit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.sp-file-dropzone {
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--bg-main);
  font-size: 13px;
}

.sp-file-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.sp-selected-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}

.sp-file-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
}

.sp-remove-file {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-weight: 800;
}

.sp-hw-list,
.tg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 580px;
  overflow-y: auto;
}

.hw-card,
.tg-card {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
}

.hw-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.hw-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.hw-pending { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.hw-returned { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.hw-graded { background: rgba(16, 185, 129, 0.16); color: #047857; }

.hw-notes {
  font-size: 13px;
  margin: 6px 0;
  white-space: pre-wrap;
}

.hw-url {
  display: inline-block;
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 6px;
}

.hw-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.hw-file-link {
  font-size: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-main);
}

.hw-feedback {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  font-size: 12.5px;
  border-left: 3px solid var(--primary);
}

/* Teacher Classroom & Grading Controls */
.tc-pin-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #4f46e5, #0891b2);
  color: #ffffff;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}

.tc-pin-code {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 4px;
}

.tc-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .tc-controls-grid {
    grid-template-columns: 1fr;
  }
}

.tc-panel {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.tc-panel h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
}

.tc-students-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.tc-student-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.tg-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tg-grade-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.tg-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.tg-score-input {
  width: 78px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 800;
  font-size: 15px;
}

.tg-quick-btns {
  display: flex;
  gap: 4px;
}

.tg-qbtn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.tg-xp-preview {
  font-size: 12px;
  font-weight: 800;
}

.tg-xp-preview.ok { color: #059669; }
.tg-xp-preview.returned { color: #dc2626; }
.tg-xp-preview.bad { color: #d97706; }

.tg-comment-row {
  display: flex;
  gap: 8px;
}

.tg-comment-row .auth-input {
  flex: 1;
}

.sp-empty-hw {
  text-align: center;
  padding: 28px;
  color: var(--text-muted);
  font-size: 13px;
}


/* =========================================================
   PUBLIC LANDING SHELL (ZeBeyond Engineering Platform Style)
   ========================================================= */
.public-landing-shell {
  position: relative;
  background: #060913;
  color: #f8fafc;
  min-height: calc(100vh - 140px);
  padding: 64px 20px 80px;
  overflow: hidden;
}

.eng-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.eng-container {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
}

.eng-hero {
  text-align: left;
  padding: 24px 0 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.eng-badge-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.eng-mono-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 5px 12px;
  border-radius: 6px;
}

.eng-status-dot {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #34d399;
}

.eng-hero-title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 820px;
  margin-bottom: 18px;
}

.eng-hero-title span {
  background: linear-gradient(90deg, #22d3ee, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eng-hero-desc {
  font-size: 17px;
  line-height: 1.65;
  color: #94a3b8;
  max-width: 680px;
  margin-bottom: 28px;
}

.eng-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.eng-btn-lg {
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 800;
}

.eng-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 820px) {
  .eng-metrics-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

.eng-metric-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
}

.eng-metric-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
}

.eng-metric-num span {
  font-size: 13px;
  color: #22d3ee;
}

.eng-metric-lbl {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
}

.eng-section {
  padding-top: 56px;
}

.eng-section-head {
  margin-bottom: 28px;
}

.eng-section-head h2 {
  font-size: 28px;
  font-weight: 800;
  margin: 12px 0 6px;
}

.eng-section-head p {
  color: #94a3b8;
  font-size: 15px;
}

.eng-courses-grid,
.eng-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .eng-courses-grid,
  .eng-bento-grid {
    grid-template-columns: 1fr;
  }
}

.eng-course-card,
.eng-bento-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  transition: border-color 180ms ease, transform 180ms ease;
}

.eng-course-card:hover,
.eng-bento-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-2px);
}

.eng-course-idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #22d3ee;
  margin-bottom: 10px;
}

.eng-course-card h3,
.eng-bento-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.eng-course-card p,
.eng-bento-card p {
  font-size: 14px;
  line-height: 1.55;
  color: #94a3b8;
}

.eng-bento-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

body.role-public #teacherMainShell,
body.role-public #studentPortalShell {
  display: none !important;
}


/* =========================================================
   ZEBEYOND ENGINEERING WORKSPACE THEME (Student & Public Modes)
   ========================================================= */
body.role-public,
body.role-student {
  background-color: #060913;
  color: #f8fafc;
}

body.role-public .app-header,
body.role-student .app-header,
body.role-public .app-footer,
body.role-student .app-footer {
  background: rgba(6, 9, 19, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

body.role-public .brand-text h1,
body.role-student .brand-text h1,
body.role-public .app-footer,
body.role-student .app-footer {
  color: #f8fafc;
}

body.role-public .brand-subtitle,
body.role-student .brand-subtitle {
  color: #94a3b8;
}

body.role-student .student-portal-shell {
  position: relative;
  background: #060913;
  overflow: hidden;
  min-height: calc(100vh - 140px);
  padding: 28px 20px 64px;
}

body.role-student .student-portal-container {
  position: relative;
  z-index: 2;
}

body.role-student .student-summary-bar,
body.role-student .sp-join-card,
body.role-student .sp-classroom-bar,
body.role-student .sp-typing-arena,
body.role-student .sp-empty-state,
body.role-student .sp-hw-form-card,
body.role-student .sp-hw-history-card {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

body.role-student .student-xp-card {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(99, 102, 241, 0.14));
  border: 1px solid rgba(34, 211, 238, 0.35);
}

body.role-student .xp-value {
  font-family: var(--font-mono);
  color: #22d3ee;
}

body.role-student .xp-label,
body.role-student .xp-hint,
body.role-student .student-room-status,
body.role-student .sp-join-card p,
body.role-student .sp-classmates-inline,
body.role-student .sp-empty-hw,
body.role-student .sp-no-rooms {
  color: #94a3b8;
}

body.role-student .student-tabs {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px;
  border-radius: var(--radius-xl);
  display: inline-flex;
}

body.role-student .student-tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
}

body.role-student .student-tab-btn:hover {
  color: #f8fafc;
}

body.role-student .student-tab-btn.active {
  background: linear-gradient(135deg, #0891b2, #4f46e5);
  border-color: rgba(34, 211, 238, 0.45);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.25);
}

body.role-student .sp-code-input,
body.role-student .auth-input,
body.role-student .sp-typing-input,
body.role-student .sp-typing-prompt-box,
body.role-student .sp-typing-lanes,
body.role-student .typing-metric-pill,
body.role-student .sp-file-dropzone,
body.role-student .sp-no-rooms,
body.role-student .sp-open-room-item,
body.role-student .hw-card,
body.role-student .sp-hw-rule-hint {
  background: rgba(2, 6, 23, 0.72);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

body.role-student .sp-file-chip,
body.role-student .hw-file-link,
body.role-student .hw-feedback {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

body.role-student .sp-code-input:focus,
body.role-student .auth-input:focus,
body.role-student .sp-typing-input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
}

body.role-student .student-xp-pill {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.4);
  color: #22d3ee;
  font-family: var(--font-mono);
}

body.role-student .user-role-pill,
body.role-public .user-role-pill {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}


/* =========================================================
   TEACHER PLATFORM: INDUSTRIAL BRUTALIST & TACTICAL TELEMETRY UI
   (Strict 90deg Geometry, Monolithic Contrast, #0A0A0A / #EAEAEA / #FF2A2A)
   ========================================================= */
body.role-teacher {
  background-color: #0A0A0A !important;
  color: #EAEAEA !important;
  --bg-main: #0A0A0A;
  --bg-card: #121212;
  --text-main: #EAEAEA;
  --text-muted: #8E8E93;
  --border-subtle: #2A2A2A;
  --primary: #FF2A2A;
  --primary-light: rgba(255, 42, 42, 0.14);
}

/* Enforce 0px border-radius & remove consumer soft shadows/gradients in Teacher UI */
body.role-teacher .btn,
body.role-teacher .stat-card,
body.role-teacher .lesson-card,
body.role-teacher .tab-pill,
body.role-teacher .month-banner,
body.role-teacher .toolbar,
body.role-teacher .progress-container,
body.role-teacher .progress-bar-track,
body.role-teacher .progress-bar-fill,
body.role-teacher .search-input,
body.role-teacher .view-toggle,
body.role-teacher .view-btn,
body.role-teacher .modal-card,
body.role-teacher .slide-stage-container,
body.role-teacher .teacher-notes-panel,
body.role-teacher .scratch-chip,
body.role-teacher .hero-pill,
body.role-teacher .brand-badge,
body.role-teacher .tc-pin-banner,
body.role-teacher .tc-panel,
body.role-teacher .tg-card,
body.role-teacher .hw-badge,
body.role-teacher .tg-score-input,
body.role-teacher .tg-qbtn,
body.role-teacher .auth-input {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Header & Footer Terminal Framing */
body.role-teacher .app-header,
body.role-teacher .app-footer {
  background: #0A0A0A !important;
  border-bottom: 2px solid #2A2A2A !important;
  border-top: 2px solid #2A2A2A !important;
}

body.role-teacher .brand-text h1 {
  letter-spacing: -0.03em;
  text-transform: uppercase;
  font-weight: 900;
}

body.role-teacher .brand-badge {
  background: #FF2A2A !important;
  color: #0A0A0A !important;
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.08em;
}

/* Tactical Hero with Subtle CRT Scanline Matrix */
body.role-teacher .hero-section {
  background: #0A0A0A !important;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.025) 2px,
    rgba(255, 255, 255, 0.025) 4px
  ) !important;
  border-bottom: 2px solid #2A2A2A;
}

body.role-teacher .hero-pill {
  background: #121212 !important;
  border: 1px solid #FF2A2A !important;
  color: #FF2A2A !important;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

body.role-teacher .hero-title {
  text-transform: uppercase;
  letter-spacing: -0.04em;
  line-height: 0.96 !important;
  font-weight: 900;
  color: #EAEAEA;
}

body.role-teacher .hero-title span {
  background: none !important;
  -webkit-background-clip: initial !important;
  background-clip: initial !important;
  color: #FF2A2A !important;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Grid Determinism: Razor-thin 1px borders across telemetry cards */
body.role-teacher .stats-grid {
  gap: 1px !important;
  background: #2A2A2A;
  border: 1px solid #2A2A2A;
  padding: 0;
}

body.role-teacher .stat-card {
  background: #121212 !important;
  border: none !important;
}

body.role-teacher .stat-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #8E8E93;
}

body.role-teacher .stat-value {
  font-family: var(--font-mono);
  font-weight: 900;
  color: #EAEAEA;
}

/* Progress Terminal Readout (Single Terminal Green accent) */
body.role-teacher .progress-container {
  background: #121212 !important;
  border: 1px solid #2A2A2A !important;
}

body.role-teacher .progress-bar-track {
  background: #0A0A0A !important;
  border: 1px solid #2A2A2A;
}

body.role-teacher .progress-bar-fill {
  background: #4AF626 !important;
}

body.role-teacher .progress-percent {
  font-family: var(--font-mono);
  color: #4AF626 !important;
}

/* Buttons & Utilitarian Controls */
body.role-teacher .btn {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 12px;
  border: 1px solid #2A2A2A;
}

body.role-teacher .btn-primary {
  background: #FF2A2A !important;
  border-color: #FF2A2A !important;
  color: #0A0A0A !important;
  font-weight: 800;
}

body.role-teacher .btn-primary:hover {
  background: #EAEAEA !important;
  border-color: #EAEAEA !important;
}

body.role-teacher .btn-secondary {
  background: #121212 !important;
  border: 1px solid #3A3A3A !important;
  color: #EAEAEA !important;
}

body.role-teacher .btn-secondary:hover {
  border-color: #FF2A2A !important;
  color: #FF2A2A !important;
}

/* Toolbar, Tabs & Month Banner */
body.role-teacher .toolbar,
body.role-teacher .month-banner {
  background: #121212 !important;
  border: 1px solid #2A2A2A !important;
  border-left: 4px solid #FF2A2A !important;
}

body.role-teacher .tab-pill {
  background: #0A0A0A !important;
  border: 1px solid #2A2A2A !important;
  color: #8E8E93 !important;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.role-teacher .tab-pill.active {
  background: #FF2A2A !important;
  border-color: #FF2A2A !important;
  color: #0A0A0A !important;
  font-weight: 800;
}

/* Strict Blueprint Grid for Lessons */
body.role-teacher .lessons-grid {
  gap: 1px !important;
  background: #2A2A2A;
  border: 1px solid #2A2A2A;
}

body.role-teacher .lesson-card {
  background: #121212 !important;
  border: none !important;
  transition: background 120ms linear;
}

body.role-teacher .lesson-card:hover {
  background: #1A1A1A !important;
  transform: none !important;
}

body.role-teacher .lesson-card.completed {
  border-left: 3px solid #4AF626 !important;
}

body.role-teacher .lesson-num-badge {
  font-family: var(--font-mono);
  background: #0A0A0A !important;
  border: 1px solid #FF2A2A !important;
  color: #FF2A2A !important;
  border-radius: 0 !important;
}

body.role-teacher .tc-pin-banner {
  background: #121212 !important;
  border: 2px solid #FF2A2A !important;
}

body.role-teacher .tc-pin-code {
  color: #FF2A2A !important;
}

body.role-teacher .modal-card {
  background: #121212 !important;
  border: 2px solid #3A3A3A !important;
}

body.role-teacher .slide-stage-container {
  background: #0A0A0A !important;
  border: 2px solid #FF2A2A !important;
}
