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

body {
    background-color: #1a1a2e;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 400px;
    height: 600px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 10px #16213e;
    overflow: hidden;
    background: linear-gradient(180deg, #87CEEB 0%, #4682B4 100%);
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to canvas when playing */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#score-display {
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin-top: 20px;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
}

#score-display.visible {
    opacity: 1;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 20;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00f2fe, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 10px rgba(79, 172, 254, 0.5);
    text-align: center;
}

h2 {
    font-size: 3rem;
    color: #ff4757;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #000;
}

p {
    font-size: 1.2rem;
    color: #dfe4ea;
    margin-bottom: 30px;
}

.score-board {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.score-board p {
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.score-board p:last-child {
    margin-bottom: 0;
}

button {
    background: linear-gradient(45deg, #ff6b81, #ff4757);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.6);
}

button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(255, 71, 87, 0.4);
}
