:root {
  color-scheme: dark;
  --bg: #03111e;
  --panel: rgba(32, 42, 51, 0.66);
  --panel-warm: rgba(89, 58, 37, 0.54);
  --cyan: #48f0f0;
  --cyan-soft: rgba(72, 240, 240, 0.42);
  --amber: #ffb266;
  --amber-soft: rgba(255, 178, 102, 0.42);
  --text: #ffe7c8;
  --cool-text: #d9faff;
  --muted: rgba(225, 229, 232, 0.7);
  --green: #58f2ae;
  --red: #ff6b6b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
a {
  cursor: pointer;
}

button {
  font: inherit;
}

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

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.bank-choice-app {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 82px minmax(0, 1fr) 154px;
  padding: 0 28px 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 55% 42%, rgba(15, 112, 184, 0.44), transparent 31%),
    radial-gradient(circle at 48% 58%, rgba(255, 164, 87, 0.13), transparent 26%),
    radial-gradient(circle at 50% 100%, rgba(19, 76, 118, 0.46), transparent 35%),
    linear-gradient(150deg, #04101c 0%, #06223a 45%, #03101b 100%);
}

.bank-choice-app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(99, 220, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 220, 255, 0.04) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 78%, transparent);
}

.bank-bg {
  position: absolute;
  inset: 82px 0 120px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bank-orbit {
  position: absolute;
  left: 50%;
  bottom: 13%;
  width: min(1180px, 72vw);
  height: 128px;
  transform: translateX(-50%) perspective(900px) rotateX(72deg);
  border: 1px solid rgba(85, 231, 244, 0.2);
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(250, 163, 86, 0.2), transparent 42%, rgba(75, 239, 240, 0.2));
  box-shadow: 0 0 54px rgba(56, 196, 230, 0.24), inset 0 0 44px rgba(255, 177, 102, 0.08);
}

.bank-glow {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.28;
}

.bank-glow-a {
  left: 19%;
  top: 24%;
  background: #0da7ff;
}

.bank-glow-b {
  right: 18%;
  top: 35%;
  background: #ff9d59;
}

.bank-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(145, 229, 255, 0.18);
}

.lesson-id {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffd199;
  box-shadow: 0 0 22px rgba(255, 178, 102, 0.86), 0 0 42px rgba(255, 178, 102, 0.22);
}

.lesson-id strong,
.lesson-id small {
  display: block;
}

.lesson-id strong {
  color: #ffe5bc;
  font-size: 16px;
  line-height: 1.18;
}

.lesson-id small {
  margin-top: 4px;
  color: rgba(229, 241, 248, 0.68);
  font-size: 12px;
}

.choice-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.choice-actions a,
.choice-actions button,
.complete-actions a,
.complete-actions button,
.next-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(116, 226, 255, 0.3);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(47, 119, 147, 0.6), rgba(13, 44, 69, 0.76));
  color: #e9fbff;
  padding: 0 16px;
  box-shadow: 0 0 22px rgba(81, 218, 255, 0.16), inset 0 0 18px rgba(255, 255, 255, 0.05);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.choice-actions a:hover,
.choice-actions button:hover,
.complete-actions a:hover,
.complete-actions button:hover,
.next-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(120, 245, 255, 0.72);
  box-shadow: 0 0 26px rgba(81, 218, 255, 0.28), inset 0 0 22px rgba(255, 255, 255, 0.08);
}

#groupToggle {
  border-color: rgba(255, 190, 111, 0.62);
  background: linear-gradient(180deg, rgba(109, 78, 52, 0.72), rgba(38, 45, 56, 0.86));
  color: #ffe1b8;
}

.choice-stage {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 0;
  text-align: center;
}

.timer-pill {
  position: absolute;
  left: 28px;
  top: 100px;
  min-width: 92px;
  border: 1px solid rgba(94, 219, 244, 0.42);
  border-radius: 7px;
  background: rgba(21, 73, 95, 0.52);
  box-shadow: 0 0 20px rgba(81, 218, 255, 0.14), inset 0 0 14px rgba(255, 255, 255, 0.05);
  color: rgba(238, 250, 255, 0.86);
  padding: 8px 12px;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.meaning-shell {
  position: relative;
  width: min(1080px, 88vw);
  border: 1px solid rgba(93, 247, 242, 0.34);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(113, 73, 43, 0.68), rgba(43, 47, 54, 0.72) 42%, rgba(39, 38, 39, 0.68)),
    rgba(19, 34, 47, 0.8);
  box-shadow:
    0 0 0 10px rgba(255, 176, 101, 0.06),
    0 0 36px rgba(82, 246, 239, 0.18),
    inset 0 0 38px rgba(255, 255, 255, 0.08);
  padding: 38px 48px 44px;
}

.meaning-shell::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -38px;
  width: min(260px, 34vw);
  height: 38px;
  transform: translateX(-50%);
  border: 1px solid rgba(91, 239, 236, 0.52);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  background: rgba(35, 61, 70, 0.78);
  box-shadow: 0 0 22px rgba(87, 243, 238, 0.24), -52px 0 28px rgba(255, 174, 93, 0.18);
}

.mode-label {
  position: absolute;
  left: 50%;
  top: -28px;
  z-index: 1;
  transform: translateX(-50%);
  margin: 0;
  color: #ffe2bc;
  font-size: 15px;
  font-weight: 780;
  letter-spacing: 0;
  text-shadow: 0 0 14px rgba(255, 183, 105, 0.42);
}

.meaning-panel {
  display: grid;
  gap: 7px;
  justify-items: center;
  margin-bottom: 22px;
}

.meaning-panel span {
  color: rgba(255, 225, 190, 0.74);
  font-size: 13px;
  font-weight: 760;
}

.meaning-panel strong {
  color: #ffd8a9;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.08;
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(255, 183, 105, 0.35);
}

.meaning-panel small {
  color: rgba(255, 222, 185, 0.86);
  font-size: clamp(17px, 1.8vw, 26px);
}

.sentence-line {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.28em;
  margin: 0;
  color: #ffe4c2;
  font-size: clamp(38px, 4.1vw, 62px);
  line-height: 1.18;
  font-weight: 830;
  letter-spacing: 0;
  text-wrap: balance;
}

.sentence-blank {
  min-width: 3.15em;
  min-height: 0.95em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-bottom: 5px solid var(--amber);
  color: transparent;
  box-shadow: 0 18px 28px -24px rgba(255, 178, 102, 0.9);
}

.sentence-blank.is-revealed {
  min-width: auto;
  color: var(--amber);
  text-shadow: 0 0 18px rgba(255, 178, 102, 0.46);
}

.choice-note {
  margin: 28px 0 18px;
  color: rgba(246, 238, 224, 0.82);
  font-size: 18px;
  font-weight: 650;
}

.option-grid {
  width: min(1020px, 82vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}

.option-button {
  position: relative;
  min-height: 78px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
  border: 1px solid rgba(111, 226, 255, 0.34);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(31, 103, 137, 0.62), rgba(19, 64, 88, 0.66));
  color: #d6edf2;
  font-size: clamp(26px, 2.8vw, 40px);
  font-weight: 840;
  letter-spacing: 0;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 0 22px rgba(76, 221, 245, 0.12), inset 0 0 24px rgba(255, 255, 255, 0.04);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.option-button::before {
  content: attr(data-option-index);
  min-height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 216, 178, 0.82);
  font-size: clamp(34px, 3.2vw, 48px);
  font-weight: 900;
  background: rgba(255, 178, 102, 0.11);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
}

.option-button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(88, 248, 242, 0.9);
  box-shadow: 0 0 28px rgba(72, 240, 240, 0.3), inset 0 0 24px rgba(255, 255, 255, 0.06);
}

.option-button:nth-child(1) {
  border-color: rgba(255, 178, 102, 0.62);
  background: linear-gradient(180deg, rgba(118, 75, 44, 0.68), rgba(42, 63, 74, 0.72));
  box-shadow: 0 0 24px rgba(255, 178, 102, 0.22), inset 0 0 22px rgba(255, 215, 175, 0.06);
}

.option-index {
  display: none;
}

.option-button.is-correct {
  border-color: rgba(80, 255, 232, 0.92);
  background: linear-gradient(180deg, rgba(29, 139, 141, 0.72), rgba(17, 75, 88, 0.76));
  color: #efffff;
  box-shadow: 0 0 34px rgba(72, 240, 240, 0.42), inset 0 0 28px rgba(83, 255, 232, 0.12);
}

.option-button.is-wrong {
  border-color: rgba(255, 112, 94, 0.82);
  background: linear-gradient(180deg, rgba(111, 53, 49, 0.72), rgba(66, 45, 55, 0.76));
  color: #ffe0d8;
  animation: choiceShake 180ms ease;
}

.option-button.is-muted {
  opacity: 0.46;
}

.option-button:disabled {
  cursor: default;
}

.feedback-line {
  min-height: 26px;
  margin-top: 14px;
  color: rgba(236, 241, 244, 0.7);
  font-size: 15px;
}

.feedback-line.is-good {
  color: var(--green);
}

.feedback-line.is-bad {
  color: var(--red);
}

.next-button {
  min-width: 170px;
  margin-top: 4px;
  border-color: rgba(154, 238, 255, 0.52);
  font-size: 19px;
  font-weight: 820;
}

.next-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.choice-footer {
  width: min(920px, 80vw);
  justify-self: center;
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 12px;
}

.choice-progress {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
}

.choice-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--cyan));
  box-shadow: 0 0 18px rgba(255, 178, 102, 0.5);
  transition: width 180ms ease;
}

.key-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  color: rgba(219, 235, 243, 0.62);
  font-size: 12px;
}

kbd {
  min-width: 32px;
  min-height: 25px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(150, 232, 255, 0.28);
  border-radius: 5px;
  background: rgba(18, 60, 80, 0.55);
  color: rgba(240, 252, 255, 0.86);
  padding: 0 8px;
  font: inherit;
}

.stats-strip {
  width: min(860px, 100%);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid rgba(89, 229, 247, 0.28);
  border-radius: 8px;
  background: rgba(13, 62, 82, 0.46);
  box-shadow: 0 0 28px rgba(72, 240, 240, 0.12), inset 0 0 22px rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.stats-strip div {
  padding: 12px 16px;
  text-align: center;
}

.stats-strip div + div {
  border-left: 1px solid rgba(150, 232, 255, 0.16);
}

.stats-strip strong,
.stats-strip small {
  display: block;
}

.stats-strip strong {
  color: #ffe5bd;
  font-size: 23px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.stats-strip small {
  margin-top: 5px;
  color: rgba(229, 241, 248, 0.68);
  font-size: 12px;
}

.group-complete {
  width: min(820px, 100%);
  justify-self: center;
  align-self: center;
  display: grid;
  place-items: center;
  border: 1px solid rgba(89, 229, 247, 0.28);
  border-radius: 10px;
  background: rgba(15, 42, 59, 0.72);
  padding: 42px 18px;
  text-align: center;
  box-shadow: 0 0 36px rgba(72, 240, 240, 0.18);
}

.group-complete h1 {
  margin: 0;
  color: #ffe1b8;
  font-size: clamp(42px, 6vw, 84px);
  line-height: 1;
  letter-spacing: 0;
}

.group-complete p:not(.mode-label) {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(231, 241, 246, 0.72);
  line-height: 1.55;
}

.complete-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

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

  35% {
    transform: translateX(-8px);
  }

  70% {
    transform: translateX(8px);
  }
}

@media (max-width: 920px) {
  .bank-choice-app {
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 0 16px 20px;
  }

  .bank-topbar {
    min-height: 82px;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .choice-actions {
    justify-content: flex-start;
  }

  .timer-pill {
    position: static;
    margin-bottom: 18px;
  }

  .meaning-shell,
  .option-grid,
  .choice-footer {
    width: 100%;
  }

  .meaning-shell {
    padding: 34px 18px 28px;
  }

  .sentence-line {
    min-height: 92px;
    font-size: clamp(28px, 7vw, 42px);
  }

  .option-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
