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

body {
    background-color: #121212;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 800px;
    background-color: #1e1e1e;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#score-board {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 24px;
    font-weight: bold;
    z-index: 10;
}

#lanes {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.lane {
    flex: 1;
    border-right: 1px dashed rgba(255, 255, 255, 0.1);
}
.lane:last-child {
    border-right: none;
}

#player {
    position: absolute;
    bottom: 50px;
    width: 60px;
    height: 40px;
    background-color: #4CAF50;
    border-radius: 8px;
    transition: left 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 5;
    margin-left: -30px;
}

/* center of lanes */
.pos-0 { left: calc(100% / 6); }
.pos-1 { left: calc(100% / 2); }
.pos-2 { left: calc(100% / 6 * 5); }

.obstacle {
    position: absolute;
    width: 60px;
    height: 40px;
    background-color: #F44336;
    border-radius: 8px;
    top: -50px;
    z-index: 4;
    margin-left: -30px;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    backdrop-filter: blur(4px);
}

.overlay.hidden {
    display: none;
}

.overlay h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.overlay p {
    font-size: 16px;
    margin-bottom: 30px;
    color: #aaa;
}

button {
    padding: 12px 24px;
    font-size: 18px;
    background-color: #ffffff;
    color: #000000;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.1s, background-color 0.2s;
}

button:hover {
    background-color: #dddddd;
}
button:active {
    transform: scale(0.95);
}
