* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.game-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.game-header {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    padding: 20px;
    text-align: center;
    color: white;
}

.game-header h1 {
    font-size: 24px;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: bold;
}

.sound-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sound-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.screen {
    padding: 30px 20px;
    text-align: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hidden {
    display: none !important;
}

/* 难度选择界面 */
#difficultyScreen h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.game-rules {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.game-rules p {
    margin: 5px 0;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.difficulty-btn {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    border: none;
    border-radius: 15px;
    padding: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.difficulty-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.difficulty-btn.easy {
    background: linear-gradient(45deg, #55a3ff, #003d82);
}

.difficulty-btn.medium {
    background: linear-gradient(45deg, #feca57, #ff9ff3);
}

.difficulty-btn.hard {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
}

.btn-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.btn-text {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.btn-desc {
    font-size: 12px;
    opacity: 0.9;
}

/* 游戏界面 */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin: 20px;
}

.hole {
    aspect-ratio: 1;
    background: radial-gradient(circle, #8b4513 0%, #654321 70%, #3e2723 100%);
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.hole::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 10%;
    right: 10%;
    bottom: 10%;
    background: radial-gradient(circle, #2c1810 0%, #1a0f0a 100%);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.mole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 32px;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.mole.show {
    transform: translate(-50%, -50%) scale(1);
    animation: bounce 0.5s ease;
}

.mole.hit {
    animation: hit 0.3s ease;
}

@keyframes bounce {
    0% { transform: translate(-50%, -50%) scale(0) rotate(0deg); }
    50% { transform: translate(-50%, -50%) scale(1.2) rotate(10deg); }
    100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

@keyframes hit {
    0% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    25% { transform: translate(-50%, -50%) scale(1.3) rotate(-15deg); }
    50% { transform: translate(-50%, -50%) scale(0.8) rotate(15deg); }
    75% { transform: translate(-50%, -50%) scale(1.1) rotate(-10deg); }
    100% { transform: translate(-50%, -50%) scale(0) rotate(0deg); }
}

.pause-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pause-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* 游戏结束界面 */
#gameOverScreen h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
}

.final-score {
    background: linear-gradient(45deg, #feca57, #ff9ff3);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.score-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.game-stats {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.game-over-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.game-btn {
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .game-container {
        margin: 5px;
    }
    
    .game-header h1 {
        font-size: 20px;
    }
    
    .controls {
        font-size: 12px;
    }
    
    .game-board {
        gap: 8px;
        padding: 15px;
        margin: 15px;
    }
    
    .mole {
        font-size: 28px;
    }
}

@media (max-width: 360px) {
    .game-board {
        gap: 6px;
        padding: 12px;
        margin: 12px;
    }
    
    .mole {
        font-size: 24px;
    }
}

/* 音效关闭状态 */
.sound-btn.muted {
    opacity: 0.5;
}

.sound-btn.muted::after {
    content: '🔇';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}