body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
    font-family: Arial, sans-serif;
    overflow: hidden; /* Prevent scrollbars if game is too large */
}

#start-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 20, 50, 0.95); /* Dark blue overlay */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 100; /* Ensure it's on top */
    font-family: 'Arial Black', Gadget, sans-serif;
}

#start-menu h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    color: #00A0FF; /* Blue Lock primary blue */
    text-shadow: 2px 2px 5px #000;
}

#start-menu p {
    font-size: 1.5em;
    margin-bottom: 40px;
    color: #eee;
}

#play-button {
    padding: 15px 40px;
    font-size: 1.8em;
    font-weight: bold;
    color: white;
    background-color: #00A0FF; /* Blue Lock blue */
    border: 2px solid #33CCFF; /* Lighter blue border */
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 5px 15px rgba(0, 160, 255, 0.4);
    margin-bottom: 20px; /* Add margin to separate from next button */
}

#play-button:hover {
    background-color: #33CCFF; /* Lighter blue on hover */
    transform: scale(1.05);
}

#customize-button {
    padding: 12px 35px;
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    background-color: #007BFF; /* Slightly different blue */
    border: 2px solid #00A0FF; 
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
}

#customize-button:hover {
    background-color: #00A0FF; 
    transform: scale(1.03);
}

#power-selection {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#power-selection p {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #ccc;
}

.power-select-button {
    padding: 10px 25px;
    font-size: 1.2em;
    font-weight: bold;
    color: white;
    background-color: #4A5568; /* Dark gray, inactive */
    border: 2px solid #718096; /* Lighter gray border */
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, transform 0.2s;
    margin: 5px;
    min-width: 180px; /* Ensure buttons have same width */
}

.power-select-button:hover {
    background-color: #2D3748; /* Darker gray on hover */
    border-color: #4A5568;
    transform: scale(1.02);
}

.power-select-button.selected {
    background-color: #00A0FF; /* Blue Lock blue for selected */
    border-color: #33CCFF; /* Lighter blue border */
    color: white;
    box-shadow: 0 0 10px #00A0FF;
}

#game-container {
    width: 800px;
    height: 600px;
    border: 2px solid #333;
    position: relative;
    overflow: hidden; /* Important to contain the ball and for correct positioning */
    background-image: url('/soccer_field.png'); /* Added background image */
    background-size: cover;
    background-position: center;
    display: none; /* Initially hidden until play button is pressed */
}

#hamburger-menu {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 30; /* Above game elements, below overlays */
    user-select: none;
    -webkit-user-drag: none;
}

#player {
    position: absolute;
    left: 50px; /* Player on the left */
    bottom: 100px; /* Positioned towards the bottom of the field */
    height: 150px; 
    width: auto;   
    z-index: 10;
    user-select: none; 
    -webkit-user-drag: none; 
    transform-origin: bottom center; 
}

#player-eyes-overlay {
    position: absolute;
    width: 25px; /* Adjust based on player_eyes_blue/orange.png aspect ratio and desired size */
    height: 12px;/* Adjust based on player_eyes_blue/orange.png aspect ratio and desired size */
    z-index: 11; /* Above player, below ball */
    display: none; /* Hidden initially */
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

#goal {
    position: absolute;
    right: 0px; /* Goal on the right */
    top: 50%;
    transform: translateY(-50%);
    width: 200px;  
    height: 200px; 
    z-index: 5;
    user-select: none;
    -webkit-user-drag: none;
}

#ball {
    position: absolute;
    width: 40px;
    height: 40px;
    /* Initial position will be set by JS */
    display: none; /* Hidden initially, shown by JS */
    z-index: 15; /* Above player and goal, below message */
    user-select: none;
    -webkit-user-drag: none;
}

#blue-aura-effect, #blazing-shot-effect {
    position: absolute;
    width: 70px; /* Slightly larger than ball */
    height: 70px;
    display: none; /* Hidden initially */
    z-index: 14; /* Behind the ball, assuming ball.png has transparency */
    pointer-events: none; /* So it doesn't interfere with clicks */
    user-select: none;
    -webkit-user-drag: none;
}

#nagi-skill-effect {
    position: absolute;
    width: 80px; /* Slightly larger for a different feel */
    height: 80px;
    display: none; /* Hidden initially */
    z-index: 14; /* Behind the ball */
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

#glock-left, #glock-right {
    position: absolute;
    height: 50px; /* Adjust size as needed */
    width: auto;
    z-index: 11; /* Above player, below ball if it passes over */
    display: none; /* Hidden initially */
    user-select: none;
    -webkit-user-drag: none;
}

#message-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay */
    color: white;
    font-size: 3.5em;
    font-weight: bold;
    text-shadow: 2px 2px 5px black;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    pointer-events: none; /* Allow clicks through to game container */
}

#message-overlay.show {
    opacity: 1;
    visibility: visible;
}

#message-text {
    text-align: center;
}

#cinematic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Darker overlay for cinematic */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50; /* Highest priority */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    pointer-events: none; /* Initially no pointer events */
}

#cinematic-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Block clicks during cinematic */
}

#cinematic-text {
    color: white;
    font-size: 2.5em;
    font-weight: bold;
    text-shadow: 2px 2px 8px #00A0FF, 0 0 20px #00A0FF;
    margin-bottom: 20px;
    text-align: center;
    padding: 0 20px;
}

#cinematic-image {
    max-width: 80%;
    max-height: 60%;
    object-fit: contain;
    display: none; /* Hidden initially */
    border: 3px solid #00A0FF;
    box-shadow: 0 0 30px #00A0FF;
}

@keyframes pulseBlueGlow {
    0% {
        box-shadow: 0 0 30px #00A0FF, 0 0 10px #33CCFF;
        border-color: #00A0FF;
    }
    50% {
        box-shadow: 0 0 50px #00A0FF, 0 0 25px #33CCFF, 0 0 5px #FFFFFF;
        border-color: #33CCFF;
    }
    100% {
        box-shadow: 0 0 30px #00A0FF, 0 0 10px #33CCFF;
        border-color: #00A0FF;
    }
}

.eye-scene-active-image {
    animation: pulseBlueGlow 1.5s infinite ease-in-out;
}

#awakening-bar-container {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 30px;
    background-color: #555;
    border: 2px solid #fff;
    border-radius: 5px;
    z-index: 25;
    overflow: hidden; /* To contain the progress bar */
}

#awakening-bar-progress {
    width: 0%; /* Initial width */
    height: 100%;
    background-color: #00A0FF; /* Bright blue for awakening */
    transition: width 0.5s ease-in-out;
}

#awakening-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px black;
    white-space: nowrap;
}

#goal-counter {
    position: absolute;
    top: 60px; 
    left: 15px; 
    transform: none; 
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    z-index: 25;
}

#skill1-status {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    z-index: 25;
    text-align: center;
}

#world-stage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 0, 30, 0.92); /* Dark purple/blue hue */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 60; /* Highest priority */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease-in-out, visibility 0.7s ease-in-out;
    pointer-events: none; 
}

#world-stage-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Block clicks during this scene */
}

#world-stage-text {
    color: #FFD700; /* Gold color for text */
    font-size: 2.8em;
    font-weight: bold;
    text-shadow: 
        0 0 5px #FFF,
        0 0 10px #FFD700,
        0 0 15px #FF8C00,
        2px 2px 5px rgba(0,0,0,0.7);
    margin-bottom: 20px;
    text-align: center;
    padding: 0 30px;
    white-space: pre-line; /* Allows \n for newlines */
    line-height: 1.3;
}