/* ============================================
   KI CO-PILOT ACADEMY v2
   Professional Design - Pansonic Audio Lab Style
   ============================================ */

:root {
  /* Dark Mode (Default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a24;
  --bg-elevated: #22222e;
  --bg-card: #181822;
  
  --text-primary: #ffffff;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-active: rgba(255, 255, 255, 0.12);
  
  /* KI Academy Accent Colors - Cyberpunk Neon */
  --accent-cyan: #00d4aa;
  --accent-cyan-dim: rgba(0, 212, 170, 0.15);
  --accent-purple: #9d4edd;
  --accent-purple-dim: rgba(157, 78, 221, 0.15);
  --accent-pink: #ff006e;
  --accent-pink-dim: rgba(255, 0, 110, 0.15);
  --accent-gold: #ffd700;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow-cyan: 0 0 20px rgba(0, 212, 170, 0.3);
  --shadow-glow-purple: 0 0 20px rgba(157, 78, 221, 0.3);
  
  /* Typography */
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 20px;
  
  /* Layout */
  --header-height: 64px;
  --fab-size: 48px;
  --fab-gap: 12px;
  --section-padding: 80px;
  --max-width: 1200px;
}

/* ============================================
   LIGHT MODE
   ============================================ */

[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e9ecef;
  --bg-elevated: #dee2e6;
  --bg-card: #ffffff;
  
  --text-primary: #1a1a2e;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-active: rgba(0, 0, 0, 0.15);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ============================================
   CLASSROOM MODE
   ============================================ */

[data-classroom="true"] {
  font-size: 22px;
}

[data-classroom="true"] .hero {
  min-height: 70vh;
  padding: 120px 5% 60px;
}

[data-classroom="true"] .hero-title {
  font-size: 4rem;
}

[data-classroom="true"] .hero-description {
  font-size: 1.4rem;
  max-width: 800px;
}

[data-classroom="true"] .section-inner {
  max-width: 100%;
  padding: 60px 5%;
}

[data-classroom="true"] .section-title {
  font-size: 2.5rem;
}

[data-classroom="true"] .feature-card,
[data-classroom="true"] .mission-node,
[data-classroom="true"] .rule-item {
  font-size: 1.2rem;
}

[data-classroom="true"] .node-circle {
  width: 80px;
  height: 80px;
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bg-tertiary);
  z-index: 1001;
}

.scroll-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  width: 0%;
  transition: width 0.1s ease;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-cyan);
  color: var(--bg-primary);
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   HEADER
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

[data-theme="light"] .header {
  background: rgba(248, 249, 250, 0.95);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.header-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.header-logo-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.header-logo-text span {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.dropdown-item-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.dropdown-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.header-link:hover {
  color: var(--accent-cyan);
}

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-btn {
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.lang-btn.active,
.lang-btn:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-height) + 40px) 24px 80px;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(0, 212, 170, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(157, 78, 221, 0.08) 0%, transparent 50%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 212, 170, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--accent-cyan-dim);
  border: 1px solid var(--accent-cyan);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -2px;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* Progress Overview */
.progress-overview {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 0 auto 32px;
  max-width: 400px;
  text-align: left;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.progress-percent {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.3);
}

.progress-hint {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Hero Actions */
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 212, 170, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-active);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.btn-large {
  padding: 16px 32px;
  font-size: 1rem;
}

/* ============================================
   SECTIONS
   ============================================ */

.section-dark {
  background: var(--bg-secondary);
  padding: var(--section-padding) 24px;
}

.section-gradient {
  padding: var(--section-padding) 24px;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(0, 212, 170, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(157, 78, 221, 0.05) 0%, transparent 50%);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

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

/* ============================================
   FEATURE GRID
   ============================================ */

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: var(--accent-cyan-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   MISSION TRACK
   ============================================ */

.missions-section {
  padding: var(--section-padding) 24px;
}

.mission-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
  margin: 0 auto;
}

.mission-node {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  position: relative;
}

.mission-node:hover {
  transform: translateX(8px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.mission-node.locked {
  opacity: 0.5;
  pointer-events: none;
}

.mission-node.completed {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.node-badge {
  position: absolute;
  top: -10px;
  left: 24px;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--bg-primary);
}

.node-circle {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--bg-primary);
}

.mission-node.locked .node-circle {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.mission-node.completed .node-circle {
  background: var(--accent-cyan);
}

.node-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.node-info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.node-status {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
}

.mission-node.locked .node-status {
  color: var(--text-muted);
}

.mission-connector {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
  margin-left: 51px;
  opacity: 0.3;
}

.mission-node.locked + .mission-connector {
  background: var(--border-subtle);
}

/* ============================================
   GOLDEN RULES
   ============================================ */

.rules-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.rule-item:hover {
  border-color: var(--accent-cyan);
  transform: translateX(4px);
}

.rule-number {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--bg-primary);
}

.rule-content h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.rule-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.rules-cta {
  text-align: center;
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--accent-cyan-dim);
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-lg);
}

.rules-cta p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   USE CASES
   ============================================ */

.use-case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.use-case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s ease;
}

.use-case-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-purple);
  box-shadow: var(--shadow-glow-purple);
}

.use-case-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.use-case-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-purple-dim);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.use-case-header h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
}

.use-case-card > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.use-case-example {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 12px 16px;
  border-left: 3px solid var(--accent-cyan);
}

.use-case-example code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta-section {
  padding: var(--section-padding) 24px;
}

.cta-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 48px;
  background: linear-gradient(135deg, var(--accent-cyan-dim), var(--accent-purple-dim));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 212, 170, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(157, 78, 221, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  position: relative;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  position: relative;
}

/* ============================================
   FOOTER
   ============================================ */

.academy-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 40px 24px;
  text-align: center;
}

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-tagline {
  margin-top: 8px;
  font-style: italic;
  color: var(--accent-cyan);
}

/* ============================================
   FAB BUTTONS (Floating Action Buttons)
   ============================================ */

.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: var(--fab-gap);
  z-index: 999;
}

.fab {
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  position: relative;
}

.fab:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.fab.active {
  background: var(--accent-cyan);
  color: var(--bg-primary);
  border-color: var(--accent-cyan);
}

/* Tooltip */
.fab::after {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
}

.fab:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Back to Top - initially hidden */
#backToTop {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

#backToTop.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  
  .header-link .support-text,
  .header-support .support-text {
    display: none !important;
  }
  
  .mission-indicator {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .mission-node {
    padding: 16px;
  }
  
  .node-circle {
    width: 48px;
    height: 48px;
  }
  
  .rule-item {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .fab-container {
    bottom: 16px;
    right: 16px;
  }
  
  .fab::after {
    display: none;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ============================================
   LANGUAGE SECTION
   ============================================ */

.language-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px;
}

.language-lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.language-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
}

.language-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
}

.language-flag {
  font-size: 3rem;
  margin-bottom: 16px;
}

.language-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.language-tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.language-card ul {
  list-style: none;
  margin-bottom: 20px;
}

.language-card li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.language-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: 700;
}

.language-tip {
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-cyan);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.language-message {
  max-width: 800px;
  margin: 0 auto;
}

.message-box {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: linear-gradient(135deg, var(--accent-cyan-dim), var(--accent-purple-dim));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.message-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.message-content h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.message-content p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

[data-classroom="true"] .language-card {
  font-size: 1.2rem;
}

[data-classroom="true"] .language-card li {
  font-size: 1.15rem;
}

@media (max-width: 768px) {
  .language-grid {
    grid-template-columns: 1fr;
  }
  
  .message-box {
    flex-direction: column;
    text-align: center;
  }
}

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

@media (max-width: 768px) {
  .header-nav {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .mission-node {
    padding: 16px;
  }
  
  .node-circle {
    width: 48px;
    height: 48px;
  }
  
  .rule-item {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .fab-container {
    bottom: 16px;
    right: 16px;
  }
  
  .fab::after {
    display: none;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================
   STATS DASHBOARD - XP & Level
   ============================================ */

.stats-dashboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

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

.stat-card.level:hover {
  border-color: var(--accent-gold);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2);
}

.stat-card.xp:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 16px rgba(0, 212, 170, 0.2);
}

.stat-card.achievements:hover {
  border-color: var(--accent-purple);
  box-shadow: 0 4px 16px rgba(157, 78, 221, 0.2);
}

.stat-card.next-reward:hover {
  border-color: var(--accent-pink);
  box-shadow: 0 4px 16px rgba(255, 0, 110, 0.2);
}

.stat-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.stat-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .stats-dashboard {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stat-card {
    padding: 12px 16px;
  }
  
  .stat-icon {
    font-size: 1.5rem;
  }
  
  .stat-value {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .stats-dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  
  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 12px;
  }
  
  .stat-info {
    align-items: center;
  }
}


/* ============================================
   RESET PROGRESS BUTTON
   ============================================ */

.reset-progress-btn {
  margin-top: 16px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.reset-progress-btn:hover {
  opacity: 1;
  background: var(--accent-pink-dim);
  border-color: var(--accent-pink);
  color: var(--accent-pink);
  transform: translateY(-2px);
}
