
/******************************/
/******************************/
/******************************/
/******************************/
#progressContainer {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 30px;
    background-color: rgba(224, 224, 224, 0.5);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

#progressBar {
    height: 100%;
    width: 0%;
    background-color: rgba(76, 175, 80, 0.7);
    transition: width 0.3s ease;
    border-radius: 8px 0 0 8px;
    z-index: 1;
}

#progressText {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    font-family: 'Verdana', Roboto, sans-serif;
    font-size: 0.8em;
    color: black; /* or white depending on your background */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Make sure it's above the progressBar */
    pointer-events: none; /* Prevent clicks from affecting the text */
}

#menu {
    position: absolute;
    top: 5vh;
    left: -200px; /* Start offscreen to the left */
    width: 180px;
    height: auto;
    background-color: rgba(10, 10, 10, 0.7);
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.menu-button {
    background-color: rgba(29, 46, 51, 0.6);
    border-color: rgba(200, 200, 200, 0.6);
    border-style: solid;
    border-width: 1px;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 6px;
    padding: 10px 15px;
    font-size: 0.8em;
    height: auto;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-button:hover {
    background-color: #357ABD;
}
.small-text
{
    margin-top: 10px;
    font-size: 0.7em;
}
#clock {
    position: fixed;
    top: 2px;
    right: 2px;
    font-size: 1.1em;
    color: white;
    background-color: rgba(0, 0, 0, 0.5); /* semi-transparent background */
    padding: 10px 20px;
    border-radius: 5px 0px 5px 7px;
    font-family: 'Arial', sans-serif;
    z-index: 1000;
}

#menu {
    position: absolute;
    top: 10px;
    left: 10px;

    /* size & layout */
    width: 180px;
    max-height: 70vh;     /* or whatever fits your UI */
    padding: 8px;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);

    background-color: rgba(10, 10, 10, 0.7);
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);

    /* the magic: scroll when content is too tall */
    overflow-y: auto;
    overflow-x: hidden;
}

/* make each button fill the width + spacing */
.menu-button {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    text-align: left;
}

/* small description below */
.small-text {
    display: block;
    font-size: 0.8em;
    color: #DDD;
}
/* Firefox */

#menu {
    /* scrollbar-width: thin;                keep it thin */
    /* scrollbar-color: transparent transparent;  thumb and track both transparent */
}

/* WebKit (Chrome, Safari, Edge) */
#menu::-webkit-scrollbar {
    width: 10px;           /* or however wide you like it */
    background: rgba(0, 0, 255, 0.5);
}

#menu::-webkit-scrollbar-track {
    background: rgba(200, 200, 200, 0.4);
}

#menu::-webkit-scrollbar-thumb {
    width: 10px;
    background: rgba(240, 133, 62, 0.7);
}
#menu {
    /* scrollbar-width: 15px; */
}
#submenu {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    display: none;            /* hidden by default */
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.submenu-button {
    padding: 6px 12px;
    background: #444;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.8em;
    line-height: 0.9em;
}
#email-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 12px;
    background: #0077cc;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 14px;
}
#email-btn:hover {
    background: #005fa3;
}

#links {
    position: absolute;
    top: 340px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;              /* ensures it’s above the canvas */
}
#links a {
    display: inline-block;
    padding: 8px 12px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-family: sans-serif;
    font-size: 14px;
    text-align: center;
    opacity: 0.85;
    transition: opacity 0.2s;
}
#links a:hover {
    opacity: 1;
}
/* Individual brand colors */
#links a[href^="mailto"] {
    background: #0077cc;
}
#links a[href*="facebook.com"] {
    background: #3b5998;
}
#links a[href*="youtube.com"] {
    background: #FF0000;
}
#links a[href*="culerdamage.tech/subscribe"] {
    background: #28a745;
}
#links a[href*="culerlearn.com"]
{
    background: #17a2b8;
} /* teal for tutorials */

/* ====== Book Advert Banner (Top-Right) ====== */
#book-ad {
    position: absolute;
    top: 70px;
    right: 20px;           /* moved from center to right */
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.8);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 20;
    font-family: sans-serif;
    /* remove centering transforms */
    /* control the overall width */
    width: 270px;       /* fixed width */
    /* or use a max to allow it to shrink on small screens */
    max-width: 90vw;
}
#book-cover {
    width: 60px;
    height: auto;
    border-radius: 4px;
    margin-right: 12px;
}
#book-info h3 {
    margin: 0;
    font-size: 16px;
    color: #222;
}
#book-info p {
    margin: 4px 0 8px;
    font-size: 14px;
    color: #555;
}
#book-cta {
    display: inline-block;
    padding: 6px 10px;
    background: #ff6600;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}
#book-cta:hover {
    background: #e65500;
}
#book-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #888;
    margin-left: 12px;
    cursor: pointer;
    padding: 0;
}
#book-close:hover {
    color: #444;
}

/* Default: hide toggle button on big screens */
#menu-toggle {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    background: #333;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 5px;
    cursor: pointer;
}

/* On small screens */
@media (max-width: 768px) {
    #menu-toggle {
        display: block; /* show toggle button */
    }

    #menu {
        position: fixed;
        top: 60px; /* below the toggle button */
        left: 10px;
        width: 180px;
        max-height: 80vh;
        overflow-y: auto;
        background: rgba(10,10,10,0.9);
        transform: translateX(-200%); /* initially hidden offscreen */
        transition: transform 0.3s ease;
    }

    #menu.open {
        transform: translateX(0); /* slide in */
    }

    #links {
        position: absolute;
        top: 140px;
        right: 20px;
        width: 150px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        z-index: 10;              /* ensures it’s above the canvas */
    }
}
#links a[href*="wa.me"] {
    background-color: #25D366; /* WhatsApp green */
    color: white; /* Text color on WhatsApp button */
}

#links a[href*="wa.me"]:hover {
    background-color: #1ebe5b; /* Slightly darker green on hover */
}

#games-toggle{
    position: relative;
    top: 40px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 5px;
}

#games-drawer {
    position: absolute;
    top: 250px;
    right: -220px; /* hidden off screen */
    width: 200px;
    background-color: rgba(20, 20, 20, 0.9);
    padding: 10px;
    border-radius: 10px 0 0 10px;
    transition: right 0.5s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 768px) {
    #games-toggle{
        position: absolute;
        top: 280px;
        right: 20px;
        padding: 10px 20px;
        border-radius: 5px;
    }

    #games-drawer {
        position: absolute;
        top: 250px;
        right: -220px; /* hidden off screen */
        width: 200px;
        background-color: rgba(20, 20, 20, 0.9);
        padding: 10px;
        border-radius: 10px 0 0 10px;
        transition: right 0.5s ease;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}

#games-drawer.open {
    right: 20px; /* slides into view */
}

.game-button {
    background-color: #444;
    color: #fff;
    padding: 10px;
    border: none;
    border-radius: 5px;
    text-align: left;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.game-button:hover {
    background-color: #555;
}

/* On small screens */
/*
@media (max-width: 768px) {
    #submenu    {

        position: absolute;
        bottom: 80px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1000;
    }
}
*/

#sound-credit {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 12px;
    font-family: sans-serif;
    color: white;            /* or whatever contrasts your scene */
    background: rgba(0,0,0,0.5); /* optional subtle backdrop */
    padding: 4px 8px;
    border-radius: 4px;
}

#sound-credit a {
    color: inherit;          /* keeps link white */
    text-decoration: none;   /* remove underline */
}
#sound-credit a:hover {
    text-decoration: underline;
}

#info {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
    color: #333;
    font-size: 16px;
    text-align: center;
}
canvas {
    display: block; /* Remove extra space below canvas */
}

/* Xenomorph */

#visitor-counter {
  position: absolute;
  bottom: 40px;
  left: 0vw;
  width: auto;
  background: rgba(255,255,255,0.6);
  padding: 0.5em 1em;
  border-radius: 0 0.25em 0.25em 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-family: monospace;
  font-size: 0.9rem;
  color: #333;
  text-align: center;
}
#visitor-counter span {
  font-weight: bold;
}

#yolo-broadcast{
    position:fixed; right:12px; bottom:12px;
    width:180px;
    height: 180px;
    background:rgba(20,20,24,.9);
    border:1px solid rgba(255,255,255,.15);
    border-radius:10px; padding:8px 10px;
    z-index:2147483647; pointer-events:none;
    color:#e6f1ff; font-family:Roboto, sans-serif;
    box-shadow:0 6px 18px rgba(0,0,0,.35);
    display:flex; flex-direction:column; gap:4px;
}
#yolo-broadcast .yb-head{ font-size:10px; opacity:.8; letter-spacing:.08em }
#yolo-broadcast .yb-msg { font-size:12px; line-height:1.35; color:#cfe3ff }
#yolo-broadcast .yb-time{ font-size:10px; color:#9fb3c8 }
/* Keep the on-screen preview just above the broadcast box */
#vision-preview{ bottom:60px !important; }

@keyframes vm-spin { to { transform: rotate(360deg); } }
#vision-preview.busy::after,
#yolo-broadcast.busy::after,
#vision-status-badge.busy::after{
  content:""; position:absolute; top:8px; right:8px; width:10px; height:10px; border-radius:50%;
  border:2px solid rgba(255,255,255,.35); border-top-color:#4cc9f0; animation:vm-spin .8s linear infinite;
}

/* Add this to your main CSS file or a <style> block */
#info-footer {
    position: fixed; /* Keeps it in place regardless of scrolling */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black */
    color: white;
    padding: 10px 20px;
    font-family: sans-serif;
    font-size: 14px;
    z-index: 100; /* Ensure it's above the canvas */
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.5);
    text-align: center;
}
#ui-container {
    /* 1. Ensure the container is fixed over the entire viewport */
    position: fixed;
  
    left: 0;
    right: 0;
    bottom: 100px;
    width: 100%;
    
    /* 2. Set a high z-index to ensure it sits above the Three.js canvas */
    z-index: 100; 
    
    /* 3. Use Flexbox to center the button vertically and horizontally */
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* CRITICAL: Puts the button at the bottom of the container */
    
    /* Optional: Add padding to lift the button slightly off the bottom edge */
    
    /* CRITICAL: Ensure the container doesn't block mouse input when empty */
    pointer-events: none; 
}

/* Override the default button behavior to allow interaction */
#ui-container > div {
    /* Reset pointer-events to allow clicking the button */
    pointer-events: auto;
}

/* Mobile UI Controls */
#mobile-controls {
    position: fixed;
    bottom: 40vh;
    left: 20px;
    display: none; /* Hidden by default, shown only on mobile */
    z-index: 1000;
}

.control-button {
    width: 60px;
    height: 60px;
    background: rgba(40, 40, 40, 0.7);
    color: white;
    font-size: 24px;
    line-height: 60px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    user-select: none;
    touch-action: manipulation; /* Prevents unwanted browser behavior on touch */
    position: absolute;
    transition: background 0.1s;
}

.control-button:active {
    background: rgba(70, 70, 70, 0.9);
}

/* Positioning the D-Pad elements */
#move-forward { top: 0; left: 65px; }
#move-left { top: 65px; left: 0; }
#move-right { top: 65px; left: 130px; }
#move-backward { top: 130px; left: 65px; }

fullscreen-button{
    position: relative;
    right: 5px;
    bottom: 5px;
    padding: 5px;
    border-radius: 5px;
    
}
.world-view-div
{
    height: 500px;
    width: 700px;
    max-width: 700px;
    
    
}
.world-view-parent-div
{
    height: 500px;
    width: 700px;
    max-width: 700px;
    display: flex;

    /* 1. Centers content horizontally */
    justify-content: center;

    /* 2. Centers content vertically */
    align-items: center;
}

/* ---------------------------------------------------- */
/* 1. DEFAULT STATE: Hide the div completely on small screens (mobile/tablet) */
/* ---------------------------------------------------- */
#fixed-subscribe {
    display: none;
}

/* ---------------------------------------------------- */
/* 2. DESKTOP STYLES: Display and fix the div only when the screen is wide enough */
/* ---------------------------------------------------- */
@media (min-width: 1024px) {
    #fixed-subscribe {
        /* Makes the container visible */
        display: block; 
        
        /* 1. Positioning */
        position: fixed; 
        bottom: 30px; 
        right: 30px; 
        z-index: 1000; 
        
        /* 2. Layout & Styling */
        background-color: #f0f0f0;
        padding: 15px;
        border: 1px solid #ccc;
        border-radius: 8px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        width: 180px; 
        text-align: center;
    }
}

/* ---------------------------------------------------- */
/* 3. INNER CONTENT AND BUTTON STYLING */
/* ---------------------------------------------------- */

#stay-connected {
    font-size: 1.1em;
    font-weight: bold;
    color: #444; /* Deep grey font */
    margin-bottom: 15px;
}

/* Base style for ALL three button types */
.fixed-home-button,
.fixed-subscribe-button,
.fixed-contact-button {
    display: block; 
    width: 100%;
    margin-top: 10px; 
    padding: 10px 15px;
    
    color: white; 
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.2s;
    text-align: center;
}

/* --- HOME BUTTON SPECIFIC STYLES (DEEP BLUE) --- */
.fixed-home-button {
    background-color: #004d99; 
}

.fixed-home-button:hover {
    background-color: #003366; /* Slightly darker deep blue on hover */
}

/* --- SUBSCRIBE BUTTON SPECIFIC STYLES (Light Blue - Adjusted to contrast with Home) --- */
.fixed-subscribe-button {
    background-color: #007bff; 
}

.fixed-subscribe-button:hover {
    background-color: #0056b3;
}

/* --- CONTACT BUTTON SPECIFIC STYLES (Grey) --- */
.fixed-contact-button {
    background-color: #6c757d; 
}

.fixed-contact-button:hover {
    background-color: #5a6268;
}

/* Ensures the individual button containers don't add unwanted spacing */
#home-div,
#subscribe-div,
#contact-div {
    margin: 0;
    padding: 0;
}