/* ===== ballon-pop · 戳气球 ===== */

.bp-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 20px 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 60%, #fff 100%);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid #a7f3d0;
}

.bp-glow {
    position: absolute;
    top: -120px;
    left: 50%;
    width: 500px;
    height: 500px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.16) 0%, transparent 70%);
    pointer-events: none;
}

/* HUD */
.bp-hud {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 600px;
    margin-bottom: 18px;
}
.bp-hud-item {
    flex: 1;
    min-width: 70px;
    padding: 10px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    text-align: center;
    border: 1px solid #a7f3d0;
}
.bp-hud-item.best { background: linear-gradient(135deg, #fef3c7, #fde68a); border-color: #fcd34d; }
.bp-hud-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #047857;
    font-weight: 700;
}
.bp-hud-item.best .bp-hud-label { color: #b45309; }
.bp-hud-value {
    font-size: 20px;
    font-weight: 800;
    color: #065f46;
    line-height: 1.2;
    margin-top: 2px;
}
.bp-hud-item.best .bp-hud-value { color: #92400e; }
.bp-combo {
    font-size: 22px;
    color: #dc2626;
}
.bp-hearts { font-size: 16px; letter-spacing: 1px; }

/* 操作行 */
.bp-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 600px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.bp-btn {
    padding: 10px 22px;
    border-radius: 10px;
    border: 1px solid #a7f3d0;
    background: #fff;
    color: #047857;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.bp-btn:hover { background: #ecfdf5; transform: translateY(-1px); }
.bp-btn:active { transform: translateY(0); }
.bp-btn.primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.4);
}
.bp-btn.primary:hover { background: linear-gradient(135deg, #16a34a, #15803d); }
.bp-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.bp-hint {
    margin-left: auto;
    font-size: 12.5px;
    color: #047857;
    opacity: 0.7;
}

/* 气球游戏区（DOM 实现） */
.bp-board-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    aspect-ratio: 560 / 520;
    display: grid;
    place-items: center;
}
.bp-board {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
    box-shadow: 0 16px 40px rgba(34, 197, 94, 0.18);
    touch-action: none;
    user-select: none;
    border: 3px solid #a7f3d0;
    overflow: hidden;
}
.bp-board::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 25%;
    background: linear-gradient(180deg, transparent, rgba(22, 163, 74, 0.15));
    pointer-events: none;
}

/* 单个气球 */
.bp-balloon {
    position: absolute;
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.08s ease;
    will-change: transform, bottom;
    animation: bp-sway 2.4s ease-in-out infinite alternate;
}
.bp-balloon:active { transform: scale(0.85); }
.bp-balloon.popping {
    animation: bp-pop 0.35s ease forwards;
    pointer-events: none;
}
@keyframes bp-sway {
    0% { transform: translateX(-6px); }
    100% { transform: translateX(6px); }
}
@keyframes bp-pop {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(0.3); opacity: 0; }
}

/* 分数飘字 */
.bp-float-score {
    position: absolute;
    font-size: 18px;
    font-weight: 800;
    color: #16a34a;
    pointer-events: none;
    animation: bp-float 0.8s ease forwards;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}
@keyframes bp-float {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

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

.bp-overlay-card {
    text-align: center;
    padding: 28px 26px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 16px 44px rgba(34, 197, 94, 0.2);
    max-width: 86%;
    border: 1px solid #a7f3d0;
}
.bp-overlay-emoji { font-size: 48px; line-height: 1; margin-bottom: 10px; }
.bp-overlay-title { font-size: 26px; font-weight: 900; color: #065f46; letter-spacing: -0.02em; }
.bp-overlay-text { font-size: 14px; color: #047857; margin: 8px 0 14px; line-height: 1.6; }
.bp-overlay-stats {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.bp-overlay-stat {
    padding: 8px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    font-size: 13px;
    color: #065f46;
    font-weight: 600;
}
.bp-overlay-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* 简介区 */
.bp-info { margin-bottom: 28px; }

/* 响应式 */
@media (max-width: 768px) {
    .bp-hero { padding: 24px 14px 22px; }
    .bp-hud-item { min-width: 60px; padding: 8px 10px; }
    .bp-hud-value { font-size: 16px; }
    .bp-btn { padding: 9px 16px; font-size: 13px; }
    .bp-hint { display: none; }
    .bp-balloon { font-size: 36px; }
}
@media (max-width: 420px) {
    .bp-hud { gap: 6px; }
    .bp-hud-item { min-width: 0; flex: 1 1 30%; }
}

@media (prefers-reduced-motion: reduce) {
    .bp-balloon { animation: none; }
    .bp-overlay { animation: none; }
    .bp-float-score { animation: none; }
}
