.main {
    grid-template-columns: minmax(0, 1fr) 400px;
}

.main .extra-panel {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* ---- 难度选择 ---- */
.diff-options {
    flex-wrap: wrap;
    gap: 8px;
}

.diff-options .radio-card {
    flex: 1 1 auto;
    min-width: 88px;
    justify-content: center;
}

.diff-options .radio-card input {
    position: absolute;
    opacity: 0;
}

/* ---- 按钮行（右侧面板底部） ---- */
.btn-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 15px 15px;
    background: #ffffff;
}

.btn-row .btn {
    width: 100%;
    justify-content: center;
}

.btn-warn {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #f0c36d;
    background: #fffbeb;
    color: #b45309;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-warn:hover {
    background: #fef3c7;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

/* ---- 统计 ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.stat {
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.stat b {
    display: block;
    font-size: 17px;
    color: #4338ca;
    font-variant-numeric: tabular-nums;
}

.stat span {
    font-size: 12px;
    color: #6b7280;
}

.level-bar {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #eef0f4;
    border-radius: 8px;
    padding: 8px 10px;
}

.level-bar b {
    color: #374151;
    font-variant-numeric: tabular-nums;
}

/* ---- 历史记录 ---- */
.record-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin: 16px 0 6px;
}

.record-title .link-btn {
    background: none;
    border: none;
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
}

.record-title .link-btn:hover {
    color: #ef4444;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #f3f4f6;
    font-size: 13px;
    color: #4b5563;
    font-variant-numeric: tabular-nums;
}

.record-item .rec-time {
    font-weight: 600;
    color: #374151;
}

.record-item .rec-date {
    font-size: 12px;
    color: #9ca3af;
}

.record-item.best .rec-time {
    color: #4338ca;
}

/* ---- 游戏面板 ---- */
.game-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
}

.game-top b {
    font-variant-numeric: tabular-nums;
    color: #374151;
}

.chip {
    background: #eef2ff;
    color: #4338ca;
    padding: 2px 9px;
    border-radius: 20px;
    font-weight: 600;
}

.timer {
    font-size: 20px;
    font-weight: 700;
    color: #4338ca;
    font-variant-numeric: tabular-nums;
}

.timer.on {
    color: #667eea;
}

.timer.warn {
    color: #ef4444;
    animation: timerblink 1s steps(2, start) infinite;
}

@keyframes timerblink {
    50% { opacity: 0.45; }
}

.board-wrap {
    position: relative;
    max-width: 440px;
    margin: 0 auto;
}

.light-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(56px, 1fr));
    gap: 10px;
    align-items: start;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.lamp {
    position: relative;
    width: 100%;
    min-height: 44px;
    aspect-ratio: 1 / 1;
    padding: 0;
    border-radius: 50%;
    border: 1px solid;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: background 0.18s, box-shadow 0.18s, border-color 0.18s, transform 0.08s;
}

.lamp.on {
    background: radial-gradient(circle at 35% 30%, #fff7cc 0%, #ffe066 52%, #f5b301 100%);
    border-color: #e0a800;
    box-shadow: 0 0 14px rgba(255, 200, 40, 0.55), inset 0 0 8px rgba(255, 255, 200, 0.8);
    color: #b45309;
}

.lamp.off {
    background: radial-gradient(circle at 40% 32%, #4b5563 0%, #374151 45%, #1f2937 100%);
    border-color: #4b5563;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
    color: #9ca3af;
}

.lamp:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.25);
}

.lamp.flash {
    animation: lampflash 0.3s ease;
}

@keyframes lampflash {
    0% { transform: scale(1); filter: brightness(1); }
    40% { transform: scale(0.85); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

.lamp.hint {
    border-color: #4338ca;
    outline: 2px solid rgba(102, 126, 234, 0.45);
    outline-offset: 2px;
}

.lamp.hint::after {
    content: '⭐';
    position: absolute;
    font-size: 14px;
    line-height: 1;
}

.lamp {
    position: relative;
}

/* ---- 覆盖层 ---- */
.board-mask {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.74);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 5;
    text-align: center;
    padding: 20px;
}

.board-mask .big {
    font-size: 42px;
}

.board-mask .txt {
    font-size: 15px;
    color: #374151;
}

.board-mask .sub {
    font-size: 12px;
    color: #9ca3af;
}

.board-mask.hidden {
    display: none;
}

/* ---- 提示按钮占位文案 ---- */
.seo-article ol {
    list-style: decimal;
    padding-left: 22px;
}

.seo-article ol li {
    margin-bottom: 8px;
}

.seo-article ul li {
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .light-grid {
        grid-template-columns: repeat(5, minmax(44px, 1fr));
        gap: 8px;
        max-width: 340px;
    }
}

@media (max-width: 900px) {
    .main {
        grid-template-columns: 1fr;
    }
}