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

:root {
  --teal: #0d7377;
  --teal-dark: #0a5d60;
  --teal-light: #13999e;
  --teal-tint: #e7f5f5;
  --teal-glow: rgba(13, 115, 119, 0.15);
  --crimson: #b71c1c;
  --gold: #c8962e;
  --gold-light: #f5d680;
  --charcoal: #24211d;
  --muted: #5f5a52;
  --bg: #faf8f4;
  --white: #ffffff;
  --line: #e8e2d7;
  --glass: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.45);
  --shadow-sm: 0 2px 8px -2px rgba(36, 33, 29, 0.06);
  --shadow-md: 0 8px 30px -8px rgba(36, 33, 29, 0.1);
  --shadow-lg: 0 20px 60px -15px rgba(36, 33, 29, 0.15);
  --shadow-teal: 0 8px 30px -8px rgba(13, 115, 119, 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 500;
  color: var(--charcoal);
  background: var(--bg);
  line-height: 1.5;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ── Animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-in.delay-1 { animation-delay: 0.1s; }
.animate-in.delay-2 { animation-delay: 0.2s; }
.animate-in.delay-3 { animation-delay: 0.3s; }
.animate-in.delay-4 { animation-delay: 0.4s; }
.animate-in.delay-5 { animation-delay: 0.5s; }
.animate-in.delay-6 { animation-delay: 0.6s; }

/* ── Header ── */
.classroom-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.7);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(232, 226, 215, 0.6);
}

.classroom-header-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.classroom-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.classroom-brand:hover {
  transform: translateY(-1px);
}

.classroom-brand img {
  width: 28px;
  height: 27px;
}

.classroom-brand-text {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.classroom-brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--charcoal);
  letter-spacing: -0.02em;
}

.classroom-brand-tag {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--teal);
  background: var(--teal-tint);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.classroom-level-badge {
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  padding: 6px 18px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 12px -2px rgba(13, 115, 119, 0.35);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a5d60 0%, #0d7377 30%, #13999e 60%, #1ab5ba 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  padding: 80px clamp(20px, 4vw, 48px) 100px;
  text-align: center;
  color: var(--white);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 8s ease-in-out infinite;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(200,150,46,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: floatReverse 10s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--gold-light);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 500;
  opacity: 0.85;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
  animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-decoration {
  position: absolute;
  z-index: 1;
  opacity: 0.08;
  pointer-events: none;
}

.hero-decoration-1 {
  top: 15%;
  left: 8%;
  width: 80px;
  height: 80px;
  border: 3px solid white;
  border-radius: 16px;
  transform: rotate(15deg);
  animation: float 7s ease-in-out infinite;
}

.hero-decoration-2 {
  bottom: 20%;
  right: 10%;
  width: 60px;
  height: 60px;
  border: 3px solid white;
  border-radius: 50%;
  animation: floatReverse 9s ease-in-out infinite;
}

.hero-decoration-3 {
  top: 35%;
  right: 18%;
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 8px;
  transform: rotate(30deg);
  animation: float 6s ease-in-out infinite 1s;
}

.hero-wave {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  z-index: 3;
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 50px;
  display: block;
}

/* ── Breadcrumb ── */
.breadcrumb {
  max-width: 1200px;
  margin-inline: auto;
  padding: 20px clamp(20px, 4vw, 48px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-wrap: wrap;
  animation: fadeIn 0.5s ease both;
}

.breadcrumb a {
  color: var(--teal);
  font-weight: 600;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--teal-dark);
}

.breadcrumb .sep {
  color: var(--line);
  font-weight: 400;
}

.breadcrumb .current {
  font-weight: 600;
  color: var(--charcoal);
}

/* ── Exercise container ── */
.exercise-container {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 48px) 60px;
}

.exercise-container::before {
  content: '';
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, var(--teal-tint) 0%, transparent 100%);
  opacity: 0.4;
  pointer-events: none;
  z-index: -1;
}

.exercise-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--charcoal);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.exercise-subtitle {
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 32px;
  font-weight: 500;
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

/* ── Progress bar ── */
.progress-bar-container {
  margin-bottom: 32px;
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--line);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px -2px rgba(13, 115, 119, 0.4);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

/* ── Flashcard ── */
.flashcard-wrapper {
  perspective: 1200px;
  margin-bottom: 32px;
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.flashcard {
  position: relative;
  width: 100%;
  min-height: 280px;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 24px;
}

.flashcard.is-flipped {
  transform: rotateY(180deg);
}

.flashcard-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 28px;
  text-align: center;
  overflow: hidden;
}

.flashcard-front {
  background: var(--white);
  border: 1.5px solid var(--line);
  box-shadow: 0 8px 40px -10px rgba(36, 33, 29, 0.12), 0 2px 8px -2px rgba(36, 33, 29, 0.06);
}

.flashcard-front::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, var(--teal-tint) 0%, transparent 70%);
  opacity: 0.5;
  pointer-events: none;
}

.flashcard-front::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(200,150,46,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.flashcard-back {
  background: linear-gradient(135deg, #085456 0%, var(--teal) 40%, var(--teal-light) 100%);
  transform: rotateY(180deg);
  box-shadow: 0 8px 40px -10px rgba(13, 115, 119, 0.3), 0 2px 8px -2px rgba(13, 115, 119, 0.15);
}

.flashcard-back::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.flashcard-back::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: -30px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.flashcard-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  padding: 4px 14px;
  border-radius: 100px;
}

.flashcard-front .flashcard-label {
  color: var(--muted);
  background: var(--bg);
}

.flashcard-back .flashcard-label {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.12);
}

.flashcard-word {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.flashcard-front .flashcard-word {
  color: var(--charcoal);
}

.flashcard-back .flashcard-word {
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.flashcard-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 16px;
  font-weight: 500;
}

.flashcard-back .flashcard-hint {
  color: rgba(255, 255, 255, 0.55);
}

.flashcard-pronounce {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  padding: 8px 18px;
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 2;
}

.flashcard-front .flashcard-pronounce {
  background: var(--teal-tint);
  color: var(--teal);
}

.flashcard-front .flashcard-pronounce:hover {
  background: var(--teal);
  color: var(--white);
}

.flashcard-back .flashcard-pronounce {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  backdrop-filter: blur(4px);
}

.flashcard-back .flashcard-pronounce:hover {
  background: rgba(255, 255, 255, 0.35);
}

.flashcard-pronounce svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.flashcard-pronounce.is-speaking {
  animation: pulse 1s ease-in-out infinite;
}

.flashcard-tap {
  position: absolute;
  bottom: 16px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.6;
}

.flashcard-back .flashcard-tap {
  color: rgba(255, 255, 255, 0.4);
}

/* ── Navigation buttons ── */
.exercise-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border: 2px solid var(--line);
  border-radius: 100px;
  background: var(--white);
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-tint);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nav-btn.primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 15px -3px rgba(13, 115, 119, 0.3);
}

.nav-btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  border-color: transparent;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -3px rgba(13, 115, 119, 0.4);
}

.nav-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Completion ── */
.completion-card {
  text-align: center;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 52px 32px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}

.completion-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.completion-card h2 {
  font-size: 1.5rem;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.completion-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.restart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: var(--white);
  border: none;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 15px -3px rgba(13, 115, 119, 0.3);
}

.restart-btn:hover {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px -3px rgba(13, 115, 119, 0.4);
}

/* ── Index / listing pages ── */
.index-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px) 80px;
}

.index-container h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--charcoal);
  margin-bottom: 8px;
}

.index-container .intro {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin-bottom: 20px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--teal-tint), transparent);
}

.goal-section {
  margin-bottom: 36px;
}

.goal-section h2 {
  font-size: 1.15rem;
  color: var(--teal-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Level cards (homepage) ── */
.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.level-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 36px 32px 32px;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.level-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.level-card:hover {
  border-color: var(--teal-tint);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

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

.level-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 20px;
  box-shadow: 0 4px 15px -4px rgba(13, 115, 119, 0.35);
}

.level-card-badge.a1 {
  background: linear-gradient(135deg, #0d7377, #13999e);
}

.level-card-badge.a2 {
  background: linear-gradient(135deg, #0a5d60, #0d7377);
}

.level-card-badge.b1 {
  background: linear-gradient(135deg, #1a4a6e, #2177ab);
}

.level-card-title {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--charcoal);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.level-card-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 24px;
  flex: 1;
}

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

.level-card-modules {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.level-card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.level-card:hover .level-card-arrow {
  background: var(--teal);
  color: var(--white);
  transform: translateX(4px);
}

/* ── Module/Exercise cards ── */
.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exercise-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 26px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.exercise-card:hover {
  border-color: var(--teal-tint);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.exercise-card-icon {
  width: 48px;
  height: 48px;
  background: var(--teal-tint);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.exercise-card:hover .exercise-card-icon {
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  box-shadow: 0 4px 12px -2px rgba(13, 115, 119, 0.3);
}

.exercise-card:hover .exercise-card-icon svg {
  stroke: white;
}

.exercise-card-body {
  flex: 1;
}

.exercise-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.exercise-card:hover .exercise-card-title {
  color: var(--teal-dark);
}

.exercise-card-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.exercise-card-arrow {
  color: var(--teal);
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.exercise-card:hover .exercise-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ── Next exercise link ── */
.next-exercise-link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--teal);
  transition: color 0.2s ease, gap 0.2s ease;
}

.next-exercise-link:hover {
  color: var(--teal-dark);
  gap: 10px;
}

.next-exercise-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ── Stats row ── */
.stats-row {
  display: flex;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-card-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Footer ── */
.classroom-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .classroom-header-inner {
    height: 58px;
  }

  .classroom-brand img {
    width: 24px;
    height: 23px;
  }

  .classroom-brand-name {
    font-size: 1rem;
  }

  .classroom-brand-tag {
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  .classroom-level-badge {
    font-size: 0.75rem;
    padding: 5px 14px;
  }

  .hero {
    padding: 56px clamp(20px, 4vw, 48px) 72px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-decoration {
    display: none;
  }

  .level-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 32px;
  }

  .level-card {
    padding: 28px 24px 24px;
  }

  .stats-row {
    gap: 10px;
  }

  .stat-card {
    min-width: 100px;
    padding: 18px 14px;
  }

  .stat-card-value {
    font-size: 1.4rem;
  }

  .flashcard {
    min-height: 240px;
    border-radius: 20px;
  }

  .flashcard-face {
    border-radius: 20px;
    padding: 28px 20px;
  }

  .nav-btn {
    padding: 10px 18px;
    font-size: 0.82rem;
  }

  .exercise-card {
    padding: 16px 18px;
    gap: 14px;
  }

  .exercise-card-icon {
    width: 42px;
    height: 42px;
  }
}

/* ── Auth guard ── */
body:not(.auth-ready) {
  visibility: hidden;
  opacity: 0;
}

body.auth-ready {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.trainer-only {
  display: none !important;
}

body.auth-ready .trainer-only.visible {
  display: block !important;
}

/* ── Auth header elements ── */
.auth-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.auth-role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 100px;
}

.auth-role-badge.trainer {
  background: linear-gradient(135deg, var(--teal-tint), rgba(13, 115, 119, 0.15));
  color: var(--teal-dark);
}

.auth-role-badge.student {
  background: rgba(200, 150, 46, 0.12);
  color: #8a6d1b;
}

.auth-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.auth-logout-btn:hover {
  border-color: var(--crimson);
  color: var(--crimson);
  background: #fce4ec;
}

@media (max-width: 600px) {
  .auth-user-info {
    gap: 6px;
  }
}
