/* ===== chain-blast · 数字连锁爆破 ===== */

.cb-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 28px;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at top, #fff1f5 0%, #fff 55%, #fff7fb 100%);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid #ffe3ec;
}

.cb-glow {
    position: absolute;
    top: -140px;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 99, 132, 0.22) 0%, transparent 70%);
    pointer-events: none;
}

/* HUD */
.cb-hud {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    margin-bottom: 16px;
}
.cb-hud-item {
    flex: 1;
    min-width: 96px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #ffd6e3;
    box-shadow: 0 4px 12px rgba(255, 99, 132, 0.08);
    text-align: center;
}
.cb-hud-label {
    font-size: 11px;
    color: #a07080;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.cb-hud-value {
    font-size: 20px;
    font-weight: 900;
    color: #d6336c;
    margin-top: 2px;
}
.cb-hud-item.best { background: linear-gradient(135deg, #ff6b9d, #c44569); border-color: transparent; }
.cb-hud-item.best .cb-hud-label { color: rgba(255,255,255,0.8); }
.cb-hud-item.best .cb-hud-value { color: #fff; }

/* 操作行 */
.cb-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 520px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.cb-btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid #ffd6e3;
    background: #fff;
    color: #d6336c;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}
.cb-btn:hover { background: #fff1f5; transform: translateY(-1px); }
.cb-btn:active { transform: translateY(0); }
.cb-btn.primary {
    background: linear-gradient(135deg, #ff6b9d, #d6336c);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(214, 51, 108, 0.35);
}
.cb-btn.primary:hover { background: linear-gradient(135deg, #ff4f8a, #b8285c); }
.cb-hint {
    margin-left: auto;
    font-size: 12.5px;
    color: #a07080;
}

/* 棋盘 */
.cb-board-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
}
.cb-board {
    --cb-gap: 6px;
    --cb-size: 7;
    --cb-cell: calc((100% - var(--cb-gap) * (var(--cb-size) - 1)) / var(--cb-size));
    display: grid;
    grid-template-columns: repeat(var(--cb-size), 1fr);
    gap: var(--cb-gap);
    padding: var(--cb-gap);
    background: linear-gradient(135deg, #ffe3ec, #ffd6e3);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(214, 51, 108, 0.18);
    touch-action: manipulation;
    user-select: none;
    aspect-ratio: 1 / 1;
}

.cb-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
    animation: cb-appear 0.25s ease backwards;
    overflow: hidden;
}
.cb-cell[data-v="1"] { background: #ffe8d6; color: #b36a2f; }
.cb-cell[data-v="2"] { background: #ffd6a8; color: #a15a1e; }
.cb-cell[data-v="3"] { background: #ffb347; color: #7a3f0f; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.12); }
.cb-cell[data-v="4"] { background: #ff8c42; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18); }
.cb-cell[data-v="5"] { background: #ff6b6b; color: #fff; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.22); }
.cb-cell[data-v="6"] { background: #d6336c; color: #fff; box-shadow: 0 0 12px rgba(214,51,108,0.4); }
.cb-cell[data-v="7"] { background: #9c36b5; color: #fff; box-shadow: 0 0 14px rgba(156,54,181,0.45); }
.cb-cell[data-v="8"] { background: #6741d9; color: #fff; box-shadow: 0 0 16px rgba(103,65,217,0.5); }
.cb-cell[data-v="9"] { background: #212529; color: #fff; box-shadow: 0 0 18px rgba(33,37,41,0.55); }

.cb-cell:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cb-cell:active { transform: scale(0.94); }

.cb-cell.is-flash {
    animation: cb-flash 0.35s ease;
}
.cb-cell.is-blow {
    animation: cb-blow 0.45s forwards ease-out;
    pointer-events: none;
}
@keyframes cb-appear {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes cb-flash {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.6) saturate(1.4); transform: scale(1.1); }
}
@keyframes cb-blow {
    0% { transform: scale(1) translateY(0); opacity: 1; }
    30% { transform: scale(1.5) translateY(-10px); opacity: 0.9; }
    100% { transform: scale(0) translateY(-40px) rotate(30deg); opacity: 0; }
}

/* 覆盖层 */
.cb-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    background: rgba(255, 227, 236, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 14px;
    animation: cb-fade 0.25s ease;
}
.cb-overlay[hidden] { display: none; }
@keyframes cb-fade { from { opacity: 0; } to { opacity: 1; } }

.cb-overlay-card {
    text-align: center;
    padding: 28px 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(214, 51, 108, 0.25);
    max-width: 86%;
}
.cb-overlay-emoji { font-size: 48px; line-height: 1; margin-bottom: 10px; }
.cb-overlay-title { font-size: 26px; font-weight: 900; color: #d6336c; letter-spacing: -0.02em; }
.cb-overlay-text { font-size: 14px; color: #a07080; margin: 8px 0 18px; }
.cb-overlay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 简介区 */
.cb-info { margin-bottom: 28px; }
.cb-info .detail-title-row { margin-bottom: 16px; }
.cb-info h1 { font-size: 28px; }

/* 响应式 */
@media (max-width: 768px) {
    .cb-hero { padding: 24px 14px 22px; }
    .cb-hud { gap: 8px; }
    .cb-hud-item { min-width: 72px; padding: 8px 10px; }
    .cb-hud-value { font-size: 16px; }
    .cb-hint { display: none; }
    .cb-board { --cb-gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    .cb-cell, .cb-cell.is-flash, .cb-cell.is-blow { animation: none; }
}
