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

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

.container {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 20px;
    width: 100%;
    max-width: 800px;
    text-align: center;
}

.game-title {
    color: #333;
    font-size: 2.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.info-item {
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.info-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.game-container {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

#gameCanvas {
    display: block;
    margin: 0 auto;
    background-color: #000;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    height: auto;
}

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

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.btn-primary {
    background-color: #11998e;
    color: white;
}

.btn-primary:hover {
    background-color: #0f8c81;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(17, 153, 142, 0.4);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.direction-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.horizontal-buttons {
    display: flex;
    gap: 10px;
}

.btn-direction {
    width: 60px;
    height: 60px;
    font-size: 1.5em;
    padding: 0;
    background-color: #38ef7d;
    color: white;
    border-radius: 10px;
}

.btn-direction:hover {
    background-color: #2ed573;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(56, 239, 125, 0.4);
}

.game-instructions {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
}

.game-instructions h3 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.game-instructions ul {
    list-style-type: disc;
    padding-left: 20px;
    color: #666;
    line-height: 1.6;
}

.game-instructions li {
    margin-bottom: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-title {
        font-size: 2em;
    }
    
    #gameCanvas {
        width: 400px;
        height: 400px;
    }
    
    .game-info {
        gap: 10px;
    }
    
    .info-item {
        padding: 8px 12px;
    }
    
    .info-value {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 1.5em;
    }
    
    #gameCanvas {
        width: 300px;
        height: 300px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.9em;
        min-width: 80px;
    }
    
    .btn-direction {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
}