/* -------------------------------------------------------------
 * CORE DESIGN SYSTEM & STYLING
 * ------------------------------------------------------------- */

/* Theme Variables (Sleek Dark Cyber Mode) */
:root {
  --bg-dark: #0a0e1a;
  --bg-card: rgba(20, 28, 48, 0.45);
  --bg-card-hover: rgba(26, 38, 66, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.15);
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Vibrant Accent Colors (HSL Tailored) */
  --cyan: #00f2fe;
  --cyan-rgb: 0, 242, 254;
  --purple: #9d4edd;
  --purple-rgb: 157, 78, 221;
  --teal: #06d6a0;
  --teal-rgb: 6, 214, 160;
  --amber: #f77f00;
  --amber-rgb: 247, 127, 0;
  --red: #ef476f;
  --red-rgb: 239, 71, 111;
  --green: #4ade80;
  --green-rgb: 74, 222, 128;
  
  /* Layout */
  --header-height: 80px;
  --sidebar-width: 280px;
  --border-radius-lg: 20px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  
  /* Shadows */
  --box-shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --box-shadow-neon-cyan: 0 0 20px rgba(0, 242, 254, 0.3);
  --box-shadow-neon-purple: 0 0 20px rgba(157, 78, 221, 0.3);
}

/* Reset & Global Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Outfit', 'Microsoft JhengHei', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Dynamic Glowing Background Effects */
.bg-glow {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
  animation: pulse-glow 12s infinite alternate ease-in-out;
}

.bg-glow-1 {
  background: radial-gradient(circle, rgba(var(--cyan-rgb), 0.8) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.bg-glow-2 {
  background: radial-gradient(circle, rgba(var(--purple-rgb), 0.8) 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation-delay: 3s;
}

.bg-glow-3 {
  background: radial-gradient(circle, rgba(var(--amber-rgb), 0.8) 0%, transparent 70%);
  top: 40%;
  left: 45%;
  width: 30vw;
  height: 30vw;
  animation-delay: 6s;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(30px, 30px); }
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

/* Header Styles */
.app-header {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  backdrop-filter: blur(10px);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-icon {
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 242, 254, 0.4));
}

.logo-text h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius-sm);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover, .nav-btn.active {
  background: rgba(var(--cyan-rgb), 0.15);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

/* Overall Progress Tracker */
.overall-progress-wrapper {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.progress-label {
  color: var(--text-secondary);
}

.progress-percent {
  font-weight: 600;
  color: var(--cyan);
}

.progress-bar-container {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-sm);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--teal) 100%);
  border-radius: var(--border-radius-sm);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Area Layout */
.app-main {
  flex: 1;
  padding: 2rem 0;
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  box-shadow: var(--box-shadow-glass);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Section Views */
.view-section {
  display: none;
  animation: fadeIn 0.5s ease forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard View Styles */
.dashboard-hero {
  text-align: center;
  max-width: 800px;
  margin: 1.5rem auto 3rem auto;
}

.dashboard-hero h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.course-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.course-card {
  padding: 2rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 80% 20%, rgba(var(--cyan-rgb), 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.course-card#card-course-2::before {
  background: radial-gradient(circle at 80% 20%, rgba(var(--purple-rgb), 0.08) 0%, transparent 50%);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.course-card#card-course-1:hover {
  border-color: rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 12px 40px rgba(var(--cyan-rgb), 0.1);
}

.course-card#card-course-2:hover {
  border-color: rgba(var(--purple-rgb), 0.4);
  box-shadow: 0 12px 40px rgba(var(--purple-rgb), 0.1);
}

.card-badge {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  background: rgba(var(--cyan-rgb), 0.1);
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  color: var(--cyan);
}

.course-card#card-course-2 .card-icon {
  background: rgba(var(--purple-rgb), 0.1);
  border: 1px solid rgba(var(--purple-rgb), 0.2);
  color: var(--purple);
}

.course-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.course-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  height: 72px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.card-meta i {
  margin-right: 4px;
}

.card-status.complete {
  color: var(--teal);
  font-weight: 600;
}

.card-status.in-progress {
  color: var(--amber);
  font-weight: 600;
}

.card-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50px;
  overflow: hidden;
}

.card-progress-bar div {
  height: 100%;
  width: 0;
  background: var(--cyan);
  border-radius: 50px;
  transition: width 0.5s ease;
}

.course-card#card-course-2 .card-progress-bar div {
  background: var(--purple);
}

/* Dashboard Achievements Styles */
.dashboard-achievements {
  padding: 2rem;
}

.achievements-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.achievements-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.text-amber {
  color: var(--amber);
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.badge-item.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.badge-item.unlocked {
  background: rgba(247, 127, 0, 0.05);
  border-color: rgba(247, 127, 0, 0.25);
  box-shadow: 0 0 15px rgba(247, 127, 0, 0.1);
  transform: scale(1.03);
}

.badge-item.unlocked .badge-icon {
  background: radial-gradient(circle, rgba(247, 127, 0, 0.2) 0%, transparent 70%);
  color: var(--amber);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.badge-icon {
  width: 50px;
  height: 50px;
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.badge-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------
 * COURSE LAYOUT
 * ------------------------------------------------------------- */
.course-layout {
  display: flex;
  gap: 2rem;
  min-height: 550px;
  align-items: flex-start;
}

.course-sidebar {
  width: var(--sidebar-width);
  padding: 1.5rem;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
}

.sidebar-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0.8rem;
  transition: transform 0.2s ease;
}

.back-btn:hover {
  transform: translateX(-4px);
}

.sidebar-header h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.step-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex: 1;
}

.step-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  transition: all 0.3s ease;
}

.step-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.step-item.active {
  background: rgba(var(--cyan-rgb), 0.1);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.1);
}

.step-item.active .step-num {
  background: var(--cyan);
  color: var(--bg-dark);
}

.step-item.active .step-title {
  color: var(--text-primary);
}

.step-item.active .step-arrow {
  opacity: 1;
  color: var(--cyan);
}

.step-item.complete .step-num {
  background: var(--teal);
  color: var(--bg-dark);
}

.step-item.complete .step-title {
  text-decoration: line-through;
  opacity: 0.6;
}

/* Course Content Pane */
.course-content-pane {
  flex: 1;
  padding: 2.5rem;
  min-height: 500px;
}

.pane-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.pane-section.active {
  display: block;
}

.section-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Helper Color Classes */
.text-cyan { color: var(--cyan); }
.text-purple { color: var(--purple); }
.text-green { color: var(--green); }
.text-teal { color: var(--teal); }
.text-red { color: var(--red); }

/* Buttons Style */
.action-btn {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  border: none;
  color: var(--bg-dark);
  padding: 0.8rem 1.6rem;
  border-radius: var(--border-radius-md);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: var(--box-shadow-neon-cyan);
}

.action-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 5px 25px rgba(0, 242, 254, 0.4);
}

.action-btn:active {
  transform: translateY(1px);
}

/* -------------------------------------------------------------
 * 1-1. SCENARIO SIMULATOR
 * ------------------------------------------------------------- */
.scenario-simulator-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2rem;
}

.scenario-progress {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.scenario-body {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.scenario-icon-wrapper {
  width: 55px;
  height: 55px;
  background: rgba(var(--cyan-rgb), 0.1);
  border: 1px solid rgba(var(--cyan-rgb), 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--cyan);
  flex-shrink: 0;
  box-shadow: 0 0 15px rgba(var(--cyan-rgb), 0.05);
}

.scenario-main-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.scenario-main-content p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.scenario-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scen-opt-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 1.1rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.scen-opt-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(var(--cyan-rgb), 0.3);
  transform: translateX(4px);
}

.scen-opt-btn .opt-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.scen-opt-btn:hover .opt-marker {
  background: var(--cyan);
  color: var(--bg-dark);
}

/* Feedback Box */
.scenario-feedback {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--cyan);
  animation: slideDown 0.3s ease forwards;
}

.scenario-feedback.correct {
  border-left-color: var(--green);
  background: rgba(var(--green-rgb), 0.05);
}

.scenario-feedback.wrong {
  border-left-color: var(--red);
  background: rgba(var(--red-rgb), 0.05);
}

.feedback-status {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.scenario-feedback.correct .feedback-status {
  color: var(--green);
}

.scenario-feedback.wrong .feedback-status {
  color: var(--red);
}

.feedback-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

/* -------------------------------------------------------------
 * 1-2. PAPA THEORY SORTER
 * ------------------------------------------------------------- */
.papa-instructions {
  margin-bottom: 2rem;
}

.papa-intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.papa-intro-card {
  padding: 1rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
}

.papa-intro-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--cyan);
}

.papa-intro-card:nth-child(2) h4 { color: var(--teal); }
.papa-intro-card:nth-child(3) h4 { color: var(--purple); }
.papa-intro-card:nth-child(4) h4 { color: var(--amber); }

.papa-intro-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.papa-game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
  position: relative;
}

.papa-card-wrapper {
  width: 100%;
  max-width: 580px;
}

.papa-card {
  padding: 2rem;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background: rgba(var(--cyan-rgb), 0.03);
  border: 1.5px dashed rgba(var(--cyan-rgb), 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.papa-card-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  position: absolute;
  top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

#papa-case-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.papa-score {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 10px;
  text-align: center;
}

.papa-targets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 580px;
}

.papa-target-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.papa-target-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}

.papa-target-btn i {
  font-size: 1.5rem;
}

.papa-target-btn:nth-child(1):hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 4px 15px rgba(0, 242, 254, 0.15); }
.papa-target-btn:nth-child(2):hover { border-color: var(--teal); color: var(--teal); box-shadow: 0 4px 15px rgba(6, 214, 160, 0.15); }
.papa-target-btn:nth-child(3):hover { border-color: var(--purple); color: var(--purple); box-shadow: 0 4px 15px rgba(157, 78, 221, 0.15); }
.papa-target-btn:nth-child(4):hover { border-color: var(--amber); color: var(--amber); box-shadow: 0 4px 15px rgba(247, 127, 0, 0.15); }

.papa-target-btn span {
  font-size: 0.9rem;
  font-weight: 600;
}

.papa-feedback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 26, 0.95);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.3s ease forwards;
  z-index: 10;
}

.papa-feedback h3 {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
}

.papa-feedback.correct h3 { color: var(--green); }
.papa-feedback.wrong h3 { color: var(--red); }

.papa-feedback p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 1.5rem;
}

/* -------------------------------------------------------------
 * 1-3. REVIEW QUIZ & MATCH GAME
 * ------------------------------------------------------------- */
.quiz-container {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 2rem;
}

.quiz-progress {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.quiz-question-box {
  margin-bottom: 2rem;
}

.quiz-question-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.5;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.q-opt-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 1.1rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.q-opt-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(var(--cyan-rgb), 0.3);
  transform: translateX(4px);
}

.q-opt-btn.correct {
  background: rgba(74, 222, 128, 0.15) !important;
  border-color: var(--green) !important;
  color: var(--green) !important;
}

.q-opt-btn.wrong {
  background: rgba(239, 71, 111, 0.15) !important;
  border-color: var(--red) !important;
  color: var(--red) !important;
}

.quiz-feedback-box {
  margin-top: 2rem;
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--green);
  animation: slideDown 0.3s ease forwards;
}

.quiz-feedback-box.wrong {
  border-left-color: var(--red);
}

.feedback-icon-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.quiz-feedback-box.correct .feedback-icon-title { color: var(--green); }
.quiz-feedback-box.wrong .feedback-icon-title { color: var(--red); }

#q-feedback-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

/* Match Game styling */
.match-game-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.match-source-column, .match-target-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.match-item {
  padding: 1rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
}

.match-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.match-item.selected {
  border-color: var(--cyan);
  background: rgba(var(--cyan-rgb), 0.06);
  box-shadow: 0 0 10px rgba(var(--cyan-rgb), 0.1);
}

.match-item.matched {
  background: rgba(6, 214, 160, 0.08) !important;
  border-color: var(--teal) !important;
  cursor: default;
  opacity: 0.8;
}

.match-item.matched::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--teal);
}

.btn-match-submit {
  margin: 0 auto;
}

/* -------------------------------------------------------------
 * 2-1. COFFEE COMPARISON
 * ------------------------------------------------------------- */
.coffee-split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.coffee-article-card {
  overflow: hidden;
  height: 100%;
}

.article-header {
  padding: 1rem 1.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bg-green-gradient {
  background: linear-gradient(135deg, rgba(6, 214, 160, 0.25) 0%, rgba(10, 14, 26, 0.4) 100%);
  border-bottom: 1px solid rgba(6, 214, 160, 0.25);
  color: var(--teal);
}

.bg-red-gradient {
  background: linear-gradient(135deg, rgba(239, 71, 111, 0.25) 0%, rgba(10, 14, 26, 0.4) 100%);
  border-bottom: 1px solid rgba(239, 71, 111, 0.25);
  color: var(--red);
}

.article-body {
  padding: 1.5rem;
}

.article-body p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.coffee-quiz-card {
  padding: 2rem;
}

.coffee-quiz-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coffee-quiz-card .question-text {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.coffee-options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.coffee-opt-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 1.2rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.coffee-opt-btn strong {
  color: var(--cyan);
}

.coffee-opt-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--cyan-rgb), 0.3);
  transform: translateY(-2px);
}

.coffee-opt-btn.correct {
  background: rgba(6, 214, 160, 0.08) !important;
  border-color: var(--teal) !important;
}

.coffee-opt-btn.wrong {
  background: rgba(239, 71, 111, 0.08) !important;
  border-color: var(--red) !important;
}

.coffee-feedback {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.03);
  border-left: 4px solid var(--cyan);
  animation: slideDown 0.3s ease forwards;
}

.coffee-feedback.correct {
  border-left-color: var(--teal);
  background: rgba(var(--teal-rgb), 0.05);
}

.coffee-feedback.correct .feedback-status::before {
  content: '回答正確！';
  color: var(--teal);
  font-weight: 700;
  font-size: 1.1rem;
}

.coffee-feedback.wrong .feedback-status::before {
  content: '回答錯誤！';
  color: var(--red);
  font-weight: 700;
  font-size: 1.1rem;
}

.coffee-feedback.wrong {
  border-left-color: var(--red);
  background: rgba(var(--red-rgb), 0.05);
}

.coffee-feedback .feedback-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* -------------------------------------------------------------
 * 2-2. NEWS STANDPOINT HIGHLIGHTER
 * ------------------------------------------------------------- */
.news-analyzer-box {
  padding: 2rem;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.news-content-paragraphs p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.news-sentence {
  cursor: pointer;
  padding: 0.15rem 0.25rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
}

.news-sentence:hover {
  background: rgba(255, 255, 255, 0.06);
}

.news-sentence.selected {
  background: rgba(157, 78, 221, 0.15);
  border-bottom: 2px dashed var(--purple);
}

.news-sentence.correct-highlight {
  background: rgba(6, 214, 160, 0.15) !important;
  border-bottom: 2px solid var(--teal) !important;
}

.news-sentence.missed-highlight {
  background: rgba(247, 127, 0, 0.1) !important;
  border-bottom: 2px dashed var(--amber) !important;
}

.news-highlight-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

.news-highlight-stats span {
  font-weight: 600;
  font-size: 0.95rem;
}

.news-feedback {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--border-radius-md);
  border-left: 4px solid var(--purple);
  background: rgba(var(--purple-rgb), 0.05);
  animation: slideDown 0.3s ease;
}

.news-feedback.success {
  border-left-color: var(--teal);
  background: rgba(var(--teal-rgb), 0.05);
}

.news-feedback .feedback-status {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--purple);
  margin-bottom: 0.5rem;
}

.news-feedback.success .feedback-status {
  color: var(--teal);
}

.news-feedback .feedback-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------
 * 2-3. RUMOR BUSTER
 * ------------------------------------------------------------- */
.rumor-game-area {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.rumor-card {
  overflow: hidden;
  height: 100%;
}

.rumor-card-header {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(239, 71, 111, 0.25) 0%, rgba(10, 14, 26, 0.4) 100%);
  border-bottom: 1px solid rgba(239, 71, 111, 0.25);
  color: var(--red);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rumor-card-body {
  padding: 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.8;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.rumor-checklist {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.rumor-checklist h3 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: background 0.2s ease;
}

.check-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.check-item input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--cyan);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.check-item span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.checklist-conclusion {
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checklist-conclusion p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.checklist-conclusion strong {
  font-size: 0.9rem;
}

.rumor-type-selector {
  padding: 2rem;
  position: relative;
}

.rumor-type-selector h3 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rumor-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.rumor-type-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 1rem;
  border-radius: var(--border-radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.rumor-type-btn strong {
  color: var(--red);
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.rumor-type-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(var(--red-rgb), 0.3);
  transform: translateY(-2px);
}

.rumor-type-btn.correct {
  background: rgba(6, 214, 160, 0.08) !important;
  border-color: var(--teal) !important;
}

.rumor-type-btn.wrong {
  background: rgba(239, 71, 111, 0.08) !important;
  border-color: var(--red) !important;
}

.rumor-feedback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 26, 0.98);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--border-color);
  animation: fadeIn 0.3s ease forwards;
  z-index: 10;
}

.rumor-feedback .feedback-status {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.rumor-feedback.correct .feedback-status { color: var(--teal); }
.rumor-feedback.wrong .feedback-status { color: var(--red); }

.rumor-feedback .feedback-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 520px;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* -------------------------------------------------------------
 * 2-4. GOOGLE FACT CHECK EXPLORER SIMULATOR
 * ------------------------------------------------------------- */
.fact-check-simulator {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  background: rgba(10, 14, 26, 0.3);
  overflow: hidden;
}

.sim-browser-bar {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.browser-url {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50px;
  padding: 0.2rem 1.2rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-family: monospace;
  flex: 1;
  max-width: 600px;
}

.sim-search-container {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}

.sim-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.g-blue { color: #4285F4; }
.g-red { color: #EA4335; }
.g-yellow { color: #FBBC05; }
.g-green { color: #34A853; }

.logo-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
  display: block;
  text-align: center;
  margin-top: -8px;
}

.sim-search-box {
  width: 100%;
  max-width: 600px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}

.sim-search-box:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(var(--cyan-rgb), 0.4);
  box-shadow: 0 4px 25px rgba(0, 242, 254, 0.15);
}

.sim-search-box i {
  color: var(--text-muted);
}

.sim-search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  flex: 1;
  outline: none;
}

.sim-search-box input::placeholder {
  color: var(--text-muted);
}

.sim-search-btn {
  background: var(--cyan);
  border: none;
  color: var(--bg-dark);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.sim-search-btn:hover {
  opacity: 0.9;
}

.search-suggestions {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-suggestions .badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  cursor: pointer;
  color: var(--cyan);
  transition: all 0.2s ease;
}

.search-suggestions .badge:hover {
  background: rgba(var(--cyan-rgb), 0.1);
  border-color: var(--cyan);
}

/* Results Area */
.sim-results-area {
  padding: 2rem;
  min-height: 180px;
  background: rgba(0, 0, 0, 0.1);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  min-height: 120px;
}

.empty-state i {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.empty-state p {
  font-size: 0.85rem;
}

/* Simulated Result Item */
.sim-result-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  animation: fadeIn 0.3s ease;
}

.result-claim {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
}

.result-verdict-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.verdict-label {
  font-weight: 700;
  color: var(--text-primary);
}

.verdict-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
}

.verdict-badge.fake {
  background: rgba(239, 71, 111, 0.15);
  color: var(--red);
  border: 1px solid rgba(239, 71, 111, 0.3);
}

.verdict-badge.partial {
  background: rgba(247, 127, 0, 0.15);
  color: var(--amber);
  border: 1px solid rgba(247, 127, 0, 0.3);
}

.verdict-badge.true {
  background: rgba(6, 214, 160, 0.15);
  color: var(--teal);
  border: 1px solid rgba(6, 214, 160, 0.3);
}

.result-explanation {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* -------------------------------------------------------------
 * COURSE COMPLETION SCREEN
 * ------------------------------------------------------------- */
.course-completion-area {
  margin-top: 2rem;
  animation: fadeIn 0.6s ease;
}

.complete-card {
  padding: 3rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.complete-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(247, 127, 0, 0.1);
  border: 2px solid var(--amber);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 25px rgba(247, 127, 0, 0.2);
  animation: float 4s ease-in-out infinite;
}

.complete-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
}

.complete-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 0.5rem;
}

.complete-badge-notice {
  font-weight: 600;
  color: var(--amber) !important;
  margin-top: 1rem;
  margin-bottom: 2rem !important;
}

/* -------------------------------------------------------------
 * FOOTER STYLES
 * ------------------------------------------------------------- */
.app-footer {
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------
 * RESPONSIVE ADAPTATIONS
 * ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .course-layout {
    flex-direction: column;
    align-items: stretch;
  }
  
  .course-sidebar {
    width: 100%;
    position: static;
    margin-bottom: 1rem;
  }
  
  .steps-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  .step-item {
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .app-container {
    padding: 0 1rem;
  }
  
  .app-header {
    flex-direction: column;
    height: auto;
    gap: 1rem;
    padding: 1rem 0;
  }
  
  .header-nav {
    width: 100%;
    justify-content: space-between;
  }
  
  .dashboard-hero h2 {
    font-size: 1.8rem;
  }
  
  .course-cards-container {
    grid-template-columns: 1fr;
  }
  
  .coffee-split-container, .rumor-game-area, .match-game-container {
    grid-template-columns: 1fr;
  }
  
  .papa-targets-grid {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------------
 * COURSE IMAGE DECORATIONS
 * ------------------------------------------------------------- */
.card-image-banner {
  margin-top: -2rem;
  margin-left: -2rem;
  margin-right: -2rem;
  margin-bottom: 1.5rem;
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.card-image-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.course-card:hover .card-image-banner img {
  transform: scale(1.05);
}

.scenario-image-wrapper, .rumor-image-wrapper {
  margin-top: 1rem;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  max-height: 240px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scenario-image-wrapper img, .rumor-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Adjustments for Rumor Card Layout to accommodate image */
.rumor-card-body {
  flex-direction: column;
  align-items: stretch;
  gap: 1.2rem;
  min-height: auto;
  padding: 1.5rem;
}

/* -------------------------------------------------------------
 * STUDENT INFO MODAL & HEADER STYLES
 * ------------------------------------------------------------- */
.student-info-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.student-info-header:hover {
  background: rgba(var(--cyan-rgb), 0.15);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.student-info-header i {
  color: var(--cyan);
  font-size: 1rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease forwards;
}

/* Modal Content Box */
.modal-content {
  max-width: 480px;
  width: 90%;
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-header p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  line-height: 1.5;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.input-group input {
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-group input:focus {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.input-group select {
  padding: 0.8rem 1rem;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.input-group select:focus {
  border-color: var(--cyan);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.15);
}

.input-group select:disabled {
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-mute);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.03);
}

.input-group select option {
  background: #0a0e1a;
  color: var(--text-primary);
}

.error-msg {
  color: var(--red);
  font-size: 0.8rem;
  font-weight: 600;
  animation: slideDown 0.2s ease forwards;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

.modal-footer .action-btn {
  width: 100%;
  justify-content: center;
}

/* -------------------------------------------------------------
 * TEACHER CONSOLE & ANALYTICS DASHBOARD
 * ------------------------------------------------------------- */
.teacher-console-header {
  margin-bottom: 2rem;
}

.console-toolbar {
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.toolbar-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.status-indicator {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.status-indicator.offline i {
  color: var(--red);
  text-shadow: 0 0 8px rgba(239, 71, 111, 0.4);
}

.status-indicator.online i {
  color: var(--green);
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

.status-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

/* Stat Cards Layout */
.teacher-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.5rem;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.3rem;
  border: 1px solid var(--border-color);
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-info h3 {
  font-size: 1.4rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
}

/* Charts Grid Layout */
.teacher-charts-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .teacher-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.chart-scroll-container {
  overflow-x: auto;
  padding: 1rem 0;
  width: 100%;
}

/* Custom CSS Bar Chart */
.bar-chart {
  height: 260px;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-top: 30px;
  border-bottom: 2px solid var(--border-color);
  min-width: 620px;
  padding-left: 10px;
  padding-right: 10px;
}

.chart-empty-msg {
  width: 100%;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.85rem;
  padding-bottom: 5rem;
}

.bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.bar-fill {
  width: 22px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
  border-radius: 4px 4px 0 0;
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}

.bar-fill::after {
  content: attr(data-count);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan);
}

.bar-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

/* Diagnostic Ranking List */
.ranking-container {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.ranking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.ranking-item:hover {
  border-color: rgba(239, 71, 111, 0.3);
  background: rgba(239, 71, 111, 0.03);
  transform: translateX(4px);
}

.rank-label-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
}

.ranking-item:nth-child(1) .rank-num {
  background: rgba(239, 71, 111, 0.2);
  border-color: var(--red);
  color: var(--red);
}

.ranking-item:nth-child(2) .rank-num {
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--amber);
  color: var(--amber);
}

.ranking-item:nth-child(3) .rank-num {
  background: rgba(234, 179, 8, 0.2);
  border-color: var(--yellow);
  color: var(--yellow);
}

.rank-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.rank-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(239, 71, 111, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(239, 71, 111, 0.2);
}

/* Submission Table Card */
.submission-table-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.submission-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 850px;
}

.submission-table th, .submission-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
}

.submission-table th {
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.02);
}

.submission-table tbody tr {
  transition: all 0.3s ease;
}

.submission-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.submission-table td.wrong-col {
  color: #fda4af;
  font-family: monospace;
  font-size: 0.8rem;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* -------------------------------------------------------------
 * COMIC PRELUDE PAGES
 * ------------------------------------------------------------- */
.comic-intro-header {
  margin-bottom: 2rem;
}

.comic-intro-header h2 {
  margin: 1rem 0 0.5rem 0;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.comic-grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.c1-p1 { grid-column: span 5; }
.c1-p2 { grid-column: span 7; }
.c1-p3 { grid-column: span 4; }
.c1-p4 { grid-column: span 8; }
.c1-p5 { grid-column: span 6; }
.c1-p6 { grid-column: span 6; }

.c2-p1 { grid-column: span 7; }
.c2-p2 { grid-column: span 5; }
.c2-p3 { grid-column: span 5; }
.c2-p4 { grid-column: span 7; }

.comic-stamp {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #06d6a0;
  color: #0a0e1a;
  font-size: 0.85rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  border: 2px solid #0a0e1a;
  box-shadow: 2px 2px 0px #0a0e1a;
  transform: rotate(15deg) scale(0);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 10;
  pointer-events: none;
}

.comic-panel.is-read .comic-stamp {
  transform: rotate(-10deg) scale(1.1);
}

.comic-panel.is-read {
  border-color: #06d6a0 !important;
  box-shadow: 6px 6px 0px #06d6a0 !important;
}

.comic-panel {
  border: 3px solid #1e293b;
  border-radius: 16px;
  background: var(--bg-card);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: 6px 6px 0px #030712;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.comic-panel:hover {
  transform: translateY(-4px) rotate(0.5deg);
  box-shadow: 10px 10px 0px #030712;
}

@media (max-width: 992px) {
  .comic-grid-12 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }
  .c1-p1, .c1-p2, .c1-p3, .c1-p4, .c1-p5, .c1-p6,
  .c2-p1, .c2-p2, .c2-p3, .c2-p4 {
    grid-column: span 12 !important;
  }
}

.comic-panel .comic-header {
  position: absolute;
  top: 0;
  left: 0;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  padding: 4px 14px;
  font-size: 0.8rem;
  border-radius: 0 0 12px 0;
}

.comic-img-container {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid #1e293b;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.comic-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.comic-panel:hover .comic-img-container img {
  transform: scale(1.05);
}

.comic-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1rem;
  min-height: 140px;
}

.comic-bubble {
  background: #f8fafc;
  color: #0f172a;
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: 2px solid #0f172a;
  position: relative;
  width: fit-content;
  max-width: 88%;
  line-height: 1.4;
}

.bubble-left::after {
  content: '';
  position: absolute;
  left: -8px;
  top: 12px;
  border-width: 5px 8px 5px 0;
  border-style: solid;
  border-color: transparent #0f172a transparent transparent;
}

.bubble-right::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 12px;
  border-width: 5px 0 5px 8px;
  border-style: solid;
  border-color: transparent transparent transparent #0f172a;
}

.comic-narration {
  background: rgba(0, 242, 254, 0.04);
  border-left: 4px solid var(--cyan);
  padding: 0.6rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border-radius: 0 6px 6px 0;
  margin-top: auto;
}

.comic-footer {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.comic-footer .glow-btn {
  font-size: 1.1rem;
  padding: 1rem 2rem;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

/* -------------------------------------------------------------
 * FUTURISTIC SCANNER OVERLAY
 * ------------------------------------------------------------- */
.scanner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 12, 21, 0.92);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: monospace, 'Outfit', sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.scanner-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.scanner-box {
  width: 380px;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid #06d6a0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 0 30px rgba(6, 214, 160, 0.2), inset 0 0 15px rgba(6, 214, 160, 0.1);
  position: relative;
  overflow: hidden;
  text-align: center;
  backdrop-filter: blur(10px);
}

/* Glowing Target Corners */
.scanner-box::before, .scanner-box::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: #06d6a0;
  border-style: solid;
  pointer-events: none;
}

.scanner-box::before { top: 10px; left: 10px; border-width: 3px 0 0 3px; }
.scanner-box::after { top: 10px; right: 10px; border-width: 3px 3px 0 0; }

/* Glowing laser sweeping line */
.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #06d6a0, transparent);
  box-shadow: 0 0 15px #06d6a0, 0 0 8px #06d6a0;
  animation: sweep 1.5s ease-in-out infinite;
}

@keyframes sweep {
  0% { top: 5%; }
  50% { top: 95%; }
  100% { top: 5%; }
}

.scanner-icon {
  font-size: 3rem;
  color: #06d6a0;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(6, 214, 160, 0.6));
  animation: pulse-icon 1.5s infinite;
}

@keyframes pulse-icon {
  0% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(6, 214, 160, 0.6)); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 20px rgba(6, 214, 160, 0.9)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(6, 214, 160, 0.6)); }
}

.scanner-title {
  color: #06d6a0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(6, 214, 160, 0.5);
}

.scanner-details {
  border-top: 1px solid rgba(6, 214, 160, 0.2);
  border-bottom: 1px solid rgba(6, 214, 160, 0.2);
  padding: 0.8rem 0;
  margin-bottom: 1rem;
  background: rgba(6, 214, 160, 0.03);
}

.scanner-detail-row {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0.3rem 0;
  display: flex;
  justify-content: space-between;
}

.scanner-detail-label {
  color: #8892b0;
}

.scanner-detail-value {
  color: #e2e8f0;
  font-weight: 600;
}

.scanner-status {
  font-size: 0.95rem;
  color: #06d6a0;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: flash-text 1s step-end infinite;
}

@keyframes flash-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}


body{padding-bottom:90px}.save-bar{position:fixed;bottom:0;left:0;right:0;background:#131c30;color:#f1f5f9;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;z-index:90;border-top:1px solid #4b607c;font-size:14px}.save-bar button{flex-shrink:0;padding:8px 14px;color:white;background:#243e59;border:1px solid #829db4;border-radius:8px;cursor:pointer}.modal-footer{flex-wrap:wrap;gap:16px}.teacher-entry{color:#8de3ee;display:block;padding:8px}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #67e8f9;outline-offset:3px}#class-label{font-size:24px;color:#67e8f9;font-weight:700}.modal-overlay{overflow:auto}.modal-content{margin:auto}
