body {
    min-height: 100vh;
    background-color: #0b1120;
    background-image: radial-gradient(ellipse at 30% 20%, rgba(30, 58, 138, 0.12) 0%, transparent 60%),
                      radial-gradient(ellipse at 70% 80%, rgba(88, 28, 135, 0.10) 0%, transparent 60%);
    color: #e2e8f0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header { text-align: center; padding: 50px 16px 20px; }
h1 { font-size: 1.8rem; font-weight: 700; margin: 0; }

main {
    width: 100%;
    max-width: 680px;
    padding: 0 16px 60px;
}

/* ---- toolbar ---- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    margin-bottom: 16px;
    backdrop-filter: blur(10px);
}
.stat { text-align: center; min-width: 60px; }
.stat-label {
    display: block;
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #e2e8f0;
}
.start-btn {
    margin-left: auto;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(129, 140, 248, 0.4);
    border-radius: 10px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    color: #0b1120;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
}
.start-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(96, 165, 250, 0.4); }

/* ---- board ---- */
.board-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 14px;
    padding: 12px;
    backdrop-filter: blur(10px);
}
#board {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    background: linear-gradient(180deg, #0f172a 0%, #111c33 100%);
}

.overlay {
    position: absolute;
    inset: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 17, 32, 0.8);
    border-radius: 8px;
    transition: opacity 0.25s;
}
.overlay.hidden { opacity: 0; pointer-events: none; }
.overlay-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #a5b4fc;
    text-align: center;
    padding: 0 24px;
}

.hint {
    text-align: center;
    margin-top: 14px;
    color: #64748b;
    font-size: 0.85rem;
}

/* ---- responsive ---- */
@media (max-width: 640px) {
    header { padding-top: 30px; }
    .toolbar { gap: 14px; padding: 12px; }
    .stat { min-width: 44px; }
    .stat-value { font-size: 1.1rem; }
    .start-btn { padding: 7px 14px; font-size: 0.8rem; }
    .overlay-text { font-size: 1.1rem; }
}
