body {
    margin: 0;
    overflow: hidden;
    background-color: #000;
    color: #fff;
    font-family: 'Arial', sans-serif; /* Changed font */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    touch-action: none; /* Prevent default touch behaviors like pinch-zoom */

}

canvas {
    display: block;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.5s ease-out;
}

#loading-text {
    font-size: 2em;
    color: #00ffcc; /* Cyberpunk teal */
    text-shadow: 0 0 10px #00ffcc, 0 0 20px #00ffcc;
}

#controls-info {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(30, 30, 50, 0.9); /* Dark blue-ish background */
    color: #e0e0e0; /* Light grey text */
    padding: 25px;
    border-radius: 10px;
    border: 2px solid #4f4f7f; /* Purple-ish border */
    box-shadow: 0 0 20px rgba(79, 79, 127, 0.7);
    text-align: center;
    z-index: 1001; /* Above loading screen if it fades slowly */
    max-width: 80%;
    display: none; /* Ensure it's hidden by default */
}

#controls-info h2 {
    color: #ff69b4; /* Hot pink title */
    margin-top: 0;
}

#controls-info p {
    margin: 8px 0;
    font-size: 1.1em; /* Slightly larger text */
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(20, 20, 30, 0.95); /* Even darker popup */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
    z-index: 100;
    text-align: center;
    border: 1px solid #6f42c1; /* Purple border for popups */
    color: #f0f0f0; /* Lighter text for popups */
}

.popup h3 {
    margin-top: 0;
    color: #9f78ff; /* Lighter purple for titles */
}

.popup button {
    padding: 10px 15px;
    margin-top: 15px;
    background-color: #6f42c1; /* Purple button */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.popup button:hover {
    background-color: #593599; /* Darker purple on hover */
}


.interaction-button {
    position: fixed;
    top: 20px; /* Position from the top */
    left: 50%; /* Centered horizontally */
    transform: translateX(-50%); /* Adjust for centering */
    padding: 10px 20px; /* Increased vertical padding */
    background-color: #007bff; /* Primary blue */
    color: white;
    border: none;
    border-radius: 6px; /* Slightly less rounded */
    cursor: pointer;
    font-size: 1.15em; /* Increased font size */
    font-weight: bold; /* Make text bold */
    box-shadow: 0 3px 6px rgba(0,0,0,0.25); /* Adjusted shadow */
    z-index: 90; /* Below popups */
    transition: background-color 0.3s, transform 0.2s;
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center text horizontally */
    align-items: center; /* Center text vertically */
    min-width: 180px; /* Slightly reduced minimum width */
    line-height: 1; /* Make line box tight to font size for better flex centering */
}
/* Specific styling for arcade machine buttons */
.arcade-specific-button {
    background-color: #ffc107; /* Amber/Yellow */
    color: #333; /* Dark text for better contrast on yellow */
    /* box-shadow: 0 0 10px #ffc107, 0 0 5px #ffc107; */ /* Yellow glow */
}
.arcade-specific-button:hover {
    background-color: #e0a800; /* Darker amber on hover */
}

.interaction-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateX(-50%) translateY(-2px); /* Combined transform for centering and lift */
}

.interaction-button div { /* For multi-line text in arcade buttons */
    pointer-events: none; /* Ensure clicks pass through to the button */
    line-height: 1.3; /* Restore comfortable line height for multi-line text */
    text-align: center; /* Ensure multi-line text within the div is also centered horizontally */
    width: 100%; /* Make the div take the full width of the button's content area */
}
/* Media Query for Mobile Devices */
@media (max-width: 768px) {
    .interaction-button {
        font-size: 1em; /* Increased font size for mobile */
        padding: 6px 12px; /* Increased vertical padding for mobile */
        /* font-size: 0.85em; /* Further reduced font size for mobile */ /* This line is redundant due to the one above */
        min-width: auto; /* Allow button to size based on content on mobile */
        max-width: calc(100% - 30px); /* Prevent button from being too wide, adjusted margin */
        max-height: 70px; /* Max height increased for mobile */
        overflow-y: auto; /* Scroll if content exceeds max-height */
        /* Flex properties for centering are inherited */
    }
    /* Arcade specific button may not need separate rules if it inherits .interaction-button positioning */
    /* If .arcade-specific-button also needs specific adjustments for mobile, add them here */
    .arcade-specific-button {
        /* Inherits general .interaction-button mobile styles */
        /* Add any specific overrides if needed */
    }
}
/* Video List Popup Specific Styles */
.video-list-popup {
    width: 80%;
    max-width: 450px; /* Slightly wider */
    max-height: 70vh;
    display: flex; /* Enable flexbox for layout */
    flex-direction: column; /* Stack children vertically */
}

.video-list-popup h3 {
    color: #ff8c00; /* Orange title for video list */
    margin-bottom: 15px; /* More space below title */
}

#video-list-items {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0; /* Space before the close button */
    overflow-y: auto; /* Scroll for many items */
    flex-grow: 1; /* Allow list to take available space */
    background-color: rgba(0,0,0,0.2);
    border-radius: 5px;
}

#video-list-items li {
    padding: 12px 15px; /* More padding */
    background-color: rgba(70, 70, 100, 0.8); /* Darker purple items */
    color: #f0f0f0;
    margin-bottom: 8px; /* Space between items */
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: 1px solid transparent;
}

#video-list-items li:last-child {
    margin-bottom: 0;
}

#video-list-items li:hover {
    background-color: rgba(110, 110, 150, 1); /* Lighter purple on hover */
    transform: scale(1.02); /* Slight zoom on hover */
}

/* Focused state for keyboard navigation - applied via JS */
/* #video-list-items li.focused-item, .video-list-close-button.focused-item {
    outline: 2px solid #9f9fff; 
    background-color: rgba(110, 110, 150, 1); 
} */


.video-list-close-button {
    padding: 12px 20px;
    background-color: #7f00ff; /* Distinct purple for close */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto; /* Fit content */
    align-self: center; /* Center button if popup is flex */
}

.video-list-close-button:hover {
    background-color: #5900b3; /* Darker distinct purple */
}

/* Focused state for close button - applied via JS */
/* .video-list-close-button.focused-item {
    background-color: #5900b3; 
} */

/* Ensure no scrollbars on the body itself, especially for mobile */
html, body {
    overscroll-behavior-y: contain;
}
/* CSS for Elevator Panel Style */
/* Main modal content area styling */
#elevator-floor-selection-modal .modal-content.elevator-panel-content {
    background: linear-gradient(145deg, #4a4a4a, #333333); /* Dark metallic gradient */
    border: 3px solid #222;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0,0,0,0.6), inset 0 0 10px rgba(0,0,0,0.4);
    padding: 25px;
    width: auto; 
    min-width: 300px; 
    max-width: 90vw; 
    max-height: 80vh; /* Ensure it doesn't get too tall */
    overflow-y: auto; /* Allow scrolling for many floors */
}
#elevator-floor-selection-modal .modal-content.elevator-panel-content h2 {
    color: #e0e0e0;
    text-shadow: 1px 1px 2px #000;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-top: 0; /* Remove default h2 margin if any */
    margin-bottom: 20px;
    font-family: 'Orbitron', sans-serif; 
    font-size: 1.8em;
    text-align: center;
}
/* Styling for the list holding the floor buttons */
ul#floor-selection-list.elevator-floor-list {
    list-style-type: none;
    padding: 0;
    margin: 0 auto; 
    display: flex;
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 15px; 
}
/* Individual floor button styling */
.elevator-floor-button {
    background-color: #2c2c2c; /* Dark grey button */
    color: #00ffcc; /* Cyberpunk teal text */
    border: 2px solid #00ffcc;
    border-radius: 8px;
    padding: 12px 18px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
    min-width: 120px; /* Ensure buttons have a decent width */
    text-align: center;
    box-shadow: 0 0 5px rgba(0, 255, 204, 0.3);
}
.elevator-floor-button:hover,
.elevator-floor-button:focus { /* Added focus for accessibility */
    background-color: #00ffcc;
    color: #1a1a1a; /* Dark text on hover/focus */
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.7), 0 0 25px rgba(0, 255, 204, 0.5);
    transform: translateY(-2px) scale(1.02);
}
.elevator-floor-button:active {
    transform: translateY(0px) scale(0.98); /* Press down effect */
}
/* Close button for the elevator panel */
.elevator-panel-close-button {
    background-color: #c0392b; /* A distinct red for close/cancel */
    color: #ecf0f1;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 10px 18px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
    display: block; /* Make it a block element for easier margin auto */
    width: fit-content; /* Size to content */
    margin: 25px auto 0 auto; /* Centered, with space above */
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.4);
}
.elevator-panel-close-button:hover,
.elevator-panel-close-button:focus {
    background-color: #e74c3c;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.7), 0 0 25px rgba(231, 76, 60, 0.5);
    transform: translateY(-1px) scale(1.02);
}
.elevator-panel-close-button:active {
    transform: translateY(0px) scale(0.98);
}
/* Style for the Play Darts button - similar to other interaction buttons */
#play-darts-button {
    /* Uses .interaction-button base styles */
    /* Optionally add specific styles if needed, e.g., different color */
    background-color: #20c997; /* A teal/green color */
    color: white;
}
#play-darts-button:hover {
    background-color: #1baa80; /* Darker teal/green on hover */
}