:root {
    --pink: #FF2EB8;
    --purple: #7A2EFF;
    --cyan: #22EFFE;
    --dark-navy: #191D3F;
    --gold: #FFD700;
}
body {
    font-family: 'Press Start 2P', cursive;
    background: #111;
    overflow: hidden;
    color: white;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
}
body::before {
    content: '';
    position: fixed;
    inset: 0; /* Cover the entire screen top, bottom, left, and right */
    z-index: -1; /* Place this layer behind the game-container */

    /* Use the mobile background image by default */
    background: url('https://lauren-dev.s3.eu-west-1.amazonaws.com/portrait_background.png?v=2') center/cover no-repeat;
    
    /* Apply the blur and scale effect from your prompt */
    filter: blur(20px);
    transform: scale(1.1); /* Prevents hard/blurry edges */
}
.game-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    height: 100dvh;
    max-height: 750px;
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    border: 4px solid var(--cyan);
    box-shadow: 0 0 20px var(--cyan);
}
#background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: cover;
    background-image: url('https://lauren-dev.s3.eu-west-1.amazonaws.com/portrait_background.png?v=2'); 
}
@media (min-width: 768px) {
    body::before {
        background-image: url('https://lauren-dev.s3.eu-west-1.amazonaws.com/desktop_background_new.png?v=2');
    }
}

/* Optional: This adds a more pronounced shadow to the game container
   to help it stand out from the new blurred background. */
.game-container {
    box-shadow: 0 0 20px var(--cyan), 0 0 30px rgba(0,0,0,0.5);
}
canvas#bgCanvas { z-index: 1; }
canvas#gameCanvas { z-index: 10; }
canvas {
    display: block;
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
}
.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    text-align: center;
}
.text-shadow {
     text-shadow: 3px 3px 0px rgba(0,0,0,0.2);
}
.btn {
    background-color: var(--pink);
    border: none;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1.25rem;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 15px var(--pink);
    transition: all 0.2s ease-in-out;
    color: white;
}
.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--pink);
}
.btn-secondary {
     background-color: var(--purple);
     box-shadow: 0 0 15px var(--purple);
}
.title-text {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--pink);
    text-shadow: 3px 3px 0 var(--purple);
    margin-bottom: 0.5rem;
}
.subtitle-text {
    font-size: 3rem;
    line-height: 1;
    color: var(--cyan);
    text-shadow: 3px 3px 0 var(--purple);
}
.game-over-text {
    font-size: 3rem;
    line-height: 1.1;
    background: var(--cyan);
    color: var(--dark-navy);
    padding: 1rem 2rem;
    border: 4px solid var(--pink);
    box-shadow: 0 0 15px var(--pink);
}
.score-display {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    z-index: 15;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem 1.5rem;
    border: 4px solid var(--purple);
    box-shadow: 0 0 15px var(--purple);
}
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
}
.modal-content {
    background: var(--dark-navy);
    border: 4px solid var(--purple);
    box-shadow: 0 0 15px var(--purple);
    border-radius: 1rem;
    position: relative;
}
#nameInput {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 999;
    font-family: 'Press Start 2P', cursive;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--cyan);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}
#nameInput::placeholder {
    color: #9CA3AF;
}
.close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: var(--pink);
    border-radius: 50%;
    border: 2px solid white;
    color: white;
    font-size: 16px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
}
#pauseButton {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 15;
    background: rgba(0,0,0,0.3);
    padding: 0.5rem;
    border: 2px solid var(--pink);
    font-size: 0.75rem;
    cursor: pointer;
}
#countdown {
    font-size: 6rem;
    color: var(--cyan);
    text-shadow: 4px 4px 0 var(--purple);
}