:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: rgba(7, 20, 40, 0.9);
  --panel-2: rgba(17, 32, 58, 0.95);
  --accent: #5eead4;
  --accent-2: #60a5fa;
  --text: #f8fafc;
  --muted: #9fb0c5;
  --danger: #fb7185;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, #122544 0%, var(--bg) 70%);
  color: var(--text);
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

.app-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: grid;
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(2, 8, 23, 0.3);
}

.hero-card {
  text-align: center;
  padding-bottom: 30px;
}

.eyebrow {
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 10px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.hero-copy {
  margin: 0 auto 20px;
  max-width: 660px;
  color: var(--muted);
  line-height: 1.6;
}

.mode-switcher {
  display: inline-flex;
  gap: 10px;
  background: var(--panel-2);
  padding: 8px;
  border-radius: 999px;
}

.mode-button,
.primary,
.secondary {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.mode-button {
  background: transparent;
  color: var(--muted);
}

.mode-button.active,
.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #02111f;
  font-weight: 700;
}

.mode-button:hover,
.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.setup-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}

input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(94, 234, 212, 0.16);
}

#startGameButton {
  align-self: end;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.game-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.setup-area {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.secret-card {
  background: var(--panel-2);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.turn-pill {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.16);
  color: var(--accent);
  margin-bottom: 14px;
}

.scoreboard {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.score-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--text);
}

.point-notice {
  display: inline-block;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.16);
  color: var(--accent);
  font-weight: 700;
  animation: pulse 0.4s ease;
}

.turn-timer {
  display: inline-block;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.15);
  color: var(--accent-2);
  font-size: 0.95rem;
  font-weight: 700;
}

@keyframes pulse {
  from { transform: scale(0.98); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}

.secret-display {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.guess-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.guess-row input {
  flex: 1;
}

.feedback-list {
  display: grid;
  gap: 10px;
}

.feedback-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 12px 14px;
}

.feedback-item strong {
  color: var(--accent);
}

.feedback-item ul {
  margin: 8px 0 0 18px;
  padding: 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 720px) {
  .setup-grid,
  .setup-area,
  .guess-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .game-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
