@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #667085;
  --accent: #e85d04;
  --accent-dark: #c94700;
  --paper: #fffdf8;
  --line: #eadfce;
  --background: #f3ede2;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 15% 20%, #f9d8a9 0 12%, transparent 32%),
              radial-gradient(circle at 90% 80%, #c6d9cf 0 10%, transparent 30%),
              var(--background);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
}

.game-card {
  width: min(100%, 450px);
  padding: clamp(30px, 7vw, 54px);
  border: 1px solid rgba(234, 223, 206, .9);
  border-radius: 8px;
  background: rgba(255, 253, 248, .94);
  box-shadow: 0 24px 60px rgba(73, 57, 36, .12);
  animation: appear .5s ease-out both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.6rem, 10vw, 4rem);
  line-height: .95;
  letter-spacing: 0;
}

.subtitle {
  margin: 16px 0 32px;
  color: var(--muted);
  font-size: 1.05rem;
}

label {
  display: block;
  margin-bottom: 9px;
  font-size: .9rem;
  font-weight: 700;
}

.guess-row { display: flex; gap: 10px; }

input, button {
  min-height: 48px;
  border-radius: 6px;
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
}

input:focus-visible, button:focus-visible {
  outline: 3px solid rgba(232, 93, 4, .25);
  outline-offset: 2px;
}

button {
  padding: 0 20px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, background-color .15s ease;
}

button:hover { transform: translateY(-1px); }

#try-button {
  flex: 0 0 auto;
  background: var(--accent);
  color: white;
}

#try-button:hover { background: var(--accent-dark); }

.message {
  min-height: 48px;
  margin: 26px 0 12px;
  padding: 13px 14px;
  border-left: 3px solid var(--accent);
  background: #fff5e9;
  color: #51311c;
  line-height: 1.4;
}

.attempts {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.secondary-button {
  width: 100%;
  margin-top: 24px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.secondary-button:hover { background: #f8f0e4; }

button:disabled, input:disabled { cursor: not-allowed; opacity: .55; }

@keyframes appear {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 380px) {
  .guess-row { flex-direction: column; }
  #try-button { width: 100%; }
}
