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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #4a5568;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-board {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 10px;
}

.score-item {
    text-align: center;
    color: white;
    font-weight: bold;
}

.score-item .label {
    display: block;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.score-item span:last-child {
    font-size: 1.4em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.game-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(8, 50px);
    grid-template-rows: repeat(8, 50px);
    gap: 2px;
    background: #2d3748;
    padding: 10px;
    border-radius: 15px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.3);
}

.cell {
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #f7fafc, #edf2f7);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    user-select: none;
}

.cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.cell.selected {
    border-color: #ff6b6b;
    background: linear-gradient(145deg, #fed7d7, #feb2b2);
    transform: scale(1.1);
}

.cell.hint {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.cell.falling {
    animation: fall 0.5s ease-in;
}

@keyframes fall {
    from { transform: translateY(-100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cell.exploding {
    animation: explode 0.5s ease-out forwards;
}

@keyframes explode {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
    100% { transform: scale(0); opacity: 0; }
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.audio-controls {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 15px;
    text-align: center;
}

.audio-btn {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
}

.audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
}

.audio-btn.muted {
    background: linear-gradient(45deg, #a8a8a8, #d3d3d3);
    color: #666;
}

.volume-controls {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.volume-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    font-weight: bold;
}

.volume-control label {
    margin-bottom: 8px;
    font-size: 0.9em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.volume-control input[type="range"] {
    width: 100px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.8em;
}

.modal-content p {
    margin-bottom: 20px;
    font-size: 1.2em;
    color: #666;
}

.combo-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 2em;
    font-weight: bold;
    z-index: 999;
    animation: comboAnimation 2s ease-out forwards;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.combo-display.hidden {
    display: none;
}

@keyframes comboAnimation {
    0% { 
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    20% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    80% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    .game-board {
        grid-template-columns: repeat(8, 40px);
        grid-template-rows: repeat(8, 40px);
    }
    
    .cell {
        width: 40px;
        height: 40px;
        font-size: 1.5em;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 200px;
        margin: 5px 0;
    }
    
    .audio-controls {
        margin-top: 15px;
        padding: 10px;
    }
    
    .volume-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .volume-control input[type="range"] {
        width: 150px;
    }
}