* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #18221f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #edf2ee;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  color: #fff;
  background: #14634f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(20, 99, 79, 0.18);
}

button.secondary {
  color: #19312b;
  background: #dce9e3;
}

.page {
  min-height: 100vh;
  padding: 28px;
}

.center {
  display: grid;
  place-items: center;
}

.card {
  overflow: hidden;
  border: 1px solid rgba(30, 55, 48, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 65px rgba(24, 34, 31, 0.12);
}

.hero-card,
.result-card {
  width: min(920px, 100%);
}

.hero {
  min-height: 420px;
  display: flex;
  align-items: end;
  background-position: center;
  background-size: cover;
}

.overlay {
  width: 100%;
  padding: 42px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
}

.pill {
  width: fit-content;
  margin: 0 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

.overlay h1 {
  max-width: 720px;
  margin-bottom: 10px;
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 0.95;
}

.overlay p:last-child {
  max-width: 600px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #edf1ef;
}

.stats div,
.score-boxes div {
  display: grid;
  gap: 3px;
  padding: 18px;
}

.stats strong,
.score-boxes strong {
  font-size: 1.35rem;
}

.stats span,
.score-boxes span {
  color: #5d706a;
  font-size: 0.83rem;
  font-weight: 750;
  text-transform: uppercase;
}

.start-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.start-box p {
  margin: 0;
  font-weight: 750;
}

.start-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.game-wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar p {
  margin-bottom: 5px;
  color: #69746f;
  font-weight: 750;
}

.topbar h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.score-boxes {
  display: flex;
  gap: 10px;
}

.score-boxes div {
  min-width: 112px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(24, 34, 31, 0.08);
}

.score-boxes div:last-child {
  min-width: 136px;
}

.progress {
  height: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #d8e2dd;
}

.progress div {
  height: 100%;
  border-radius: inherit;
  background: #14634f;
  transition: width 220ms ease;
}

.game-card {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
}

.image-wrap {
  position: relative;
  min-height: 560px;
  background: #d8e2dd;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
  object-fit: cover;
}

.image-wrap.loading img {
  opacity: 0;
}

.photo-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #244138;
  background: linear-gradient(135deg, #d8e2dd, #f6f0dc);
  font-weight: 850;
}

.badges {
  position: absolute;
  z-index: 2;
  top: 16px;
  left: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badges span {
  border-radius: 999px;
  padding: 8px 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.56);
  font-size: 0.82rem;
  font-weight: 850;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.options {
  display: grid;
  gap: 10px;
}

.level-note {
  border-left: 4px solid #14634f;
  padding: 11px 12px;
  border-radius: 8px;
  color: #21443a;
  background: #edf5f1;
  font-weight: 800;
}

.option {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe8e4;
  color: #20302b;
  background: #f8fbf9;
  text-align: left;
}

.option.correct {
  border-color: #33a46e;
  color: #0d4a31;
  background: #dcf5e9;
}

.option.wrong {
  border-color: #d76565;
  color: #7a1d1d;
  background: #fae2e2;
}

.option.muted {
  opacity: 0.55;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.hint,
.feedback {
  border-radius: 8px;
  padding: 14px;
  font-weight: 750;
}

.hint {
  color: #47360d;
  background: #fff2c8;
}

.feedback {
  color: #17342b;
  background: #edf5f1;
}

.result-card {
  padding: 34px;
  text-align: center;
}

.trophy {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  color: #fff;
  background: #14634f;
  font-weight: 900;
}

.result-card h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 6vw, 3.6rem);
}

.big-score {
  display: grid;
  gap: 4px;
  margin: 24px auto;
}

.big-score strong {
  font-size: 4rem;
}

.big-score span {
  color: #5d706a;
  font-weight: 850;
}

@media (max-width: 820px) {
  .page {
    padding: 14px;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .start-box,
  .topbar,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .start-buttons,
  .score-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .game-card {
    grid-template-columns: 1fr;
  }

  .image-wrap,
  .image-wrap img {
    min-height: 330px;
  }
}

@media (max-width: 520px) {
  .overlay {
    padding: 26px;
  }

  .stats,
  .start-buttons,
  .score-boxes {
    grid-template-columns: 1fr;
  }
}
