* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg-1: #0f1020;
  --bg-2: #1d2138;
  --bg-3: #34324d;
  --card: rgba(13, 16, 30, 0.76);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.75);
  --accent: #7bdff2;
  --accent-strong: #3ee6a8;
  --danger: #ff8a8a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

body {
  margin: 0;
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(123, 223, 242, 0.18),
      transparent 30%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(62, 230, 168, 0.12),
      transparent 26%
    ),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.game-card {
  width: min(100%, 540px);
  padding: 32px 28px 28px;
  border: 1px solid var(--card-border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(25, 28, 48, 0.92), var(--card));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 18px 0 12px;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.intro {
  margin: 0 auto 28px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.guess-form {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.guess-form input {
  width: min(100%, 260px);
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  font-size: 1.1rem;
  text-align: center;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.guess-form input::placeholder {
  color: #7a8192;
}

.guess-form input:focus {
  border-color: rgba(123, 223, 242, 0.85);
  box-shadow: 0 0 0 4px rgba(123, 223, 242, 0.18);
}

.guess-form button,
.reset-button {
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.guess-form button {
  padding: 14px 28px;
  color: #08111a;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 14px 28px rgba(62, 230, 168, 0.26);
}

.guess-form button:hover,
.reset-button:hover {
  transform: translateY(-1px);
}

.guess-form button:active,
.reset-button:active {
  transform: translateY(1px);
}

.status-panel {
  margin-top: 26px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.feedback {
  margin: 0 0 14px;
  min-height: 1.5em;
  font-size: 1.03rem;
  font-weight: 700;
}

.feedback.is-success {
  color: var(--accent-strong);
}

.feedback.is-warning {
  color: #ffd166;
}

.feedback.is-danger {
  color: var(--danger);
}

.stats {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.96rem;
}

.stats p {
  margin: 0;
}

.stats span {
  color: var(--text);
  font-weight: 700;
}

.reset-button {
  margin-top: 18px;
  padding: 12px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .game-card {
    padding: 28px 18px 22px;
    border-radius: 22px;
  }

  .intro {
    font-size: 0.98rem;
  }
}
