:root {
  --bg-deep: #0f0b0c;
  --bg-panel: rgba(24, 12, 14, 0.9);
  --gold: #f1c26d;
  --gold-soft: #f7dba8;
  --red-warm: #a32b39;
  --red-dark: #6a1621;
  --text-main: #f8f2e7;
  --text-soft: #d8cbb7;
  --shadow-strong: 0 18px 45px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--text-main);
  background:
    linear-gradient(rgba(9, 6, 8, 0.86), rgba(9, 6, 8, 0.94)),
    url("background.png") center / cover no-repeat fixed,
    var(--bg-deep);
}

.page-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(0.9rem, 2.2vw, 1.5rem);
}

.mood-card {
  width: min(740px, 100%);
  border: 1px solid rgba(241, 194, 109, 0.35);
  border-radius: 1.3rem;
  background:
    linear-gradient(160deg, rgba(55, 18, 26, 0.92), rgba(23, 10, 12, 0.94)),
    url("background.png") center / cover no-repeat;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(2px);
  padding: clamp(1.1rem, 2.8vw, 1.8rem);
  text-align: center;
  overflow: hidden;
}

.card-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  letter-spacing: 0.02em;
  color: var(--gold-soft);
  text-shadow: 0 0 14px rgba(241, 194, 109, 0.28);
}

.subtitle {
  margin: 0.6rem auto 0;
  max-width: 40ch;
  color: var(--text-soft);
  font-size: clamp(0.95rem, 2.2vw, 1.08rem);
}

.archie-wrap {
  margin: clamp(0.9rem, 2vw, 1.25rem) auto;
}

.archie-image {
  display: block;
  width: min(100%, 360px);
  margin: 0 auto;
  border-radius: 1rem;
  border: 2px solid rgba(241, 194, 109, 0.5);
  box-shadow:
    0 0 0 3px rgba(109, 29, 39, 0.6),
    0 12px 24px rgba(0, 0, 0, 0.42);
}

.verdict-area {
  margin: 0 auto;
  max-width: 58ch;
  padding: 0.85rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(241, 194, 109, 0.35);
  background: rgba(14, 8, 9, 0.68);
}

.verdict-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.mood-text {
  margin: 0.42rem 0 0;
  font-size: clamp(1.06rem, 2.45vw, 1.35rem);
  line-height: 1.35;
  font-weight: 700;
  color: var(--text-main);
  text-wrap: balance;
}

.mood-text.is-animating {
  animation: royalVerdictIn 260ms ease;
}

.mood-button {
  appearance: none;
  border: 0;
  margin-top: 1rem;
  width: min(100%, 360px);
  padding: 0.92rem 1.1rem;
  border-radius: 0.9rem;
  font-size: clamp(1rem, 2.3vw, 1.13rem);
  font-weight: 700;
  color: #2d0d12;
  cursor: pointer;
  background: linear-gradient(180deg, #f8d79d, #e9b65a);
  box-shadow:
    0 0 0 2px rgba(241, 194, 109, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.45),
    0 0 22px rgba(241, 194, 109, 0.25);
  transition: transform 140ms ease, filter 140ms ease;
  animation: buttonGlow 3.2s ease-in-out infinite;
}

.mood-button:hover,
.mood-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.mood-button:active {
  transform: translateY(1px);
}

.mood-button:focus-visible {
  outline: 3px solid rgba(241, 194, 109, 0.7);
  outline-offset: 2px;
}

.counter-text {
  margin: 0.9rem 0 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

@keyframes royalVerdictIn {
  from {
    opacity: 0.2;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonGlow {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(241, 194, 109, 0.25),
      0 8px 22px rgba(0, 0, 0, 0.45),
      0 0 16px rgba(241, 194, 109, 0.2);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(241, 194, 109, 0.3),
      0 8px 22px rgba(0, 0, 0, 0.45),
      0 0 28px rgba(241, 194, 109, 0.45);
  }
}

@media (max-width: 480px) {
  .mood-card {
    border-radius: 1.05rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mood-button,
  .mood-text.is-animating {
    animation: none;
  }

  .mood-button {
    transition: none;
  }
}
