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

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  background: #071c31;
  color: #fff;
}

.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.06), transparent 42%),
    linear-gradient(180deg, #0d3c60, #071c31);
}

.landing-card {
  width: min(520px, 100%);
  padding: 28px 24px 24px;
  border-radius: 12px;
  background: rgba(20, 54, 90, .95);
  border: 1px solid rgba(154, 196, 234, .22);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .05);
  text-align: center;
}

.landing-kicker {
  color: #8cb6e0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.landing-kicker::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #5c93c8;
}

.landing-title {
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.1;
  margin-bottom: 14px;
}

.landing-copy {
  color: #c9dff5;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.landing-points {
  list-style: none;
  text-align: left;
  display: grid;
  gap: 10px;
  margin: 0 auto 22px;
  max-width: 380px;
}

.landing-points li {
  position: relative;
  padding: 10px 12px 10px 34px;
  border-radius: 8px;
  background: rgba(13, 40, 68, .75);
  border: 1px solid rgba(154, 196, 234, .16);
  color: #e8f1fb;
  font-size: 14px;
  line-height: 1.35;
}

.landing-points li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 10px;
  color: #7ee09a;
  font-weight: 700;
}

.start-btn {
  display: inline-block;
  text-decoration: none;
  appearance: none;
  border: none;
  padding: 13px 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, #52b8ff, #2f6fae);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
  transition: transform .18s ease, filter .18s ease;
}

.start-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.start-btn:active { transform: translateY(1px) scale(.99); }

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0d3c60, #071c31);
}

.content {
  flex: 1;
  display: flex;
  min-height: 0;
}

.hero {
  flex: 1;
  min-height: 320px;
  perspective: 1200px;
}

.hero-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.4, .2, .2, 1);
}

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

.hero-face {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.hero-face--back {
  transform: rotateY(180deg);
}

.game-panel {
  position: relative;
  flex: 1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 14px;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.05), transparent 45%),
    linear-gradient(180deg, #0d3c60, #071c31);
}

.top {
  text-align: center;
  color: #8cb6e0;
  font-size: 12px;
  letter-spacing: .8px;
  margin-top: 6px;
}

.top::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: #5c93c8;
}

.question {
  max-width: 420px;
  margin: 18px auto 16px;
  text-align: center;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.22;
  font-weight: 700;
}

.answers {
  width: min(420px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 9px;
}

.option {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 8px;
  background: rgba(20, 54, 90, .95);
  border: 1px solid rgba(154,196,234,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
  min-height: 58px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.option.selected {
  border-color: rgba(122, 208, 255, .75);
  background: linear-gradient(180deg, rgba(28, 71, 114, .98), rgba(20, 56, 92, .98));
  box-shadow:
    0 0 0 1px rgba(122,208,255,.12),
    0 10px 24px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.option.correct {
  border-color: rgba(101, 220, 132, .85);
  background: linear-gradient(180deg, rgba(24, 88, 64, .98), rgba(19, 70, 51, .98));
}

.option.wrong {
  border-color: rgba(255, 110, 110, .85);
  background: linear-gradient(180deg, rgba(98, 35, 48, .98), rgba(74, 26, 38, .98));
  animation: shake .28s ease;
}

.bubble {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #3e86c9, #2b65a0);
  font-weight: 700;
  font-size: 17px;
  color: #fff;
}

.option p {
  font-size: 14px;
  line-height: 1.35;
  color: #e8f1fb;
}

.response-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  background: rgba(7, 28, 49, .6);
  pointer-events: none;
}

.response-overlay.is-visible {
  display: block;
}

.response-view {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 21;
  width: min(420px, calc(100% - 40px));
  max-width: 420px;
  padding: 0;
  border-radius: 12px;
  background-color: #14365a;
  border: 2px solid rgba(154, 196, 234, .45);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, .5),
    0 0 0 1px rgba(255, 255, 255, .06),
    inset 0 1px 0 rgba(255, 255, 255, .1);
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.response-view.dragging {
  cursor: grabbing;
  box-shadow:
    0 32px 56px rgba(0, 0, 0, .6),
    0 0 0 1px rgba(255, 255, 255, .08),
    inset 0 1px 0 rgba(255, 255, 255, .1);
}

.response-drag-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 40px 8px 12px;
  background: rgba(255, 255, 255, .06);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  cursor: grab;
}

.response-drag-hint {
  color: rgba(140, 182, 224, .8);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  pointer-events: none;
}

.response-close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .08);
  color: rgba(200, 220, 240, .92);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.response-close span {
  display: block;
  margin-top: -1px;
}

.response-close:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .24);
  color: #fff;
}

.response-close:focus-visible {
  outline: 2px solid rgba(122, 208, 255, .75);
  outline-offset: 2px;
}

.response-view.correct .response-close {
  border-color: rgba(126, 224, 154, .28);
  color: rgba(210, 255, 220, .95);
}

.response-view.correct .response-close:hover {
  background: rgba(126, 224, 154, .18);
  border-color: rgba(126, 224, 154, .42);
}

.response-view.wrong .response-close {
  border-color: rgba(255, 154, 154, .28);
  color: rgba(255, 220, 220, .95);
}

.response-view.wrong .response-close:hover {
  background: rgba(255, 154, 154, .18);
  border-color: rgba(255, 154, 154, .42);
}

.response-view.correct {
  border-color: rgba(101, 220, 132, .95);
  background-color: #185840;
  background-image: linear-gradient(180deg, #1d6245, #134633);
}

.response-view.wrong {
  border-color: rgba(255, 110, 110, .95);
  background-color: #622330;
  background-image: linear-gradient(180deg, #6d2838, #4a1a26);
}

.response-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px 18px;
}

.response-view .bubble {
  flex-shrink: 0;
}

.response-view.correct .bubble {
  background: linear-gradient(180deg, #5ecf7d, #3dab5f);
}

.response-view.wrong .bubble {
  background: linear-gradient(180deg, #e87a7a, #c45a5a);
}

.response-content {
  flex: 1;
  min-width: 0;
}

.response-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: #8cb6e0;
}

.response-label.correct { color: #7ee09a; }
.response-label.wrong { color: #ff9a9a; }

.response-text {
  font-size: 14px;
  line-height: 1.35;
  color: #e8f1fb;
}

.actions {
  width: min(420px, 100%);
  margin: 14px auto 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.next-btn, .restart-btn {
  appearance: none;
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, opacity .18s ease;
}

.next-btn { background: linear-gradient(180deg, #52b8ff, #2f6fae); }
.restart-btn { background: linear-gradient(180deg, #697a8d, #445161); display:none; }

.next-btn:hover, .restart-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.next-btn:active, .restart-btn:active { transform: translateY(1px) scale(.99); }

.footer {
  margin-top: auto;
  margin-top: 18px;
  background: #17395f;
  border: 1px solid rgba(154,196,234,.22);
  border-radius: 6px;
  padding: 10px 11px;
  display: grid;
  grid-template-columns: 36px 1.35fr .85fr .95fr;
  align-items: center;
  gap: 10px;
}

.menu {
  font-size: 30px;
  color: #79a6d1;
  text-align: center;
  line-height: 1;
}

.section {
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,.08);
  min-width: 0;
}
.section:first-of-type { border-left: none; padding-left: 0; }

.label {
  color: #8cb6e0;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .3px;
  margin-bottom: 6px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.progress {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: #25486f;
  overflow: hidden;
}

.progress span {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #62c874, #49b25f);
}

.percent {
  font-size: 14px;
  min-width: 30px;
  text-align: right;
}

.score, .time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.star { color: #f0c24a; font-size: 18px; }
.clock { color: #8eb5db; font-size: 18px; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@media (max-width: 860px) {
  .content { flex-direction: column; }
  .hero {
    flex: none;
    width: 100%;
    min-height: 0;
    height: auto;
  }
  .game-panel { flex: 1; min-height: auto; }
}

@media (max-width: 430px) {
  .game-panel { padding: 14px 8px 8px; }
  .question { font-size: 18px; }
  .option p { font-size: 13px; }
  .footer {
    grid-template-columns: 34px 1fr 1fr;
    row-gap: 10px;
  }
  .section:nth-child(4) { grid-column: 2 / 4; }
  .actions { justify-content: stretch; }
  .next-btn, .restart-btn { width: 100%; }
  .actions { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
