* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    user-select: none; /* Prevent text selection on mobile tap */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

body {
    background-color: #0d0d10;
    overflow: hidden; /* Prevent scrolling */
    touch-action: none; /* Prevent browser handling of gestures like pinch zoom or swipe back */
}

/* Score Container */
.score-container {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

#scoreEl {
    font-size: 24px;
    color: #00ffcc;
}

/* Pause Button */
.pause-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
}

.pause-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.pause-btn.hidden {
    display: none;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

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

.modal-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.02);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
}

.modal-overlay.hidden .modal-card {
    transform: scale(0.8);
}

.title-text {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 15px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #ff007f, #00ffcc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.big-score {
    color: #fff;
    font-size: 80px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0px;
    text-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
}

.subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 30px;
}

.play-btn {
    background: linear-gradient(45deg, #ff007f, #7f00ff);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 0, 127, 0.3);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-btn:active {
    transform: scale(0.95);
    box-shadow: 0 5px 10px rgba(255, 0, 127, 0.2);
}

.hint-text {
    margin-top: 25px;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    line-height: 1.5;
}

/* Canvas */
canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    touch-action: none; /* Prevents browser handling of gestures on the canvas */
}

/* Leaderboard */
.leaderboard {
    margin-top: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard h3 {
    color: #ffaa00;
    font-size: 16px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

#highScoresList {
    list-style: none;
    text-align: left;
}

#highScoresList li {
    display: flex;
    justify-content: space-between;
    color: #fff;
    font-size: 15px;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
}

#highScoresList li:nth-child(1) {
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
    border-left: 4px solid #ffcc00;
}

#highScoresList li:nth-child(2) {
    background: rgba(192, 192, 192, 0.15);
    color: #e0e0e0;
    border-left: 4px solid #c0c0c0;
}

#highScoresList li:nth-child(3) {
    background: rgba(205, 127, 50, 0.15);
    color: #d28c5a;
    border-left: 4px solid #cd7f32;
}

/* Name Input Styling */
#playerNameInput {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 20px;
    color: #fff;
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    width: 250px;
    text-align: center;
    transition: all 0.3s ease;
    outline: none;
}

#playerNameInput:focus {
    border-color: #00ffcc;
    background: rgba(0, 255, 204, 0.05);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.2);
}

#playerNameInput::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

