* {
    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;
    padding: 20px;
}

.game-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

.mode-selector {
    text-align: center;
    margin-bottom: 20px;
}

.mode-btn {
    padding: 8px 16px;
    margin: 0 5px;
    border: none;
    border-radius: 5px;
    background: #667eea;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-btn.active {
    background: #764ba2;
    transform: scale(1.1);
}

.answer-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f0f0f0;
    border-radius: 10px;
}

.answer-slot {
    aspect-ratio: 1;
    border: 2px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    position: relative;
}

.answer-slot.filled {
    border-style: solid;
}

.player-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.player-slot {
    aspect-ratio: 1;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.player-slot:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.block-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.block-option {
    aspect-ratio: 1;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.block-option:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.submit-btn {
    background: #4CAF50;
    color: white;
}

.submit-btn:hover {
    background: #45a049;
}

.new-game-btn {
    background: #2196F3;
    color: white;
}

.new-game-btn:hover {
    background: #0b7dda;
}

.hint {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    color: #856404;
}

.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* 方块颜色 */
.red { background: #ff6b6b; }
.blue { background: #4dabf7; }
.green { background: #51cf66; }
.yellow { background: #ffd43b; }
.purple { background: #9775fa; }
.orange { background: #ff922b; }
.pink { background: #ff6ec7; }
.cyan { background: #22d3ee; }

@media (max-width: 480px) {
    .game-container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .answer-grid,
    .player-grid {
        gap: 5px;
        padding: 10px;
    }
    
    .block-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }
}