:root {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --ok: #34d399;
  --warn: #fbbf24;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #1e3a5f, var(--bg));
  color: var(--text);
}

.card {
  width: min(92vw, 420px);
  padding: 32px 28px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.hint,
.status,
.tries {
  margin: 0 0 12px;
}

.hint,
.tries {
  color: var(--muted);
}

.status {
  min-height: 1.5em;
  font-size: 18px;
  font-weight: 600;
}

.status.high {
  color: var(--warn);
}

.status.low {
  color: var(--accent);
}

.status.win {
  color: var(--ok);
}

form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

label {
  font-size: 14px;
  color: var(--muted);
}

input {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0f172a;
  color: var(--text);
  font-size: 18px;
}

button {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #0f172a;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

button[hidden] {
  display: none;
}

#restart-btn {
  width: 100%;
  margin-top: 12px;
  background: #64748b;
  color: #fff;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
