/* ==========================================================================
   1. GLOBAL / BASE STYLES
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: #0b0b0e; /* Fallback dark space color */
}

/* 2. Main container wrapping the canvas and UI */
.mars-interface-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* 3. Force the WebGL canvas to fill the container completely */
#mars-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    z-index: 1; /* Sits behind the UI overlay */
}

/* 4. Styling for your text and UI elements on top of the planet */
.ui-overlay {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 2; /* Sits safely above the 3D canvas */
    color: #ffffff;
    font-family: sans-serif;
    pointer-events: none; /* Allows mouse clicks to pass through to the 3D orbit controls */
}

.ui-overlay h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.ui-overlay p {
    margin: 0;
    font-size: 1rem;
    color: #ffaa77;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}


a {
    text-decoration: underline !important;
    font-weight: 200;
    color: #fc6802;
}

a:hover {
    text-decoration: none !important;
    font-weight: 600;
    color: #87CEEB;
}

/* ==========================================================================
   3. OVERVIEW GRID & CARD PREVIEWS
   ========================================================================== */
.overview-container {
    padding: 100px 40px;
    z-index: 10;
    position: relative;
}

.overview-title {
    color: #fc6802;
    text-transform: uppercase;
    margin-bottom: 40px;
    font-size: 3rem;
}

.meta-name {
font-weight: 700;
font-style: italic;
}

.meta-year {
    font-weight: 500;
}

.meta-location {
    font-size: 1.2rem;
    font-weight: 500;
}

.artist-grid {
    display: grid;
    gap: 30px;
    width: 100%;
}

.columns-3 { grid-template-columns: repeat(3, 1fr); }
.columns-2 { grid-template-columns: repeat(2, 1fr); }
.columns-4 { grid-template-columns: repeat(4, 1fr); }

.overview-card.info-box {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    height: 400px; /* Adjusted height for content */
    margin: 0;
    z-index: 10;
    overflow: hidden;
}

.overview-card .card-island-preview {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; 
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.overview-card .island-texture-clippped {
    width: 80% !important;
    height: auto !important;
    opacity: 1;
}

.overview-card:hover .card-island-preview {
    opacity: 0.5;
    transform: scale(1.1);
}

.view-link {
    text-decoration: none !important;
    display: inline-block;
    margin-top: 15px;
    width: fit-content;
}

.read-more {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: lightblue;
    font-weight: bold;
}

/* ==========================================================================
   4. INFO BOXES & PANELS (Artist Pages)
   ========================================================================== */
.info-box {
    position: fixed;
    bottom: 40px; left: 40px;
    width: 420px;
    max-height: 550px; 
    background: rgba(252, 104, 2, 0.05);
    backdrop-filter: blur(9px) brightness(0.5);
    -webkit-backdrop-filter: blur(9px) brightness(0.5);
    border: 1px solid rgba(252, 104, 2, 0.5);
    color: #fc6802;
    padding: 0;
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

.floorplan-box {
    position: fixed;
    bottom: 40px; left: 40px;
    width: 90%;
    max-height: 80%; 
    background: rgba(252, 104, 2, 0.05);
    backdrop-filter: blur(9px) brightness(0.5);
    -webkit-backdrop-filter: blur(9px) brightness(0.5);
    border: 1px solid rgba(252, 104, 2, 0.5);
    color: #fc6802;
    padding: 0;
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
}

.bio-box {
    top: 60%; left: 550px;
    width: 280px; max-height: 25vh;
    border-left: 3px solid lightblue;
}

.bio-text {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 300;
    color: lightblue;
}

.panel-header {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 3px;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(252, 104, 2, 0.3);
    background: rgba(252, 104, 2, 0.1);
    text-transform: uppercase;
    position: relative;
    z-index: 5;
}

.scrolling-content-wrapper {
    padding: 0px 0px 20px 20px;
    overflow-y: auto;
    font-size: 1rem;
    line-height: 1.3;
    position: relative;
    z-index: 5;
}

.scrolling-content-wrapper::-webkit-scrollbar { width: 4px; }
.scrolling-content-wrapper::-webkit-scrollbar-thumb { background: #fc6802; }

.info-box.folded { transform: translate(-440px, 0); }

#toggle-fold {
    position: absolute;
    right: -40px; top: -1px;
    width: 40px; height: 40px;
    background: rgba(252, 104, 2, 0.8);
    color: #000;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    pointer-events: auto;
}


/* FAQ Container */
.faq-container {
    margin-top: 20px;
    border-top: 1px solid rgba(252, 104, 2, 0.3);
}

.faq-item {
    border-bottom: 1px solid rgba(252, 104, 2, 0.2);
    padding: 10px 0;
    cursor: pointer;
}

/* The Question (Summary) */
.faq-question {
    list-style: none; /* Removes default arrow */
    font-weight: 600;
    color: #fc6802;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-question::-webkit-details-marker { display: none; } /* Safari fix */

.faq-question .symbol {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

/* Rotate symbol when open */
.faq-item[open] .symbol {
    transform: rotate(45deg);
    color: lightblue;
}

/* The Answer Content */
.faq-answer {
    padding: 15px 10px 5px 25px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: lightblue;
    font-weight: 200;
}

.faq-answer p { margin: 0 0 10px 0; }

/* ==========================================================================
   5. NAVIGATION & MENU
   ========================================================================== */
#system-menu-root {
    position: fixed;
    top: 40px; right: 40px;
    z-index: 99999;
}

#system-menu-trigger {
    background: rgba(252, 104, 2, 0.3);
    backdrop-filter: blur(12px) brightness(0.4);
    -webkit-backdrop-filter: blur(12px) brightness(0.4);
    border: 1px solid rgba(252, 104, 2, 0.5);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100000;
    transition: all 0.2s ease-in-out;
    padding: 10px 15px;
}

#system-menu-trigger:hover {
    background: rgba(252, 104, 2, 0.8);
    box-shadow: 0 0 15px rgba(252, 104, 2, 0.6);
    transform: scale(1.02);
}

#system-menu-trigger span.symbol {
    font-size: 1.5rem;
    color: #fc6802;
}

.menu-title-text {
    font-family: 'LeagueMono', sans-serif;
    color: #fc6802;
    text-transform: uppercase;
    text-align: left;
    font-size: 1rem;
    line-height: 1.3em;
    font-weight: 200;
}

.system-fold-style {
    position: absolute;
    top: 10px; left: 0;
    width: 250px;
    background: rgba(252, 104, 2, 0.05);
    backdrop-filter: blur(12px) brightness(0.7);
    -webkit-backdrop-filter: blur(12px) brightness(0.7);
    border: 1px solid rgba(252, 104, 2, 0.5);
    display: flex;
    flex-direction: column;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
}

.system-fold-style.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.submenu-trigger {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #fc6802;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.submenu {
    display: none;
    flex-direction: column;
    background: rgba(252, 104, 2, 0.1);
    padding-left: 40px;
}

.submenu.active { display: flex; }

.submenu a {
    padding: 8px 0px;
    font-size: 0.8rem;
    color: lightblue;
    text-decoration: none;
}

/* ==========================================================================
   6. LOGO 
   ========================================================================== */
.page-logo {
    position: fixed;
    display: block;
    top: 40px; left: 40px;
    text-align: center;
    overflow: hidden;
    z-index: 20;
}

.page-logo:hover {
    opacity: 1; /* Become fully visible */
    transform: scale(1.1); /* Subtle scale is usually classier than 1.2 */
    cursor: pointer;
    pointer-events: auto;
    
    /* This creates a glow that follows the shape of your logo/text */
    filter: drop-shadow(0 0 10px rgba(252, 104, 2, 0.8)) brightness(1.2);
}

/* ==========================================================================
   7. RESPONSIVE / MOBILE
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* 1. Lock the screen to prevent scrolling to white space */
    html, body {
        height: 100%;
        width: 100%;
        overflow: hidden; 
        position: fixed; /* Crucial for Android Chrome */
        background-color: #000; /* Fallback so white never shows */
        overscroll-behavior: none;
    }

    /* 2. Fix the Background Stacks */
    .video-stack, 
    #layer-live, 
    .islands-layer {
        height: 100vh;
        height: -webkit-fill-available; /* Fills space behind mobile UI bars */
        width: 100vw;
        position: fixed;
        top: 0;
        left: 0;
    }

    /* 3. Island Scaling for Mobile */
    .island { 
        width: 80vw !important; 
        min-width: 280px; 
        height: auto;
    }

    /* 4. The Info Box (Now truly on top) */
    .info-box {
        position: fixed !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 60vh !important; /* Half screen height */
        max-height: 60vh !important;
        margin: 0;
        z-index: 89999 !important; /* Above everything */
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-top: 2px solid rgba(252, 104, 2, 0.5);
        background: rgba(10, 10, 10, 0.9); /* Darker for better mobile legibility */
        transform: translateY(0);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }

    /* 5. Handle the "Folded" state on mobile (Slide down instead of left) */
    .info-box.folded {
        transform: translateY(calc(100% - 40px)) !important; 
    }

    /* 6. Adjust Headers and Buttons */
    .panel-header {
        font-size: 1.2rem;
        padding: 10px;
    }

    #toggle-fold {
        top: -40px; 
        right: 10px; 
        width: 50px; 
        height: 40px;
        background: rgba(252, 104, 2, 0.9);
        border-radius: 5px 5px 0 0;
    }

    /* 7. Hide desktop-only elements */
    .page-logo, #ghost-cursor {
        display: none !important;
    }

    /* 8. Fix the Artist Grid for Overview page */
    .overview-container {
        padding: 60px 20px;
        overflow-y: auto;
        height: 100vh;
    }
    
    .artist-grid { 
        grid-template-columns: 1fr !important; 
        gap: 20px;
    }

    /* Special rule for the Bio Box on mobile */
    .page-artist .bio-box {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        width: 100vw !important;
        height: 30vh !important;
        z-index: 1000000;
        border-top: 2px solid lightblue;
        background: rgba(0, 0, 0, 0.95);
    }
}


/* ==========================================================================
   8. FONTS
   ========================================================================== */



@font-face {
    font-family: 'LeagueMono';
    font-style: normal;
    font-weight: 200;
    src: local('LeagueMono Light'), local('LeagueMono-Light'),
         url('../fonts/LeagueMono-Light.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
         url('../fonts/LeagueMono-Light.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
  }




