:root {
  --bg: #0f1222;
  --bg-soft: #171a30;
  --card: rgba(28, 33, 58, 0.72);
  --text: #ecf1ff;
  --muted: #b9c2e9;
  --accent: #74f0c0;
  --accent-2: #8ca6ff;
  --danger: #ff7d7d;
  --border: rgba(255, 255, 255, 0.12);
}

body.light {
  --bg: #eef2ff;
  --bg-soft: #dde5ff;
  --card: rgba(255, 255, 255, 0.8);
  --text: #1e2445;
  --muted: #58628f;
  --accent: #127a57;
  --accent-2: #3454d1;
  --border: rgba(23, 35, 89, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Fredoka", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, var(--bg-soft), var(--bg));
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  width: 34rem;
  height: 34rem;
  filter: blur(70px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

.glow-a {
  top: -8rem;
  left: -6rem;
  background: #7d6bff;
}

.glow-b {
  bottom: -8rem;
  right: -6rem;
  background: #00c2ff;
}

.topbar,
.footer,
.container {
  width: min(960px, 92vw);
  margin-inline: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

.badge {
  margin: 0;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  backdrop-filter: blur(10px);
}

.container {
  display: grid;
  gap: 1rem;
  padding-bottom: 2rem;
}

.grid-two {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  backdrop-filter: blur(10px);
  padding: 1rem;
}

.lift {
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(5, 9, 32, 0.24);
}

h1,
h2 {
  margin-top: 0;
  line-height: 1.15;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}

p {
  color: var(--muted);
}

.hero-actions,
.game-ui {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.primary-btn,
.ghost-btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.primary-btn {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #02151f;
}

.ghost-btn {
  background: transparent;
  border-color: var(--border);
}

.small {
  font-size: 0.9rem;
  padding: 0.55rem 0.8rem;
}

.microcopy {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.game-field {
  position: relative;
  margin-top: 0.7rem;
  width: 100%;
  height: 190px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.11);
}

.target-dot {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ff7f50);
  box-shadow: 0 0 0 0 rgba(255, 127, 80, 0.5);
  transition: transform 100ms ease;
}

.target-dot:active {
  transform: scale(0.94);
}

.guess-ui {
  display: grid;
  gap: 0.6rem;
}

input {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.guess-message {
  min-height: 1.25rem;
  margin: 0;
  font-size: 0.95rem;
}

.guess-message.ok {
  color: var(--accent);
}

.guess-message.err {
  color: var(--danger);
}

.footer {
  padding: 1rem 0 1.4rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}
