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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #1a2a6c);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
}

#gameCanvas {
    background: #70c5ce;
    display: block;
}

.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: center;
    pointer-events: all;
}

.screen.hidden {
    display: none;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #ff4d4d;
}

p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:hover {
    background: #45a049;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

button:active {
    transform: translateY(1px);
}

#gameUI {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    text-align: center;
}

#score {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#finalScore, #bestScore {
    font-weight: bold;
    color: #ffd700;
}