* {
    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;
}

.container {
    max-width: 800px;
    width: 100%;
    padding: 20px;
    text-align: center;
}

.game-header {
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    color: #f59563;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-box {
    background: #bbada0;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.info-label {
    display: block;
    font-size: 0.8rem;
    color: #eee4da;
    margin-bottom: 3px;
}

.info-box span:last-child {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-controls button {
    background: #8f7a66;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.game-controls button:hover {
    background: #7f6a56;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.game-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#difficulty {
    background: #8f7a66;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#difficulty option {
    background: #8f7a66;
    color: white;
}

.game-area {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

#gameCanvas {
    border: 3px solid #8f7a66;
    border-radius: 8px;
    background: #f7f7f7;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
}

.game-overlay.show {
    display: flex;
}

.game-message {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.game-message h2 {
    color: #535353;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.game-message p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.game-message button {
    background: #8f7a66;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-message button:hover {
    background: #7f6a56;
}

.instructions {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.instructions h3 {
    color: #535353;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.instructions p {
    color: #666;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 800px) {
    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 600px;
        height: auto;
    }
    
    .game-info {
        gap: 15px;
    }
    
    .info-box {
        padding: 8px 12px;
        min-width: 70px;
    }
    
    .game-controls {
        gap: 10px;
    }
    
    .game-controls button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .game-info {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .game-controls button,
    #difficulty {
        width: 200px;
        padding: 12px 20px;
    }
    
    .instructions {
        padding: 15px;
    }
    
    .instructions h3 {
        font-size: 1.2rem;
    }
    
    .instructions p {
        font-size: 0.9rem;
    }
} 