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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

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

.game-header h1 {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.game-header p {
    color: #666;
    font-size: 1.1em;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.score-container {
    display: flex;
    gap: 10px;
}

.score-box {
    background: #9C27B0;
    padding: 10px 20px;
    border-radius: 8px;
    text-align: center;
    min-width: 80px;
}

.score-label {
    display: block;
    color: #f3e5f5;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.score-value {
    display: block;
    color: white;
    font-size: 24px;
    font-weight: bold;
}

.btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.game-board {
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    background: #2d2d2d;
}

.game-message {
    text-align: center;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    min-height: 50px;
}

.game-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.game-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.game-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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

.game-instructions h3 {
    color: #333;
    margin-bottom: 15px;
}

.game-instructions ul {
    list-style: none;
    padding-left: 0;
}

.game-instructions li {
    color: #666;
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}

.game-instructions li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #9C27B0;
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .game-wrapper {
        padding: 20px;
    }

    .game-header h1 {
        font-size: 2em;
    }

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

    .score-container {
        justify-content: center;
    }
}
