/* 打地鼠小游戏样式 */

.wam-page {
    min-height: 100vh;
    padding: 24px 16px 40px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.55), transparent 35%),
        linear-gradient(180deg, #fff7d6 0%, #ffe4e1 45%, #dff7ff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    box-sizing: border-box;
}

.wam-hero {
    width: min(1100px, 100%);
    text-align: center;
    padding: 18px 16px 8px;
}

.wam-badge {
    display: inline-block;
    padding: 8px 14px;
    border: 3px solid #111;
    background: #ffe66d;
    color: #111;
    font-weight: 800;
    font-size: 14px;
    border-radius: 999px;
    box-shadow: 4px 4px 0 #111;
    margin-bottom: 14px;
}

.wam-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.1;
    color: #111;
    text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.8);
}

.wam-hero p {
    margin: 10px auto 0;
    max-width: 760px;
    color: #333;
    font-size: 16px;
    line-height: 1.7;
}

.wam-panel {
    width: min(1100px, 100%);
    border: 4px solid #111;
    background: #fff;
    box-shadow: 8px 8px 0 #111;
    border-radius: 22px;
    padding: 18px;
}

.wam-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.wam-stat {
    border: 3px solid #111;
    background: #fff8f0;
    border-radius: 16px;
    padding: 12px 10px;
    text-align: center;
    box-shadow: 4px 4px 0 #111;
}

.wam-stat .label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 8px;
    font-weight: 700;
}

.wam-stat .value {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: #111;
    line-height: 1;
}

.wam-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.wam-btn {
    border: 3px solid #111;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    box-shadow: 4px 4px 0 #111;
    font-size: 16px;
}

.wam-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 #111;
}

.wam-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111;
}

.wam-btn.primary {
    background: #7cff6b;
    color: #111;
}

.wam-btn.secondary {
    background: #fff;
    color: #111;
}

.difficulty-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
}

.wam-chip {
    border: 3px solid #111;
    background: #f7f7f7;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 3px 3px 0 #111;
}

.wam-chip.active {
    background: #ffef79;
}

.wam-tips {
    border: 3px solid #111;
    border-radius: 18px;
    background: #f9fbff;
    padding: 14px 16px;
}

.wam-tips > span {
    display: inline-block;
    font-weight: 900;
    font-size: 14px;
    margin-bottom: 8px;
    background: #111;
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
}

.wam-tips ul {
    margin: 8px 0 0;
    padding-left: 20px;
    color: #333;
    line-height: 1.7;
}

.wam-game {
    width: min(1100px, 100%);
    border: 4px solid #111;
    border-radius: 24px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.35), transparent 40%),
        linear-gradient(180deg, #b9f3ff 0%, #95e4a4 100%);
    box-shadow: 10px 10px 0 #111;
    padding: 18px;
}

.wam-hud {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.wam-effect {
    min-width: 180px;
    text-align: center;
    padding: 10px 16px;
    border: 3px solid #111;
    background: #fff;
    border-radius: 999px;
    font-weight: 900;
    box-shadow: 4px 4px 0 #111;
}

.wam-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(88px, 1fr));
    gap: 16px;
    max-width: 760px;
    margin: 0 auto;
    padding: 10px;
}

.hole {
    position: relative;
    aspect-ratio: 1 / 1;
    border: 4px solid #111;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 55%, #000 0 31%, transparent 32%),
        radial-gradient(circle at 50% 50%, #5f381f 0 55%, #2b160c 56% 100%);
    overflow: visible;
    cursor: pointer;
    box-shadow: inset 0 8px 0 rgba(255, 255, 255, 0.08), 4px 4px 0 #111;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
}

.hole::after {
    content: "";
    position: absolute;
    inset: 14%;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.mole {
    position: absolute;
    left: 50%;
    bottom: 4%;
    width: 80%;
    max-width: 260px;
    height: auto;
    transform: translateX(-50%) scale(0.84);
    transform-origin: center bottom;
    transition: transform 0.16s ease, opacity 0.16s ease;
    filter: drop-shadow(2px 4px 0 rgba(0, 0, 0, 0.25));
    opacity: 0;
    user-select: none;
    pointer-events: none;
    z-index: 2;
}

.hole.up .mole {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(0.96);
}

.hole.hit {
    animation: wam-hit 0.22s ease;
}

.hole.freeze {
    background:
        radial-gradient(circle at 50% 55%, #000 0 31%, transparent 32%),
        radial-gradient(circle at 50% 50%, #9de7ff 0 55%, #3aa9ff 56% 100%);
}

.hole.bomb {
    background:
        radial-gradient(circle at 50% 55%, #000 0 31%, transparent 32%),
        radial-gradient(circle at 50% 50%, #ff7b54 0 55%, #ff2d2d 56% 100%);
}

.hole.double {
    background:
        radial-gradient(circle at 50% 55%, #000 0 31%, transparent 32%),
        radial-gradient(circle at 50% 50%, #ffe87a 0 55%, #ffc107 56% 100%);
}

@keyframes wam-hit {
    0% { transform: scale(1); }
    50% { transform: scale(0.94); }
    100% { transform: scale(1); }
}

.wam-footer {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.wam-card {
    border: 3px solid #111;
    background: #fff;
    border-radius: 18px;
    padding: 14px 16px;
    box-shadow: 4px 4px 0 #111;
}

.wam-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #111;
}

.wam-card p {
    margin: 0;
    color: #444;
    line-height: 1.7;
    font-size: 14px;
}

.wam-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.wam-overlay.show {
    display: flex;
}

.wam-result {
    width: min(420px, 100%);
    border: 4px solid #111;
    background: #fff;
    border-radius: 24px;
    box-shadow: 10px 10px 0 #111;
    text-align: center;
    padding: 28px 22px;
}

.result-emoji {
    font-size: 64px;
    margin-bottom: 8px;
}

.wam-result h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #111;
}

#wam-result,
#resultText {
    margin: 0 0 16px;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hidden {
    display: none !important;
}

.wam-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    border: 3px solid #111;
    background: #fff;
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: 4px 4px 0 #111;
    font-weight: 800;
    z-index: 2100;
    display: none;
}

.wam-toast.show {
    display: block;
    animation: wam-toast-in 0.18s ease;
}

@keyframes wam-toast-in {
    from { transform: translateX(-50%) translateY(12px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (max-width: 900px) {
    .wam-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wam-footer {
        grid-template-columns: 1fr;
    }

    .difficulty-group {
        margin-left: 0;
        width: 100%;
    }

    .wam-board {
        max-width: 100%;
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .wam-page {
        padding: 16px 12px 32px;
    }

    .wam-panel,
    .wam-game,
    .wam-hero {
        box-shadow: 6px 6px 0 #111;
        border-radius: 18px;
    }

    .wam-board {
        grid-template-columns: repeat(3, minmax(78px, 1fr));
        gap: 10px;
        padding: 4px;
    }

    .wam-stat .value {
        font-size: 24px;
    }

    .wam-btn,
    .wam-chip {
        width: 100%;
        justify-content: center;
    }

    .wam-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .wam-game {
        padding: 14px;
    }
}
