/* Update the main wrapper to center everything */
#friend-picker-app {
    font-family: "Courier New", Courier, monospace;
    color: #ff00ff;
    display: flex;         /* Use Flexbox */
    flex-direction: column; /* Stack children vertically */
    align-items: center;    /* Center children horizontally */
    text-align: center;     /* Center text inside elements */
    width: 100%;
}

/* Ensure the body allows for centering */
body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    background-color: #000; /* Matching your dark theme */
}

/* 2. The Game Window */
#game-container {
    width: 95%;
    max-width: 1200px;
    height: 70vh; /* Keeps it responsive on various screens */
    margin: 20px auto;
    overflow: hidden;
    position: relative;
    background: #00ffff url('../assets/stars.jpg'); 
    cursor: crosshair;
    border: 6px ridge #ff00ff; /* Chunky 90s border */
    z-index: 1;
    box-shadow: 0 0 20px #ff00ff;
}

/* 3. The Elements (Hand & Heads) */
.game-element {
    position: absolute;
    /* Remove the generic 100px width so we can set specific sizes below */
    height: auto;
    transition: none !important; 
    pointer-events: none; 
    user-select: none;
}

#hand {
    position: absolute;
    width: 120px; 
    z-index: 1000; 
    pointer-events: none;
    /* This ensures the middle of the hand image follows the cursor */
    transform: translate(-50%, -50%); 
}

.head {
    /* Making heads smaller makes the hand look more imposing */
    width: 80px; 
    z-index: 100;
    /* Subtle wiggle animation */
    animation: wiggle 2s infinite ease-in-out;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

/* 4. UI & Scoreboard */
#ui-layer {
    background: #111;
    color: #0f0; /* Classic Matrix green */
    padding: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid #ff00ff;
    text-transform: uppercase;
    letter-spacing: 2px;
}

#score {
    color: #fff;
    text-shadow: 0 0 5px #0f0;
}

/* 5. Retro Start Button */
#start-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 25px 50px;
    font-size: 28px;
    font-family: "Courier New", Courier, monospace;
    background: #ff00ff;
    color: #fff;
    border: 6px outset #00ffff;
    cursor: pointer;
    z-index: 2000;
    font-weight: bold;
    text-shadow: 2px 2px #000;
}

#start-btn:hover {
    background: #00ffff;
    color: #ff00ff;
    border-style: inset;
}

#start-btn:active {
    transform: translate(-50%, -48%);
}

/* 6. Animations */
@keyframes wiggle {
    0% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
    100% { transform: rotate(-5deg); }
}

/* Subtle scanline overlay for the game container only */
#game-container::after {
    content: " ";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 500;
}

#reset-btn {
    background: #111;
    color: #0f0;
    border: 2px solid #ff00ff;
    font-family: "Courier New", Courier, monospace;
    padding: 5px 10px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

#reset-btn:hover {
    background: #ff00ff;
    color: #fff;
}

/* Update this in your CSS file */
.game-element {
    position: absolute;
    width: 120px; /* Adjusted based on your image size */
    transition: none !important; /* Crucial: JS handles movement now */
    pointer-events: none;
}

#start-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    font-size: 24px;
    background: #ff00ff;
    color: white;
    border: 4px outset #00ffff;
    cursor: pointer;
    z-index: 1000;
}


#hand {
    /* High z-index keeps the hand on top of the heads */
    z-index: 100; 
    pointer-events: none; /* Keeps the hand from 'blocking' the mouse clicks */
}

.head {
    z-index: 10;
    animation: float 3s infinite ease-in-out;
}

#ui-layer {
    background: #000;
    color: #0f0; /* Matrix green */
    padding: 10px;
    font-weight: bold;
    border-bottom: 2px solid #ff00ff;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(15px, -15px) rotate(5deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}