* {
    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: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 20px;
    max-width: 600px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item span:first-child {
    color: #718096;
}

.info-item span:last-child {
    color: #2d3748;
}

.game-board {
    width: 100%;
    height: 400px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin: 20px 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.row {
    display: flex;
    height: 100px;
    width: 100%;
}

.tile {
    flex: 1;
    background: white;
    border: 1px solid #444;
    cursor: pointer;
    transition: all 0.1s ease;
}

.tile.black {
    background: #1a202c;
}

.tile:hover {
    transform: scale(0.98);
}

.tile:active {
    transform: scale(0.95);
}

.tile.correct {
    background: #48bb78;
    animation: correct 0.3s ease;
}

.tile.wrong {
    background: #f56565;
    animation: wrong 0.3s ease;
}

@keyframes correct {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); background: #38a169; }
    100% { transform: scale(1); background: #1a202c; }
}

@keyframes wrong {
    0% { transform: scale(1); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

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

.control-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #4299e1;
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

.control-btn:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#pauseBtn {
    background: #ed8936;
}

#resetBtn {
    background: #f56565;
}

.instructions {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.instructions h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

.instructions p {
    color: #718096;
    margin: 5px 0;
    font-size: 0.95rem;
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.game-over h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #f56565;
}

.game-over p {
    font-size: 1.2rem;
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .game-board {
        height: 300px;
    }
    
    .row {
        height: 75px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 80%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .game-board {
        height: 250px;
    }
    
    .row {
        height: 62.5px;
    }
}