:root {
  --ag-card: rgba(4, 9, 18, 0.74);
  --ag-border: rgba(255, 255, 255, 0.14);
  --ag-text: #ffffff;
  --ag-soft: rgba(255, 255, 255, 0.78);
  --ag-accent: #ffd166;
  --ag-correct: #39c97a;
  --ag-wrong: #ff6d78;
  --ag-bg-pos-x: 50%;
  --ag-bg-pos-y: 50%;
  --ag-bg-scale: 1.06;
  --ag-bg-rotate: 0deg;
}

body.animal-guess-page {
  min-height: 100vh;
  margin: 0;
  color: var(--ag-text);
  background:
    radial-gradient(circle at 50% 40%, rgba(91, 120, 255, 0.12), rgba(0, 0, 0, 0) 42%),
    url('../images/background-daily-guess.jpg') center center / cover no-repeat fixed,
    #05070c;
}

body.animal-guess-page .overlay {
  box-shadow: 0 0 32px rgba(0, 0, 0, 0.28) inset;
}

body.animal-guess-page .overlay-top {
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.22) inset;
}

body.animal-guess-page #stats {
  right: 14px;
  top: 10px;
  min-width: 132px;
  text-align: right;
}

body.animal-guess-page #score {
  text-align: right;
  transform-origin: 100% 0;
  white-space: nowrap;
  font-size: 1.48em;
  line-height: 0.9;
}

body.animal-guess-page #round {
  text-align: right;
  white-space: nowrap;
  margin-top: 4px;
  font-size: 0.9rem;
}

.animal-guess-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.18)),
    url('../images/background-daily-guess.jpg') var(--ag-bg-pos-x) var(--ag-bg-pos-y) / cover no-repeat;
  z-index: -3;
  transform: scale(var(--ag-bg-scale)) rotate(var(--ag-bg-rotate));
  transition: transform 1.1s ease, background-position 1.1s ease, filter 1.1s ease;
  filter: saturate(1.12) contrast(1.04) brightness(1.02);
  animation: ag-bg-drift 18s ease-in-out infinite alternate;
}

.animal-guess-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 110px 20px 28px;
}

.animal-guess-card {
  width: min(680px, 100%);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 12px 0 0;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
  transform-origin: 50% 18%;
  position: relative;
}

.animal-guess-card.is-round-enter .animal-guess-image {
  animation: ag-photo-pop 520ms cubic-bezier(.2,.8,.2,1);
}

.animal-guess-card.is-round-enter .animal-guess-question {
  animation: none;
}

.animal-guess-card.is-round-enter .animal-guess-options {
  animation: none;
}

.animal-guess-card.is-stage-question .animal-guess-question {
  animation: ag-question-flop 620ms cubic-bezier(.2,.8,.2,1) both;
}

.animal-guess-card.is-stage-options .animal-guess-options {
  animation: ag-options-rise 360ms ease both;
}

.animal-guess-card.is-intro-active .animal-guess-question,
.animal-guess-card.is-intro-active .animal-guess-options,
.animal-guess-card.is-intro-active .animal-guess-feedback {
  opacity: 0.08;
  transform: scale(0.98);
}

.animal-guess-media-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  padding-top: 8px;
}

.animal-guess-image {
  width: min(330px, 76vw);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.34);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 320ms ease, box-shadow 320ms ease;
}

.animal-guess-question {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: min(92%, 520px);
  margin: 0;
  font-size: clamp(2rem, 5.6vw, 3.3rem);
  line-height: 0.95;
  font-family: 'RoadRage-Regular', Impact, sans-serif;
  letter-spacing: 0.02em;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
}

.animal-guess-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 56px;
  transition: opacity 220ms ease, transform 220ms ease;
  opacity: 0;
}

.animal-guess-option {
  appearance: none;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 95, 86, 0.94), rgba(219, 56, 52, 0.96));
  color: var(--ag-text);
  min-height: 70px;
  padding: 14px 16px;
  font-size: 1.02rem;
  line-height: 1.15;
  text-align: center;
  font-family: inherit;
  cursor: pointer;
  transform: scale(0.94);
  opacity: 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.animal-guess-card.is-stage-options .animal-guess-option {
  animation: ag-option-in 420ms ease forwards;
}

.animal-guess-option:nth-child(2) { animation-delay: 70ms; }
.animal-guess-option:nth-child(3) { animation-delay: 140ms; }
.animal-guess-option:nth-child(4) { animation-delay: 210ms; }

.animal-guess-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: #ffffff;
  background: linear-gradient(180deg, rgba(255, 115, 106, 0.98), rgba(232, 70, 64, 0.98));
}

.animal-guess-option.is-correct {
  border-color: rgba(199, 255, 220, 0.96);
  background: linear-gradient(180deg, rgba(36, 170, 99, 0.98), rgba(20, 122, 66, 0.98));
}

.animal-guess-option.is-wrong {
  border-color: rgba(255, 218, 221, 0.96);
  background: linear-gradient(180deg, rgba(184, 43, 52, 0.98), rgba(118, 20, 28, 0.98));
}

.animal-guess-option:disabled {
  cursor: default;
}

.animal-guess-feedback {
  min-height: 52px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--ag-soft);
  font-size: 0.98rem;
  line-height: 1.35;
  backdrop-filter: blur(8px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.animal-guess-feedback.is-correct {
  color: #9dffbf;
}

.animal-guess-feedback.is-wrong {
  color: #ffb0b7;
}

.animal-guess-intro {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14px;
  background: transparent;
  z-index: 4;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.animal-guess-intro.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.animal-guess-intro__mode {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ag-accent);
  margin-bottom: 6px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.animal-guess-intro__question {
  font-size: 0;
  line-height: 0.95;
  font-family: 'RoadRage-Regular', Impact, sans-serif;
  text-transform: uppercase;
}

.animal-guess-gate {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(3, 6, 11, 0.82);
  z-index: 1400;
}

.animal-guess-gate.is-visible {
  display: flex;
}

.animal-guess-gate-card {
  width: min(460px, calc(100vw - 28px));
  text-align: center;
  padding: 28px 24px;
  border-radius: 26px;
  border: 1px solid var(--ag-border);
  background: rgba(7, 13, 24, 0.9);
}

.animal-guess-gate-card h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-family: 'RoadRage-Regular', Impact, sans-serif;
}

.animal-guess-gate-card p {
  margin: 12px 0 0;
  color: var(--ag-soft);
}

.animal-guess-gate-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.animal-guess-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.animal-guess-btn--primary {
  background: #ff5049;
  color: #fff;
}

.animal-guess-btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

@keyframes ag-option-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ag-photo-pop {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.9) rotate(-4deg);
  }
  70% {
    opacity: 1;
    transform: translateY(0) scale(1.03) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes ag-title-snap {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.88);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ag-question-flop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(24px) scale(0.62) rotate(-7deg);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px) scale(1.08) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1) rotate(0deg);
  }
}

@keyframes ag-options-rise {
  from {
    opacity: 0.2;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ag-bg-drift {
  0% {
    filter: saturate(1.02) contrast(1.01);
  }
  100% {
    filter: saturate(1.1) contrast(1.06);
  }
}

@media (max-width: 720px) {
  .animal-guess-shell {
    padding: 76px 12px 12px;
  }

  .animal-guess-card {
    padding: 0;
    border-radius: 0;
  }

  .animal-guess-media-wrap {
    padding-top: 0;
  }

  .animal-guess-options {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 34px;
  }

  .animal-guess-image {
    width: min(272px, 64vw);
  }

  .animal-guess-question {
    width: min(94%, 420px);
    bottom: -8px;
    font-size: clamp(1.45rem, 7.6vw, 2.3rem);
  }

  .animal-guess-option {
    min-height: 56px;
    padding: 10px 14px;
    font-size: 0.94rem;
    line-height: 1.05;
  }

  .animal-guess-feedback {
    min-height: 38px;
    margin-top: 10px;
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  body.animal-guess-page #stats {
    right: 10px;
    top: 8px;
    min-width: 114px;
  }

  body.animal-guess-page #score {
    font-size: 1.28em;
  }

  body.animal-guess-page #round {
    font-size: 0.82rem;
    margin-top: 2px;
  }
}
