:root {
  --bg-1: #6366f1;
  --bg-2: #8b5cf6;
  --bg-3: #ec4899;
  --card: rgba(255, 255, 255, 0.95);
  --text: #1e1b4b;
  --muted: #6b7280;
  --board: #1e1b4b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-1), var(--bg-2), var(--bg-3));
  background-size: 200% 200%;
  animation: gradient 12s ease infinite;
  -webkit-tap-highlight-color: transparent;
}

@keyframes gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card {
  width: 100%;
  max-width: 460px;
  padding: 24px 28px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
}

header {
  text-align: center;
  margin-bottom: 20px;
}

header h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
  color: var(--bg-1);
}

header p {
  font-size: 0.85rem;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  flex: 1;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--bg-1), var(--bg-3));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(139, 92, 246, 0.45);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(139, 92, 246, 0.55); }
.btn:active { transform: translateY(0) scale(0.97); }

.ghost {
  flex: 1;
  padding: 12px 24px;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
  background: #f5f3ff;
  border: 1px solid #e9e5ff;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ghost:hover { background: #ede9fe; }
.ghost:active { transform: scale(0.98); }

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
  margin-top: 12px;
}

.stat .label {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.stat .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--bg-1);
  line-height: 1.2;
}

#statusStat {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

@media (hover: none), (max-width: 520px) {
  .controls { justify-content: flex-start; }
}