/* ============================================
   AI BUILDERS LAB — Global Design System
   Space Explorer Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #080818;
  --bg-secondary: #0f0f2a;
  --bg-card: #12123a;
  --bg-card-hover: #1a1a4a;
  --accent-violet: #7c3aed;
  --accent-violet-light: #a855f7;
  --accent-cyan: #06b6d4;
  --accent-cyan-light: #22d3ee;
  --accent-gold: #f59e0b;
  --accent-gold-light: #fcd34d;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border-subtle: rgba(124, 58, 237, 0.2);
  --border-glow: rgba(124, 58, 237, 0.5);
  --glow-violet: 0 0 30px rgba(124, 58, 237, 0.4);
  --glow-cyan: 0 0 30px rgba(6, 182, 212, 0.4);
  --glow-gold: 0 0 20px rgba(245, 158, 11, 0.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

/* ============================================
   STARFIELD CANVAS
   ============================================ */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.page-content {
  position: relative;
  z-index: 1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1,
h2,
h3,
h4,
h5 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
}

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

a {
  color: var(--accent-cyan-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* ============================================
   NAVIGATION HEADER
   ============================================ */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(8, 8, 24, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo:hover {
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo-icon {
  font-size: 1.4rem;
}

.nav-xp {
  display: flex;
  align-items: center;
  gap: 10px;
}

.xp-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 50px;
  padding: 6px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-gold-light);
}

.xp-star {
  font-size: 1rem;
}

.home-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid var(--border-glow);
  border-radius: 50px;
  padding: 6px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-violet-light);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.home-btn:hover {
  background: rgba(124, 58, 237, 0.3);
  color: var(--text-primary);
  text-decoration: none;
  box-shadow: var(--glow-violet);
}

/* ============================================
   HERO SECTION (Landing)
   ============================================ */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan-light);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-violet-light) 40%, var(--accent-cyan-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
}

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

/* Progress Overview Pill */
.progress-overview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.progress-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.progress-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.progress-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.progress-bar-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 50px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
  border-radius: 50px;
  transition: width 1s ease;
}

/* ============================================
   MODULE GRID (Landing)
   ============================================ */
.modules-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 28px;
  text-align: center;
}

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

.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  animation: floatCard 6s ease-in-out infinite;
}

.module-card:nth-child(2) {
  animation-delay: -1s;
}

.module-card:nth-child(3) {
  animation-delay: -2s;
}

.module-card:nth-child(4) {
  animation-delay: -3s;
}

.module-card:nth-child(5) {
  animation-delay: -4s;
}

.module-card:nth-child(6) {
  animation-delay: -5s;
}

@keyframes floatCard {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.module-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--card-accent);
  transform: translateY(-8px) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px var(--card-glow);
  text-decoration: none;
  color: var(--text-primary);
}

/* Card color variants */
.module-card.m1 {
  --card-accent: #7c3aed;
  --card-glow: rgba(124, 58, 237, 0.3);
}

.module-card.m2 {
  --card-accent: #06b6d4;
  --card-glow: rgba(6, 182, 212, 0.3);
}

.module-card.m3 {
  --card-accent: #f59e0b;
  --card-glow: rgba(245, 158, 11, 0.3);
}

.module-card.m4 {
  --card-accent: #10b981;
  --card-glow: rgba(16, 185, 129, 0.3);
}

.module-card.m5 {
  --card-accent: #f43f5e;
  --card-glow: rgba(244, 63, 94, 0.3);
}

.module-card.m6 {
  --card-accent: #8b5cf6;
  --card-glow: rgba(139, 92, 246, 0.3);
}

.module-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.module-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.module-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 50px;
}

.module-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.module-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.module-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.module-status.done {
  color: var(--accent-green);
}

.module-status.in-progress {
  color: var(--accent-gold);
}

/* ============================================
   MODULE PAGE LAYOUT
   ============================================ */
.module-hero {
  padding: 60px 24px 40px;
  max-width: 860px;
  margin: 0 auto;
}

.module-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.module-breadcrumb a {
  color: var(--text-muted);
  transition: var(--transition);
}

.module-breadcrumb a:hover {
  color: var(--accent-cyan);
  text-decoration: none;
}

.module-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.module-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.module-hero p.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 700px;
}

/* ---- Content Sections (AI Builders Lab modules) ---- */
.content-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 48px;
}

/* ---- Module Container (all non-AI track modules) ---- */
.module-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.module-container .module-hero {
  text-align: center;
  padding: 48px 0 36px;
}

.module-container .module-hero .module-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary, #7c3aed);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.module-container .module-hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.module-container .module-hero .module-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto;
}

.content-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-bottom: 16px;
}

.module-content-card {
  background: var(--bg-card, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
  border-radius: 18px;
  padding: 32px;
  transition: var(--transition);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-header-icon {
  font-size: 1.5rem;
}

.section-header h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
}

/* ---- Video Card ---- */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  transition: var(--transition);
}

.video-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--glow-violet);
}

.video-embed-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 */
  height: 0;
  overflow: hidden;
}

.video-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-caption {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Article Links ---- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
  color: var(--text-primary);
}

.article-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: var(--glow-cyan);
  text-decoration: none;
  color: var(--text-primary);
}

.article-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
}

.article-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
}

.article-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.article-arrow {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-top: auto;
}

/* ---- Challenge Box ---- */
.challenge-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.challenge-box::before {
  content: '🏆';
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 5rem;
  opacity: 0.08;
}

.challenge-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-gold);
  margin-bottom: 10px;
}

.challenge-box h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.challenge-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.challenge-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.challenge-steps li:last-child {
  border-bottom: none;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: 'Space Grotesk', sans-serif;
}

/* ---- QUIZ ---- */
.quiz-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.quiz-progress-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.quiz-dots {
  display: flex;
  gap: 8px;
}

.quiz-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.quiz-dot.active {
  background: var(--accent-violet);
}

.quiz-dot.done {
  background: var(--accent-green);
}

.quiz-question {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.4;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.quiz-option {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  font-size: 0.97rem;
  color: var(--text-secondary);
  text-align: left;
  width: 100%;
  font-family: 'Inter', sans-serif;
}

.quiz-option:hover:not(:disabled) {
  background: rgba(124, 58, 237, 0.1);
  border-color: var(--accent-violet);
  color: var(--text-primary);
  transform: translateX(4px);
}

.quiz-option.correct {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.quiz-option.incorrect {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.quiz-option.correct .option-letter {
  background: rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.quiz-option.incorrect .option-letter {
  background: rgba(239, 68, 68, 0.2);
  color: var(--accent-red);
}

.quiz-feedback {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 10px;
}

.quiz-feedback.show {
  display: flex;
}

.quiz-feedback.correct-msg {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}

.quiz-feedback.incorrect-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.quiz-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  color: white;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.6);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
}

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

/* ---- Quiz Completion ---- */
.quiz-complete {
  text-align: center;
  padding: 20px 0;
  display: none;
}

.quiz-complete.show {
  display: block;
}

.quiz-score-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--accent-violet) calc(var(--pct) * 3.6deg), rgba(255, 255, 255, 0.05) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
}

.quiz-score-ring::before {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-card);
}

.quiz-score-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.star-earned {
  font-size: 3.5rem;
  animation: starPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  display: inline-block;
}

@keyframes starPop {
  0% {
    transform: scale(0) rotate(-20deg);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.confetti-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 12px 0 8px;
}

/* ============================================
   COMPLETION BANNER
   ============================================ */
.completion-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
  margin-top: 20px;
  display: none;
}

.completion-banner.show {
  display: block;
}

.completion-banner h2 {
  font-size: 1.8rem;
  margin: 16px 0 8px;
}

.next-module-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-cyan));
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  margin-top: 20px;
  transition: var(--transition);
  box-shadow: 0 4px 25px rgba(16, 185, 129, 0.4);
}

.next-module-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.5);
  text-decoration: none;
  color: white;
}

/* ============================================
   BADGE SYSTEM
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 50px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-gold-light);
  font-family: 'Space Grotesk', sans-serif;
}

/* ============================================
   KEY CONCEPTS GRID
   ============================================ */
.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.concept-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
}

.concept-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.concept-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.concept-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

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

/* ============================================
   SAFETY/TIPS CALLOUT
   ============================================ */
.tip-callout {
  display: flex;
  gap: 16px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  align-items: flex-start;
}

.tip-callout-icon {
  font-size: 1.5rem;
  min-width: 2rem;
  margin-top: 2px;
}

.tip-callout-content h4 {
  font-size: 1rem;
  color: var(--accent-cyan-light);
  margin-bottom: 6px;
}

.tip-callout-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.warning-callout {
  display: flex;
  gap: 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 24px 0;
  align-items: flex-start;
}

.warning-callout .tip-callout-content h4 {
  color: var(--accent-gold-light);
}

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 40px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease both;
}

.fade-in-delay-1 {
  animation-delay: 0.1s;
}

.fade-in-delay-2 {
  animation-delay: 0.2s;
}

.fade-in-delay-3 {
  animation-delay: 0.3s;
}

.fade-in-delay-4 {
  animation-delay: 0.4s;
}

.fade-in-delay-5 {
  animation-delay: 0.5s;
}

.fade-in-delay-6 {
  animation-delay: 0.6s;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-header {
    padding: 12px 16px;
  }

  .hero {
    padding: 50px 16px 40px;
  }

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

  .module-hero,
  .content-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .quiz-container {
    padding: 20px;
  }

  .challenge-box {
    padding: 20px;
  }

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

@media (max-width: 480px) {
  .module-card {
    padding: 20px;
  }

  .progress-overview {
    gap: 16px;
  }
}

/* ============================================
   MINI ACTIVITY SYSTEM
   ============================================ */
.mini-activity {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.mini-activity::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-violet), var(--accent-cyan));
}

.mini-activity-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-violet-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-activity-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.mini-activity-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.55;
}

/* Sorter / card-tap activities */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.activity-card {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  user-select: none;
}

.activity-card:hover:not(.locked) {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent-violet);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.activity-card .activity-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 6px;
}

.activity-card .activity-label {
  font-size: 0.82rem;
  display: block;
}

.activity-card.correct {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
  cursor: default;
}

.activity-card.incorrect {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--accent-red);
  color: #f87171;
  cursor: default;
  animation: shake 0.3s ease;
}

.activity-card.locked {
  cursor: default;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-6px);
  }

  75% {
    transform: translateX(6px);
  }
}

/* Choice button rows (A / B choice) */
.activity-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.activity-choice-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  color: var(--text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.activity-choice-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.activity-choice-btn.option-a:hover:not(:disabled) {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.activity-choice-btn.option-b:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.activity-choice-btn.correct-choice {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.activity-choice-btn.wrong-choice {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--accent-red);
  color: #f87171;
}

/* Feedback message */
.activity-feedback {
  display: none;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 12px;
  align-items: flex-start;
  gap: 10px;
}

.activity-feedback.show {
  display: flex;
}

.activity-feedback.good {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.activity-feedback.bad {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.activity-feedback.info {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan-light);
}

.activity-feedback-icon {
  font-size: 1.1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

/* Activity navigation (next scenario) */
.activity-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-score {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.activity-score span {
  color: var(--accent-cyan-light);
}

.activity-btn {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 22px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  color: white;
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.activity-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.activity-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

/* Prompt Builder specific */
.prompt-builder {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.prompt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prompt-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  min-width: 80px;
}

.prompt-pick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.prompt-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  white-space: nowrap;
}

.prompt-chip:hover {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--accent-violet);
  color: var(--text-primary);
}

.prompt-chip.selected {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--accent-violet);
  color: var(--accent-violet-light);
  font-weight: 600;
}

.prompt-preview {
  background: rgba(0, 0, 0, 0.3);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.9rem;
  color: var(--accent-cyan-light);
  font-style: italic;
  line-height: 1.6;
  min-height: 60px;
  margin-top: 4px;
}

/* Password meter */
.pw-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.pw-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.pw-input:focus {
  border-color: var(--accent-violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.pw-meter-bar {
  height: 8px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-bottom: 8px;
}

.pw-meter-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.4s ease, background 0.4s ease;
  width: 0%;
}

.pw-meter-fill.weak {
  background: #ef4444;
  width: 25%;
}

.pw-meter-fill.fair {
  background: #f59e0b;
  width: 50%;
}

.pw-meter-fill.good {
  background: #22d3ee;
  width: 75%;
}

.pw-meter-fill.strong {
  background: #10b981;
  width: 100%;
}

.pw-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px;
}

.pw-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.pw-check.pass {
  color: var(--accent-green);
}

.pw-check-icon {
  font-size: 0.9rem;
}

/* Passphrase builder */
.passphrase-display {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-family: 'Space Mono', 'Courier New', monospace;
  font-size: 1.1rem;
  color: var(--accent-cyan-light);
  text-align: center;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.passphrase-words {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}

.word-slot {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-violet-light);
  cursor: pointer;
  transition: var(--transition);
}

.word-slot:hover {
  background: rgba(124, 58, 237, 0.25);
  border-color: var(--accent-violet);
  transform: translateY(-2px);
}

/* Activity completion badge */
.activity-complete-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 50px;
  padding: 8px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-top: 12px;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Checklist */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.92rem;
  color: var(--text-secondary);
  user-select: none;
}

.checklist-item:hover:not(.done) {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--text-primary);
}

.checklist-item.done {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--accent-green);
  cursor: default;
  text-decoration: line-through;
  text-decoration-color: rgba(16, 185, 129, 0.4);
}

.checklist-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.checklist-item.done .checklist-checkbox {
  background: var(--accent-green);
  border-color: var(--accent-green);
}

/* Scenario prompt box */
.scenario-box {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent-violet);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.scenario-counter {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

/* ══════════════════════════════════════════════════════════
   AI TUTOR CHAT WIDGET
   ══════════════════════════════════════════════════════════ */

/* Floating trigger button */
#ai-tutor-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 13px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.55);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}

#ai-tutor-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(124, 58, 237, 0.7);
}

#ai-tutor-btn.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.ai-tutor-btn-icon {
  font-size: 1.15rem;
}

/* Panel */
#ai-tutor-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 910;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: rgba(10, 14, 40, 0.97);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 22px;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#ai-tutor-panel.open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* Header */
.ai-tutor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.ai-tutor-avatar {
  font-size: 2rem;
  line-height: 1;
}

.ai-tutor-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.ai-tutor-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.73rem;
  color: #4ade80;
}

.ai-tutor-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.ai-tutor-close-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.07);
  border: none;
  color: var(--text-secondary);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.ai-tutor-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* Messages */
.ai-tutor-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.ai-tutor-msg {
  display: flex;
}

.ai-tutor-msg-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-primary);
  max-width: 88%;
  word-break: break-word;
}

.ai-tutor-msg.bot {
  justify-content: flex-start;
}

.ai-tutor-msg.bot .ai-tutor-msg-bubble {
  background: rgba(124, 58, 237, 0.18);
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-bottom-left-radius: 4px;
}

.ai-tutor-msg.user {
  justify-content: flex-end;
}

.ai-tutor-msg.user .ai-tutor-msg-bubble {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.45), rgba(6, 182, 212, 0.3));
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-bottom-right-radius: 4px;
}

.ai-tutor-msg.error-msg .ai-tutor-msg-bubble {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Typing animation */
.ai-tutor-msg.typing .ai-tutor-msg-bubble {
  padding: 12px 16px;
}

.typing-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  margin: 0 2px;
  animation: typingBounce 1.3s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.18s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.36s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  30% {
    transform: translateY(-7px);
    opacity: 1;
  }
}

/* Limit banner */
.ai-tutor-limit-banner {
  display: none;
  text-align: center;
  font-size: 0.73rem;
  color: var(--accent-gold);
  padding: 4px 16px;
  flex-shrink: 0;
}

/* Input row */
.ai-tutor-foot {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

#ai-tutor-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 13px;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

#ai-tutor-input:focus {
  border-color: rgba(124, 58, 237, 0.55);
}

#ai-tutor-input::placeholder {
  color: var(--text-muted);
}

#ai-tutor-input:disabled {
  opacity: 0.45;
}

#ai-tutor-send {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  border: none;
  color: #fff;
  width: 42px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.15s;
}

#ai-tutor-send:hover:not(:disabled) {
  transform: scale(1.08);
}

#ai-tutor-send:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Mobile */
@media (max-width: 440px) {
  #ai-tutor-panel {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    height: 72vh;
  }

  #ai-tutor-btn {
    bottom: 16px;
    right: 16px;
  }
}

/* ---- MATCHING GAME ---- */
.matching-game-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  margin-top: 24px;
}

.match-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.match-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.match-btn:hover:not(.matched):not(.selected) {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.term-btn {
  font-weight: 600;
  text-align: center;
}

.def-btn {
  font-weight: 400;
}

.match-btn.selected {
  background: rgba(6, 182, 212, 0.15);
  /* CYAN for 3D track */
  border-color: #06b6d4;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
  transform: scale(1.02);
}

.match-btn.matched {
  background: rgba(16, 185, 129, 0.1);
  /* GREEN */
  border-color: #10b981;
  color: #10b981;
  cursor: default;
  transform: none;
  opacity: 0.8;
}

@media (max-width: 600px) {
  .matching-game-container {
    flex-direction: column;
  }
}