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

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid #3a3a3a;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 1px;
}

.stats-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 25px 0;
    flex-wrap: wrap;
}

.stat-box {
    background: #333333;
    padding: 20px 30px;
    border-radius: 8px;
    min-width: 130px;
    border: 1px solid #404040;
    transition: all 0.2s ease;
}

.stat-box:hover {
    background: #3a3a3a;
    border-color: #505050;
}

.stat-label {
    font-size: 0.85em;
    color: #b0b0b0;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 600;
    color: #ffffff;
}

canvas {
    background: #1e1e1e;
    margin: 25px 0;
    border: 2px solid #404040;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    height: auto;
}

.controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 25px;
}

button {
    background: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #505050;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.5px;
}

button:hover {
    background: #454545;
    border-color: #606060;
    color: #ffffff;
}

button:active {
    background: #353535;
}

.difficulty-selector {
    margin: 20px 0;
}

.difficulty-selector label {
    margin: 0 8px;
    cursor: pointer;
    padding: 8px 16px;
    background: #333333;
    border-radius: 6px;
    display: inline-block;
    transition: all 0.2s ease;
    border: 1px solid #404040;
    font-weight: 400;
    color: #b0b0b0;
}

.difficulty-selector input[type="radio"] {
    margin-right: 6px;
    accent-color: #6b6b6b;
    cursor: pointer;
}

.difficulty-selector label:has(input[type="radio"]:checked) {
    background: #3a3a3a;
    border-color: #606060;
    color: #ffffff;
}

.difficulty-selector label:hover {
    background: #383838;
    border-color: #505050;
}

.game-over-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.game-over-content {
    background: #2a2a2a;
    padding: 40px 50px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #404040;
}

.game-over-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 600;
}

.game-over-content p {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #b0b0b0;
}

.game-over-content button {
    margin-top: 20px;
}

.instructions {
    margin: 25px auto 0;
    font-size: 0.9em;
    color: #909090;
    max-width: 400px;
    padding: 15px;
    background: #333333;
    border-radius: 8px;
    border: 1px solid #404040;
    line-height: 1.6;
    text-align: center;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }
    
    .game-container {
        padding: 25px;
    }
    
    .stat-box {
        min-width: 100px;
        padding: 15px 20px;
    }
    
    .stat-value {
        font-size: 2em;
    }
}
