/* ===== number-tower · 数字塔求和 ===== */

.nt-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, #f5f3ff 0%, #fff 55%, #faf5ff 100%);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid #e9d5ff;
}

.nt-glow {
    position: absolute;
    top: -140px;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

/* HUD */
.nt-hud {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    margin-bottom: 16px;
}
.nt-hud-item {
    flex: 1;
    min-width: 96px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e9d5ff;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
    text-align: center;
}
.nt-hud-label {
    font-size: 11px;
    color: #6b21a8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.nt-hud-value {
    font-size: 22px;
    font-weight: 900;
    color: #7c3aed;
    margin-top: 2px;
}
.nt-hud-item.best { background: linear-gradient(135deg, #8b5cf6, #6d28d9); border-color: transparent; }
.nt-hud-item.best .nt-hud-label { color: rgba(255,255,255,0.8); }
.nt-hud-item.best .nt-hud-value { color: #fff; }
.nt-hud-item.target { border-color: #c084fc; box-shadow: 0 0 14px rgba(192, 132, 252, 0.3); }

/* 清零行 */
.nt-clear-row {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 520px;
    margin-bottom: 18px;
    font-size: 13px;
    color: #6b21a8;
}
.nt-clear-dots { font-size: 16px; letter-spacing: 4px; color: #7c3aed; }
.nt-clear-btn, .nt-confirm-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e9d5ff;
    background: #fff;
    color: #7c3aed;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, background 0.15s ease;
}
.nt-clear-btn:hover { background: #f5f3ff; transform: translateY(-1px); }
.nt-confirm-btn {
    background: linear-gradient(135deg, #10b981, #047857);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.nt-confirm-btn:disabled {
    background: #a1a1aa;
    cursor: not-allowed;
    box-shadow: none;
}

/* 棋盘 */
.nt-board-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
}
.nt-board {
    --nt-gap: 8px;
    --nt-size: 5;
    display: grid;
    grid-template-columns: repeat(var(--nt-size), 1fr);
    gap: var(--nt-gap);
    padding: var(--nt-gap);
    background: linear-gradient(135deg, #e9d5ff, #c4b5fd);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(139, 92, 246, 0.18);
    touch-action: manipulation;
    user-select: none;
    aspect-ratio: 1 / 1;
}

.nt-cell {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: clamp(20px, 5vw, 34px);
    font-weight: 900;
    cursor: pointer;
    background: #fff;
    color: #6d28d9;
    border: 2px solid #e9d5ff;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, color 0.15s ease;
    animation: nt-appear 0.25s ease backwards;
}
.nt-cell:hover:not(.nt-selected):not(.nt-empty) { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(139, 92, 246, 0.2); }
.nt-cell:active:not(.nt-empty) { transform: scale(0.92); }

.nt-cell.nt-selected {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 0 0 3px #c4b5fd, 0 0 14px rgba(139, 92, 246, 0.5);
    transform: scale(1.05);
}

.nt-cell.is-match {
    animation: nt-match 0.5s ease forwards;
}
.nt-cell.is-fall {
    animation: nt-fall 0.25s ease;
}

@keyframes nt-appear {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes nt-match {
    0% { transform: scale(1); opacity: 1; }
    30% { transform: scale(1.2); opacity: 1; background: #10b981; color: #fff; }
    100% { transform: scale(0); opacity: 0; }
}
@keyframes nt-fall {
    from { transform: translateY(-30px); opacity: 0.3; }
    to { transform: translateY(0); opacity: 1; }
}

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

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

.nt-btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid #e9d5ff;
    background: #fff;
    color: #7c3aed;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.nt-btn.primary {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(109, 40, 217, 0.35);
}

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

/* 响应式 */
@media (max-width: 768px) {
    .nt-hero { padding: 24px 14px 22px; }
    .nt-hud { gap: 8px; }
    .nt-hud-item { min-width: 72px; padding: 8px 10px; }
    .nt-hud-value { font-size: 18px; }
}
