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

body {
    background-color: #0f0f15;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    touch-action: none; /* Crucial for preventing mobile zoom/scroll */
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 100%;
    background-color: #ffffff; /* High contrast white board */
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 15px rgba(255, 255, 255, 0.1);
}

#ui-layer {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    pointer-events: none;
}

#score-display {
    font-size: 42px;
    font-weight: 800;
    color: #ff2a5f;
    text-shadow: 0px 2px 10px rgba(255, 42, 95, 0.4);
}

#high-score-display {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    border-radius: 8px;
    margin-top: 5px;
    height: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#board {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

.lane {
    flex: 1;
    border-right: 1px solid rgba(0,0,0,0.1);
    position: relative;
    height: 100%;
    overflow: hidden;
    transition: background-color 0.1s;
}

.lane:last-child {
    border-right: none;
}

.key-hint {
    position: absolute;
    bottom: 40px;
    width: 100%;
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 5;
}

.tile {
    position: absolute;
    width: 100%;
    height: 160px;
    background-color: #1a1a24;
    top: 0;
    left: 0;
    transform: translateY(-160px);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,0.3), inset 0 4px 0 rgba(255,255,255,0.1);
    border-radius: 4px;
}

.tile.tapped {
    background-color: #e0e0e0;
    box-shadow: none;
    opacity: 0.6;
}

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 15, 21, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 20;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.3s;
}

#game-over-screen.hidden {
    display: none;
}

#game-over-title {
    font-size: 46px;
    margin-bottom: 20px;
    color: #ff2a5f;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 42, 95, 0.6);
    text-align: center;
}

#score-text {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 600;
}

#game-over-text {
    font-size: 20px;
    color: #aaa;
    animation: pulse 1.5s infinite;
    text-align: center;
    padding: 0 20px;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

@media (max-width: 600px) {
    .key-hint {
        display: none; /* Hide desktop key hints on mobile */
    }
}
