@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

body {
    margin: 0;
    padding: 0;
    background-color: #f4f4f5;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #18181b;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 20px;
    box-sizing: border-box;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

h1 {
    font-size: 24px;
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.5px;
}

#score {
    font-size: 20px;
    font-weight: 600;
    background: #18181b;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
}

.canvas-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 80vh;
    max-height: 800px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: none; /* Hide cursor over canvas for better experience */
    touch-action: none; /* Prevent scrolling when dragging on touch devices */
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
    z-index: 10;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay h2 {
    font-size: 48px;
    margin: 0 0 16px 0;
    color: #ef4444; /* Red for game over */
}

.overlay p {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 32px 0;
}

button {
    appearance: none;
    background: #18181b;
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.1s, background-color 0.2s;
}

button:hover {
    background: #27272a;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.instructions {
    color: #71717a;
    font-size: 14px;
    margin: 0;
    text-align: center;
}
