.learning-game {
  width: min(1040px, calc(100% - 32px));
  margin: 24px auto 72px;
  color: var(--text-primary);
}

.learning-game .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.learning-game__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: clamp(24px, 5vw, 42px);
  border-radius: 24px;
  background: linear-gradient(125deg, #101b3b 0%, #263f7e 58%, #7658b9 100%);
  box-shadow: var(--shadow-large);
  color: #fff;
}

.learning-game__hero h1 {
  margin: 4px 0 8px;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.05;
}

.learning-game__hero p { margin: 0; color: #edf1ff; }
.learning-game__eyebrow { color: #dcd7ff; font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.learning-game__exit { flex: 0 0 auto; padding: 11px 16px; border: 2px solid rgba(255,255,255,.7); border-radius: 10px; color: #fff; font-weight: 800; text-decoration: none; }
.learning-game__exit:hover { background: #fff; color: #17264c; }

.learning-game__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.learning-game__stats div {
  padding: 14px 16px;
  border: 1px solid var(--border-primary);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.learning-game__stats span { display: block; color: var(--text-secondary); font-size: .78rem; font-weight: 750; }
.learning-game__stats strong { display: block; margin-top: 2px; color: var(--text-primary); font-size: 1.35rem; }
.learning-game__progress { height: 9px; margin-bottom: 18px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.learning-game__progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--site-brand), var(--site-accent)); transition: width .35s ease; }

.learning-game__card {
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--border-primary);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-large);
}

.learning-game__question-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.learning-game__question-head h2 { margin: 9px 0 4px; color: var(--text-primary); font-size: clamp(1.35rem, 3vw, 1.8rem); }
.learning-game__question-head p { margin: 0; color: var(--text-secondary); }
.learning-game__mode { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: .74rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.learning-game__mode.learn { color: #176b45; background: #e8f8ef; }
.learning-game__mode.challenge { color: #8a4b08; background: #fff3e8; }
.learning-game__mode.memory { color: #6337a3; background: #f1eaff; }
.learning-game__mode.review { color: #a12837; background: #fff0f1; }

.learning-game__video {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 16 / 9;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 16px;
  background: #0b1220;
  box-shadow: 0 12px 34px rgba(5, 12, 28, .24);
}

.learning-game__video video { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .22s ease; }
.learning-game__video .video-watermark { position: absolute; z-index: 2; right: 12px; bottom: 12px; max-width: 90px; pointer-events: none; }
.learning-game__video.is-concealed::after { content: "Now choose from memory"; position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; padding: 24px; background: #101b3b; color: #fff; font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 850; text-align: center; }
.learning-game__video.is-concealed video { opacity: 0; }
.learning-game__tools { display: flex; justify-content: center; margin: 14px 0 18px; }

.learning-game__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.learning-game__option { min-height: 68px; padding: 13px 16px; border: 2px solid var(--border-primary); border-radius: 13px; background: var(--surface-soft); color: var(--text-primary); cursor: pointer; transition: transform .16s ease, border-color .16s ease, background-color .16s ease; }
.learning-game__option h2 { margin: 0; color: inherit; font-size: clamp(1rem, 2.5vw, 1.2rem); }
.learning-game__option:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--site-brand); }
.learning-game__option.correct { border-color: #16865a; background: #e8f8ef; color: #125b3d; }
.learning-game__option.wrong { border-color: #c4323f; background: #fff0f1; color: #9d2633; }
.learning-game__option:disabled { cursor: default; opacity: .72; }
.learning-game__option.correct:disabled { opacity: 1; }

.learning-game__feedback { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 14px 16px; border-radius: 12px; }
.learning-game__feedback strong, .learning-game__feedback span { display: block; }
.learning-game__feedback span { font-size: .9rem; }
.learning-game__feedback.correct { color: #125b3d; background: #e8f8ef; }
.learning-game__feedback.wrong { color: #8f2430; background: #fff0f1; }
.learning-game__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.learning-game__button { min-height: 46px; padding: 11px 18px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-weight: 850; cursor: pointer; }
.learning-game__button.primary { background: var(--site-brand); color: #fff; }
.learning-game__button.secondary { border-color: var(--border-strong); background: var(--surface-soft); color: var(--text-primary); }
.learning-game__button.ghost { border-color: var(--border-primary); background: transparent; color: var(--site-brand); }
.learning-game__button.success { background: #16865a; color: #fff; }
.learning-game__button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-card); }
.learning-game__button:disabled { cursor: default; opacity: .55; }

.learning-game__complete { padding: 18px 0; text-align: center; }
.learning-game__trophy { display: block; margin-bottom: 8px; font-size: 3.5rem; }
.learning-game__complete h2 { margin: 8px 0; color: var(--text-primary); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.learning-game__complete > p { color: var(--text-secondary); }
.learning-game__results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0; }
.learning-game__results div { padding: 20px 12px; border-radius: 14px; background: var(--surface-soft); }
.learning-game__results strong { display: block; color: var(--site-brand); font-size: 1.8rem; }
.learning-game__results span { color: var(--text-secondary); font-size: .82rem; }

html[data-theme="dark"] .learning-game__mode.learn { color: #8ce0b2; background: #173d2c; }
html[data-theme="dark"] .learning-game__mode.challenge { color: #f2bf7b; background: #3b2a16; }
html[data-theme="dark"] .learning-game__mode.memory { color: #d0b7ff; background: #33254a; }
html[data-theme="dark"] .learning-game__mode.review { color: #ffb3bc; background: #482129; }
html[data-theme="dark"] .learning-game__option.correct, html[data-theme="dark"] .learning-game__feedback.correct { color: #98e4bb; background: #173d2c; }
html[data-theme="dark"] .learning-game__option.wrong, html[data-theme="dark"] .learning-game__feedback.wrong { color: #ffb3bc; background: #482129; }

@media (max-width: 680px) {
  .learning-game { width: min(100% - 20px, 1040px); margin-top: 12px; }
  .learning-game__hero { align-items: flex-start; flex-direction: column; border-radius: 18px; }
  .learning-game__stats { grid-template-columns: repeat(2, 1fr); }
  .learning-game__card { padding: 16px; border-radius: 16px; }
  .learning-game__options { grid-template-columns: 1fr; }
  .learning-game__feedback { align-items: flex-start; flex-direction: column; }
  .learning-game__results { grid-template-columns: 1fr; }
  .learning-game__button.primary, .learning-game__button.secondary { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .learning-game * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
