/* ==========================================================================
   GRADE 10 INTERACTIVE GAME-BASED LEARNING HUB - DESIGN SYSTEM & STYLES
   Dynamic Theme Engine (10 Unit Palettes) + Gamified Claymorphism UI
   ========================================================================== */

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

:root {
  --theme-primary: #4F46E5;
  --theme-secondary: #EA580C;
  --theme-accent: #F59E0B;
  --theme-bg: #EEF2FF;
  --theme-surface: #FFFFFF;
  --theme-surface-alt: #E0E7FF;
  --theme-text: #1E1B4B;
  --theme-border: #C7D2FE;
  --theme-gradient: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #EA580C 100%);

  --font-display: 'Baloo 2', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 10px 30px -8px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 14px 34px -10px rgba(30, 27, 75, 0.12), 0 4px 10px -2px rgba(30, 27, 75, 0.05);
  --shadow-tactile: 0 5px 0 rgba(15, 23, 42, 0.16);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--theme-bg);
  color: var(--theme-text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.3s ease;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   TOP NAVBAR & BREADCRUMBS
   ========================================================================== */
.top-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid var(--theme-border);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.navbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.brand-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--theme-gradient);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.15;
  color: #0F172A;
}

.brand-sub {
  font-size: 0.75rem;
  color: #64748B;
  font-weight: 600;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 600;
}

.nav-crumb {
  color: #475569;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-crumb:hover {
  background: var(--theme-surface-alt);
  color: var(--theme-primary);
}

.nav-crumb.active {
  background: var(--theme-surface-alt);
  color: var(--theme-primary);
  font-weight: 700;
}

.nav-sep {
  color: #94A3B8;
}

.navbar-stats {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.xp-pill {
  background: #FEF3C7;
  color: #B45309;
  border: 1.5px solid #FDE68A;
}

.lessons-pill {
  background: #ECFDF5;
  color: #047857;
  border: 1.5px solid #A7F3D0;
}

.btn-icon-sound {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #E2E8F0;
  background: #F8FAFC;
  color: #334155;
  transition: all 0.2s ease;
}

.btn-icon-sound:hover {
  border-color: var(--theme-primary);
  color: var(--theme-primary);
  transform: translateY(-1px);
}

.main-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
}

/* ==========================================================================
   TẦNG 1: SUBJECT HUB & HERO PORTAL
   ========================================================================== */
.hero-portal-section {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 55%, #4338CA 100%);
  border-radius: 28px;
  padding: 2.75rem;
  color: #FFFFFF;
  box-shadow: 0 22px 48px -12px rgba(30, 27, 75, 0.35);
  margin-bottom: 2.75rem;
  position: relative;
  overflow: hidden;
}

.hero-portal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1.1rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.3);
}

.hero-main-heading {
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 3.2vw, 2.85rem);
  line-height: 1.18;
  font-weight: 800;
  margin-bottom: 1rem;
}

.text-gradient-accent {
  background: linear-gradient(90deg, #FDE047, #FB923C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-main-lead {
  color: #E0E7FF;
  font-size: 1.02rem;
  margin-bottom: 1.75rem;
  max-width: 620px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: linear-gradient(135deg, #EA580C 0%, #F59E0B 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1rem;
  padding: 0.95rem 1.65rem;
  border-radius: 16px;
  box-shadow: 0 6px 0 #9A3412, 0 12px 24px rgba(234, 88, 12, 0.35);
  transition: all 0.2s ease;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #9A3412, 0 16px 28px rgba(234, 88, 12, 0.45);
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.14);
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-weight: 700;
  font-size: 0.96rem;
  padding: 0.95rem 1.45rem;
  border-radius: 16px;
  transition: all 0.2s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-image-frame {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.hero-image-frame img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.hero-floating-card {
  position: absolute;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(10px);
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  padding: 0.65rem 1rem;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  color: #F8FAFC;
}

.hero-floating-card strong {
  color: #FDE047;
  font-size: 0.9rem;
}

.card-top-left {
  top: 14px;
  left: 14px;
}

.card-bottom-right {
  bottom: 14px;
  right: 14px;
}

/* Section Headers */
.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--theme-primary);
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: #0F172A;
}

.section-subnote {
  color: #475569;
  font-size: 0.92rem;
  font-weight: 600;
}

.architecture-tag {
  background: #E0E7FF;
  color: #3730A3;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Featured Subject Card (English 10) */
.featured-subject-banner {
  display: grid;
  grid-template-columns: 420px 1fr;
  background: #FFFFFF;
  border-radius: 26px;
  border: 3px solid #818CF8;
  box-shadow: 0 20px 45px -12px rgba(79, 70, 229, 0.22);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.featured-subject-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 55px -12px rgba(79, 70, 229, 0.3);
}

.featured-subject-media {
  position: relative;
  min-height: 340px;
}

.featured-subject-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-live-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.88);
  color: #FFFFFF;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.featured-subject-content {
  padding: 2.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.featured-subject-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.featured-series-tag {
  font-size: 0.84rem;
  font-weight: 700;
  color: #4F46E5;
  text-transform: uppercase;
}

.featured-subject-title {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 800;
  color: #0F172A;
}

.featured-progress-box {
  background: #F1F5F9;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  color: #334155;
}

.featured-subject-desc {
  color: #334155;
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

.featured-highlights-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.65rem;
}

.featured-highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1E293B;
}

.featured-highlight-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.featured-subject-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 0.9rem 1.6rem;
  border-radius: 15px;
  box-shadow: 0 5px 0 #3730A3;
  transition: all 0.2s ease;
}

.btn-primary-lg:hover {
  transform: translateY(-2px);
}

.btn-accent-lg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #FFF7ED;
  color: #C2410C;
  border: 2px solid #FDBA74;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 0.9rem 1.4rem;
  border-radius: 15px;
  transition: all 0.2s ease;
}

.btn-accent-lg:hover {
  background: #FFEDD5;
  transform: translateY(-2px);
}

/* Other Subjects Coming Soon Grid */
.subject-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.subject-card {
  background: #FFFFFF;
  border-radius: 22px;
  border: 2px solid #E2E8F0;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.subject-card:hover {
  transform: translateY(-5px);
  border-color: #94A3B8;
  box-shadow: var(--shadow-card);
}

.subject-card-media {
  position: relative;
  height: 175px;
  overflow: hidden;
}

.subject-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.subject-card:hover .subject-card-media img {
  transform: scale(1.05);
}

.subject-card-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.32;
}

.subject-status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.84);
  color: #F8FAFC;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.subject-card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.subject-meta-row {
  display: flex;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 0.35rem;
}

.subject-card-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  color: #0F172A;
}

.subject-card-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  color: #4F46E5;
  margin-bottom: 0.65rem;
}

.subject-card-desc {
  font-size: 0.88rem;
  color: #475569;
  margin-bottom: 1.1rem;
  flex: 1;
}

.btn-preview-outline {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  background: #F1F5F9;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
}

/* ==========================================================================
   TẦNG 2: DYNAMIC THEMED UNITS (10 UNITS)
   ========================================================================== */
.dynamic-unit-showcase {
  border-radius: 26px;
  background-size: cover;
  background-position: center;
  padding: 2.6rem;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  box-shadow: 0 22px 45px -12px rgba(15, 23, 42, 0.3);
  transition: background-image 0.4s ease;
}

.showcase-top-badges {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.showcase-badge-main {
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.showcase-badge-theme {
  background: rgba(15, 23, 42, 0.65);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #FDE047;
}

.showcase-unit-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.showcase-unit-heading span {
  font-weight: 600;
  opacity: 0.92;
}

.showcase-unit-desc {
  font-size: 1.05rem;
  max-width: 720px;
  margin-bottom: 1.25rem;
  color: rgba(255, 255, 255, 0.94);
}

.showcase-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.65rem;
}

.showcase-spec-chip {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.45rem 0.95rem;
  border-radius: 12px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.palette-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: inline-block;
}

.showcase-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-showcase-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #FFFFFF;
  font-weight: 800;
  padding: 0.9rem 1.6rem;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.btn-showcase-enter:hover {
  transform: translateY(-2px);
}

.btn-showcase-back {
  background: rgba(255, 255, 255, 0.18);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  font-weight: 700;
  padding: 0.9rem 1.35rem;
  border-radius: 15px;
}

/* Theme Switcher Bar */
.theme-switcher-bar {
  background: #FFFFFF;
  border: 2px solid var(--theme-border);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.85rem;
  box-shadow: var(--shadow-soft);
}

.theme-switcher-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: #475569;
  margin-bottom: 0.65rem;
}

.theme-switcher-pills {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.unit-theme-pill {
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid #CBD5E1;
  font-size: 0.8rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.unit-theme-pill:hover {
  transform: translateY(-2px);
}

/* 10 Units Grid */
.units-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.65rem;
}

.themed-unit-card {
  border-radius: 24px;
  border: 3px solid var(--card-border, #CBD5E1);
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

.themed-unit-card:hover,
.themed-unit-card.unit-card-active-preview {
  transform: translateY(-6px);
  border-color: var(--card-primary);
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.2);
}

.themed-unit-banner {
  position: relative;
  height: 215px;
  overflow: hidden;
  color: #FFFFFF;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.themed-unit-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s ease;
}

.themed-unit-card:hover .themed-unit-banner img {
  transform: scale(1.06);
}

.themed-unit-banner-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.themed-unit-top-row,
.themed-unit-banner-bottom {
  position: relative;
  z-index: 2;
}

.themed-unit-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.unit-number-chip {
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.84rem;
  color: #FFFFFF;
}

.unit-status-chip {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

.chip-full {
  background: #FEF3C7;
  color: #92400E;
}

.chip-framework {
  background: rgba(15, 23, 42, 0.72);
  color: #E2E8F0;
}

.unit-decor-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #FDE047;
  display: block;
}

.themed-unit-title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.15;
}

.themed-unit-vn {
  font-size: 0.9rem;
  opacity: 0.92;
  font-weight: 600;
}

.themed-unit-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.themed-unit-tagline {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 0.95rem;
}

.unit-knowledge-pills {
  background: var(--card-bg, #F8FAFC);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.84rem;
}

.knowledge-row {
  display: flex;
  gap: 0.45rem;
}

.knowledge-label {
  font-weight: 800;
  flex-shrink: 0;
}

.knowledge-val {
  color: #334155;
  font-weight: 600;
}

.themed-unit-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.unit-progress-mini {
  flex: 1;
  font-size: 0.8rem;
  color: #475569;
}

.mini-bar-track {
  height: 7px;
  background: #E2E8F0;
  border-radius: 999px;
  margin-top: 4px;
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.btn-unit-enter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 0.65rem 1.15rem;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  z-index: 3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-unit-enter:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.07);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

.btn-unit-enter:active {
  transform: translateY(0);
}

/* ==========================================================================
   TẦNG 3: LESSON LIST, VISUAL FLASHCARDS & GRAMMAR NOTES
   ========================================================================== */
.unit-detail-hero {
  border-radius: 26px;
  background-size: cover;
  background-position: center;
  padding: 2.3rem 2.3rem 1.65rem;
  color: #FFFFFF;
  margin-bottom: 2rem;
  box-shadow: 0 20px 42px -12px rgba(15, 23, 42, 0.28);
}

.unit-hero-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.btn-glass-back {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.86rem;
}

.unit-theme-pill-indicator {
  background: rgba(15, 23, 42, 0.65);
  color: #FDE047;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.unit-hero-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.unit-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.unit-hero-title span {
  font-weight: 600;
  opacity: 0.92;
}

.unit-hero-tagline {
  font-size: 1rem;
  opacity: 0.94;
  margin-bottom: 1.6rem;
}

.unit-tabs-bar {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.unit-tab-btn {
  padding: 0.7rem 1.25rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  transition: all 0.2s ease;
}

.unit-tab-btn.active {
  font-weight: 800;
  border-color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.lessons-intro-banner {
  border: 2px solid;
  border-radius: 18px;
  padding: 1.15rem 1.45rem;
  margin-bottom: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lessons-intro-banner p {
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.btn-quick-flashcards {
  background: #FFFFFF;
  border: 2px solid;
  padding: 0.6rem 1.1rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.86rem;
  flex-shrink: 0;
}

.lessons-vertical-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lesson-card {
  background: #FFFFFF;
  border: 2.5px solid var(--unit-border, #CBD5E1);
  border-radius: 20px;
  padding: 1.2rem 1.45rem;
  display: flex;
  align-items: center;
  gap: 1.35rem;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: all 0.22s ease;
}

.lesson-card:hover {
  transform: translateX(6px);
  border-color: var(--unit-primary);
  box-shadow: var(--shadow-card);
}

.lesson-number-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

.lesson-num-label {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.lesson-num-val {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1;
}

.lesson-card-info {
  flex: 1;
}

.lesson-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.lesson-type-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
}

.lesson-mastered-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #DCFCE7;
  color: #15803D;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
}

.lesson-ready-tag {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748B;
}

.lesson-card-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  color: #0F172A;
}

.lesson-card-subtitle {
  font-size: 0.9rem;
  color: #475569;
}

.btn-play-lesson {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.75rem 1.3rem;
  border-radius: 14px;
  box-shadow: var(--shadow-tactile);
}

/* Visual Flashcards Grid */
.flashcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.4rem;
}

.vocab-flashcard {
  background: #FFFFFF;
  border: 2.5px solid;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}

.vocab-flashcard-img {
  position: relative;
  height: 240px;
  background: #F8FAFC;
}

.vocab-flashcard-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-speak-floating {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.vocab-flashcard-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vocab-word-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.vocab-word {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
}

.vocab-pos {
  font-size: 0.82rem;
  color: #64748B;
  font-weight: 700;
}

.vocab-ipa {
  font-size: 0.88rem;
  color: #475569;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.vocab-meaning {
  font-weight: 700;
  color: #0F172A;
  font-size: 0.94rem;
  margin-bottom: 0.75rem;
}

.vocab-example {
  margin-top: auto;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  font-size: 0.84rem;
  color: #334155;
}

/* Grammar Notes */
.grammar-pronunciation-box {
  color: #FFFFFF;
  padding: 1.5rem 1.8rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.grammar-notes-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.grammar-note-card {
  background: #FFFFFF;
  border-radius: 18px;
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow-soft);
}

.grammar-note-card h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}

.grammar-usage {
  color: #334155;
  margin-bottom: 0.75rem;
}

.grammar-example-box {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.92rem;
}

/* ==========================================================================
   TẦNG 4: CORE GAMEPLAY ARENA & 5 INTERACTION MODES
   ========================================================================== */
.game-arena-wrapper {
  max-width: 980px;
  margin: 0 auto;
}

.game-hud-bar {
  background: #FFFFFF;
  border: 2.5px solid;
  border-radius: 20px;
  padding: 0.95rem 1.35rem;
  margin-bottom: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  box-shadow: var(--shadow-soft);
}

.btn-quit-game {
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  background: #F1F5F9;
}

.btn-quit-game:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.game-hud-progress-wrap {
  flex: 1;
  min-width: 240px;
}

.game-hud-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.hud-mode-badge {
  color: #FFFFFF;
  padding: 0.22rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
}

.badge-revenge {
  background: linear-gradient(90deg, #E11D48, #F97316);
  animation: pulseRevenge 1.5s infinite;
}

@keyframes pulseRevenge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

.game-progress-track {
  height: 11px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.game-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.game-hud-metrics {
  display: flex;
  gap: 0.65rem;
}

.hud-metric {
  padding: 0.4rem 0.8rem;
  border-radius: 12px;
  font-size: 0.82rem;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
}

.streak-hot {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #B45309;
}

.mistake-metric {
  background: #FFF1F2;
  border-color: #FECDD3;
  color: #BE123C;
}

/* Main Stage Card */
.game-stage-card {
  background: #FFFFFF;
  border: 3px solid;
  border-radius: 26px;
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.question-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.question-category-chip {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}

.anti-rote-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #FFE4E6;
  color: #BE123C;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.question-prompt-title {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.4;
  margin-bottom: 1.35rem;
}

/* SGK Embedded Passage / Dialogue / Audio Box */
.sgk-context-box {
  border: 2px solid;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  box-shadow: 0 6px 18px -6px rgba(15, 23, 42, 0.08);
}

.sgk-context-header {
  padding: 0.75rem 1.15rem;
  border-bottom: 1.5px solid;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.sgk-context-title {
  font-size: 0.86rem;
  font-weight: 800;
}

.sgk-audio-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-sgk-audio-play {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.14);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-sgk-audio-play:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-sgk-audio-stop {
  background: #FFFFFF;
  color: #475569;
  border: 1.5px solid #CBD5E1;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
}

.btn-sgk-audio-stop:hover {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: #FCA5A5;
}

.sgk-context-body {
  padding: 1rem 1.25rem;
  font-size: 0.94rem;
  line-height: 1.68;
  color: #1E293B;
  max-height: 240px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.72);
}

.sgk-word-chip {
  display: inline-block;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  padding: 0.1rem 0.55rem;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--theme-primary);
  margin: 0.1rem 0.15rem;
}

/* 1. Visual Vocab Layout */
.visual-vocab-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.visual-vocab-media-box {
  border: 2.5px solid;
  border-radius: 20px;
  overflow: hidden;
}

.visual-vocab-img {
  width: 100%;
  height: 290px;
  object-fit: cover;
}

.visual-vocab-audio-bar {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #FFFFFF;
  min-height: 54px;
}

.visual-vocab-audio-bar.audio-locked {
  background: #F8FAFC;
  border-top: 1.5px dashed #CBD5E1;
}

.visual-vocab-audio-bar.audio-unlocked {
  background: #ECFDF5;
  border-top: 1.5px solid #A7F3D0;
  animation: slideUpFade 0.25s ease;
}

.listen-locked-notice {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748B;
  width: 100%;
  justify-content: center;
  text-align: center;
}

.btn-listen-word {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-listen-word:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.visual-phonetic-tag {
  font-size: 0.84rem;
  font-weight: 700;
  color: #475569;
}

.vocab-mode-toggle-row {
  display: inline-flex;
  background: #F1F5F9;
  padding: 0.25rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.btn-mode-switch {
  padding: 0.4rem 0.85rem;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.btn-mode-switch.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.vocab-typing-box {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.vocab-text-input {
  flex: 1;
  min-width: 220px;
  padding: 0.9rem 1.15rem;
  border-radius: 14px;
  border: 2.5px solid #CBD5E1;
  font-size: 1rem;
  font-weight: 600;
}

.vocab-text-input:focus {
  outline: none;
  border-color: var(--theme-primary);
}

.btn-submit-typed {
  color: #FFFFFF;
  font-weight: 800;
  padding: 0.9rem 1.4rem;
  border-radius: 14px;
}

/* 2. Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.95rem;
}

.option-card-btn {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  text-align: left;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 2.5px solid #E2E8F0;
  background: #FFFFFF;
  font-size: 0.96rem;
  font-weight: 700;
  color: #1E293B;
  box-shadow: 0 4px 0 #E2E8F0;
  transition: all 0.18s ease;
}

.option-card-btn:hover:not(:disabled) {
  border-color: var(--theme-primary);
  background: var(--theme-bg);
  transform: translateY(-2px);
}

.option-letter-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.option-card-btn.option-correct {
  border-color: #10B981;
  background: #ECFDF5;
  color: #065F46;
  box-shadow: 0 4px 0 #059669;
}

.option-card-btn.option-correct .option-letter-badge {
  background: #10B981;
  color: #FFFFFF;
}

.option-card-btn.option-wrong {
  border-color: #EF4444;
  background: #FEF2F2;
  color: #991B1B;
  box-shadow: 0 4px 0 #DC2626;
}

.option-card-btn.option-wrong .option-letter-badge {
  background: #EF4444;
  color: #FFFFFF;
}

.option-card-btn.option-dimmed {
  opacity: 0.55;
}

/* 3. Fill Blank Card */
.fill-blank-sentence-card {
  padding: 1.35rem 1.5rem;
  border-radius: 18px;
  border: 2px dashed;
  margin-bottom: 1rem;
}

.fill-blank-sentence-card .question-prompt-title {
  margin-bottom: 0;
}

.inline-blank-slot {
  display: inline-block;
  min-width: 110px;
  border-bottom: 3px solid var(--theme-primary);
  color: var(--theme-primary);
  text-align: center;
  padding: 0 0.4rem;
}

.inline-blank-filled {
  display: inline-block;
  padding: 0.12rem 0.7rem;
  border-radius: 9px;
  background: var(--theme-surface-alt);
  color: var(--theme-primary);
  font-weight: 800;
}

.inline-blank-filled.blank-correct {
  background: #D1FAE5;
  color: #047857;
}

.inline-blank-filled.blank-wrong {
  background: #FEE2E2;
  color: #B91C1C;
}

.helper-instruction {
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748B;
  margin-bottom: 0.85rem;
}

/* 4. Matching Pairs */
.matching-status-bar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #F8FAFC;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  margin-bottom: 1.15rem;
}

.matching-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.matching-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.matching-col-header {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.matching-item-btn {
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 2.5px solid #CBD5E1;
  background: #FFFFFF;
  font-weight: 700;
  font-size: 0.92rem;
  color: #1E293B;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.18s ease;
}

.matching-item-btn:hover:not(:disabled) {
  border-color: var(--theme-primary);
  transform: translateY(-2px);
}

.matching-item-btn.matching-selected {
  border-color: var(--theme-primary);
  background: var(--theme-surface-alt);
  color: var(--theme-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.matching-item-btn.matched-done {
  border-color: #10B981;
  background: #ECFDF5;
  color: #047857;
  opacity: 0.85;
}

.match-check {
  font-weight: 900;
  color: #059669;
}

/* 5. Sentence Builder */
.sentence-meaning-hint {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1.5px solid;
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
}

.sentence-drop-tray {
  min-height: 76px;
  border: 2.5px dashed #94A3B8;
  border-radius: 16px;
  padding: 0.95rem;
  background: #F8FAFC;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 1.15rem;
}

.sentence-drop-tray.tray-correct {
  border-style: solid;
  border-color: #10B981;
  background: #ECFDF5;
}

.sentence-drop-tray.tray-wrong {
  border-style: solid;
  border-color: #EF4444;
  background: #FEF2F2;
}

.sentence-tray-placeholder {
  color: #64748B;
  font-size: 0.9rem;
  font-style: italic;
}

.word-bank-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.35rem;
}

.word-tile-chip {
  padding: 0.55rem 1rem;
  border-radius: 12px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0F172A;
  box-shadow: 0 3px 0 #CBD5E1;
  transition: all 0.15s ease;
}

.word-tile-chip:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--theme-primary);
}

.word-tile-chip.tile-used {
  opacity: 0.3;
  box-shadow: none;
}

.sentence-builder-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: flex-end;
}

.btn-reset-sentence {
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  background: #F1F5F9;
  color: #475569;
  font-weight: 700;
}

.btn-check-sentence {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  color: #FFFFFF;
  font-weight: 800;
}

.btn-check-sentence:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Instant Feedback Box */
.instant-feedback-card {
  margin-top: 1.6rem;
  border-radius: 20px;
  padding: 1.45rem;
  border: 2.5px solid;
  animation: slideUpFade 0.25s ease;
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.feedback-correct {
  background: #F0FDF4;
  border-color: #34D399;
  color: #064E3B;
}

.feedback-wrong {
  background: #FFF1F2;
  border-color: #FDA4AF;
  color: #881337;
}

.feedback-header-row {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.feedback-headline-wrap h4 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.correct-answer-reveal {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: #BE123C;
}

.feedback-explanation-body {
  background: rgba(255, 255, 255, 0.82);
  padding: 1rem 1.15rem;
  border-radius: 14px;
  margin-bottom: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: #1E293B;
}

.memory-tip-box {
  padding-top: 0.5rem;
  border-top: 1px dashed #CBD5E1;
  color: #0F172A;
}

.feedback-Footer-action {
  display: flex;
  justify-content: flex-end;
}

.btn-next-challenge {
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 0.85rem 1.65rem;
  border-radius: 14px;
  box-shadow: var(--shadow-tactile);
}

/* ==========================================================================
   REVENGE INTRO & VICTORY SCREENS
   ========================================================================== */
.revenge-intro-card,
.victory-screen-card {
  max-width: 820px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: 26px;
  border: 3px solid #FDA4AF;
  padding: 2.3rem;
  box-shadow: var(--shadow-card);
}

.revenge-badge-top {
  display: inline-block;
  background: #FFE4E6;
  color: #BE123C;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

.revenge-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: #881337;
  margin-bottom: 0.5rem;
}

.revenge-subtitle {
  color: #334155;
  margin-bottom: 1.35rem;
}

.anti-rote-rules-box {
  background: #FFF1F2;
  border-left: 5px solid #E11D48;
  padding: 1.1rem 1.35rem;
  border-radius: 14px;
  margin-bottom: 1.35rem;
}

.anti-rote-rules-box h3 {
  font-size: 1rem;
  color: #9F1239;
  margin-bottom: 0.45rem;
}

.anti-rote-rules-box ul {
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.revenge-preview-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0.75rem 0 1.6rem;
}

.revenge-preview-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
}

.revenge-item-idx {
  background: #E11D48;
  color: #FFFFFF;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 8px;
  font-size: 0.78rem;
}

.btn-start-revenge {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #E11D48 0%, #F97316 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 1.08rem;
  padding: 1.05rem;
  border-radius: 16px;
  box-shadow: 0 6px 0 #9F1239;
}

/* Victory Screen */
.victory-screen-card {
  padding: 0;
  overflow: hidden;
}

.victory-hero-banner {
  padding: 2.5rem 2rem;
  text-align: center;
  color: #FFFFFF;
}

.victory-trophy-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.9rem;
}

.victory-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.victory-title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0.3rem 0;
}

.victory-body {
  padding: 2rem;
}

.victory-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.victory-stat-box {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 1.1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.v-stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748B;
}

.v-stat-value {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0.2rem 0;
}

.v-stat-sub {
  font-size: 0.78rem;
  color: #475569;
}

.victory-badge-earned-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: 16px;
  border: 2px solid;
  margin-bottom: 1.65rem;
}

.badge-icon-hex {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.victory-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-secondary-lg {
  background: #F1F5F9;
  color: #1E293B;
  border: 2px solid #CBD5E1;
  font-weight: 700;
  padding: 0.85rem 1.35rem;
  border-radius: 14px;
}

/* ==========================================================================
   MODAL & FOOTER
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.modal-card {
  background: #FFFFFF;
  max-width: 620px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
}

.modal-banner {
  background-size: cover;
  background-position: center;
  padding: 2rem;
  color: #FFFFFF;
}

.badge-coming-soon {
  display: inline-block;
  background: #F59E0B;
  color: #0F172A;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.modal-banner h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
}

.modal-body {
  padding: 1.65rem 2rem;
}

.modal-desc {
  color: #334155;
  margin-bottom: 1rem;
}

.modal-architecture-note {
  background: #EEF2FF;
  border: 1.5px solid #C7D2FE;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 0.85rem;
  color: #1E1B4B;
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.modal-section-title {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: #0F172A;
}

.modal-topic-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.modal-topic-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.modal-topic-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-primary {
  background: #4F46E5;
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
}

.btn-secondary {
  background: #F1F5F9;
  color: #334155;
  font-weight: 700;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
}

.app-footer {
  border-top: 2px solid var(--theme-border);
  background: #FFFFFF;
  padding: 1.75rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: #475569;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-link-btn {
  font-weight: 700;
  color: var(--theme-primary);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 980px) {
  .hero-portal-grid,
  .featured-subject-banner,
  .visual-vocab-layout {
    grid-template-columns: 1fr;
  }

  .featured-subject-media {
    min-height: 240px;
  }

  .victory-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero-portal-section {
    padding: 1.65rem;
  }

  .featured-highlights-grid,
  .options-grid,
  .matching-columns-grid,
  .modal-topic-list,
  .units-grid {
    grid-template-columns: 1fr;
  }

  .lesson-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .lesson-card-action,
  .btn-play-lesson {
    width: 100%;
    justify-content: center;
  }
}
