:root {
    /* Color Palette */
    --bg-base: #0C0906;
    --bg-surface: #1A140F;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(212, 175, 55, 0.1);
    --color-gold: #D4AF37;
    --color-sandstone: #B58A4B;
    --color-bronze: #7C4A21;
    --color-ancient-blue: #284B63;
    --color-ivory: #F5F2E8;
    --color-text: #FAFAFA;
    --color-muted: #B8B8B8;
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Dimensions */
    --header-height: 75px;
    --sidebar-width: 240px;
    --top-bar-height: 35px;
    
    /* Transitions */
    --trans-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--color-ivory);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   TOP COMPLIANCE BAR
   ========================================================================== */
.top-compliance-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: #000;
    color: var(--color-muted);
    z-index: 300;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.top-compliance-bar span {
    white-space: nowrap;
    padding: 0 15px;
}

@media (max-width: 1024px) {
    .top-compliance-bar {
        justify-content: flex-start;
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .top-compliance-bar::-webkit-scrollbar {
        display: none;
    }
}

/* ==========================================================================
   LAYOUT STRUCTURE (Museum Blueprint)
   ========================================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
    position: fixed;
    top: var(--top-bar-height);
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 100;
    transition: left 0.3s ease;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-gold);
}

.header-logo svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.header-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--color-ivory);
    text-transform: uppercase;
}

.btn-play-gold {
    background: linear-gradient(135deg, var(--color-gold), var(--color-sandstone));
    color: var(--bg-base);
    padding: 10px 24px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--trans-smooth);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-play-gold:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

/* ==========================================================================
   LEFT EXPLORER PANEL
   ========================================================================== */
.side-menu {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-surface);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    /* Sandstone texture effect */
    background-image: radial-gradient(circle at center, rgba(181, 138, 75, 0.03) 0%, transparent 100%);
}

.menu-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--glass-border);
}

.brand-name {
    font-family: var(--font-heading);
    color: var(--color-gold);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.nav-links {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    gap: 15px;
    color: var(--color-muted);
    transition: var(--trans-smooth);
    border-left: 2px solid transparent;
}

.nav-item:hover, .nav-item.active {
    background: linear-gradient(90deg, rgba(212,175,55,0.1) 0%, transparent 100%);
    color: var(--color-gold);
    border-left-color: var(--color-gold);
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    display: flex;
    flex-direction: column;
}

.nav-title {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.nav-desc {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 2px;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--header-height) + var(--top-bar-height));
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

.museum-section {
    padding: 80px 60px;
    border-bottom: 1px solid var(--glass-border);
}

/* ==========================================================================
   MAIN GAME CHAMBER
   ========================================================================== */
.game-chamber {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 40px;
    align-items: stretch;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
}

.game-frame-container {
    background: var(--bg-surface);
    border-radius: 22px;
    padding: 15px;
    position: relative;
    /* Ornate frame styling */
    border: 2px solid var(--color-sandstone);
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.8),
        0 10px 30px rgba(0,0,0,0.5),
        0 0 15px rgba(212, 175, 55, 0.1);
}

/* Obsidian Corners */
.game-frame-container::before,
.game-frame-container::after,
.game-frame-inner::before,
.game-frame-inner::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #000;
    border: 1px solid var(--color-gold);
    border-radius: 2px;
}
.game-frame-container::before { top: -5px; left: -5px; }
.game-frame-container::after { top: -5px; right: -5px; }
.game-frame-inner::before { bottom: -5px; left: -5px; }
.game-frame-inner::after { bottom: -5px; right: -5px; }

.game-frame-inner {
    width: 100%;
    height: 100%;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.game-info-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.game-info-panel h1 {
    font-size: 3rem;
    color: var(--color-gold);
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.game-info-panel .museum-desc {
    color: var(--color-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.game-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-sandstone);
    color: var(--color-sandstone);
    padding: 12px 20px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--trans-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    background: rgba(181, 138, 75, 0.1);
    color: var(--color-gold);
    border-color: var(--color-gold);
}

.compliance-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--color-ivory);
    letter-spacing: 0.5px;
}

/* ==========================================================================
   DISCOVERY PANELS (No repeating layouts)
   ========================================================================== */
.discovery-section {
    background-image: url('images/dark-egyptian-archaeological-museum-hall.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.discovery-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(12, 9, 6, 0.92);
    z-index: -1;
}

.discovery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 40px;
}

.panel {
    background: var(--bg-surface);
    padding: 40px;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.panel-icon {
    font-size: 2rem;
    color: var(--color-gold);
    margin-bottom: 20px;
}

.panel h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--color-ivory);
}

.panel p {
    color: var(--color-muted);
}

.panel-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--color-gold), transparent);
    margin: 20px 0;
    width: 60px;
}

/* Unique Panel 1: Border Highlight */
.panel-1 {
    border-left: 4px solid var(--color-gold);
}

/* Unique Panel 2: Offset inner box */
.panel-2 {
    background: transparent;
    border: none;
    padding: 0;
}
.panel-2-inner {
    background: var(--glass-bg);
    padding: 40px;
    border: 1px solid rgba(255,255,255,0.05);
    transform: translate(15px, 15px);
    height: 100%;
}

/* Unique Panel 3: Centered text */
.panel-3 {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50% 50% 0 0 / 20px 20px 0 0;
    border-top: 2px solid var(--color-sandstone);
}
.panel-3 .panel-divider {
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    width: 100px;
}

/* Unique Panel 4: Glassmorphism float */
.panel-4 {
    background: rgba(26, 20, 15, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-bottom: 3px solid var(--color-bronze);
}

/* ==========================================================================
   TREASURE MAP SECTION (Blueprint)
   ========================================================================== */
.treasure-map-section {
    background: var(--bg-surface);
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.story-content h2 {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 20px;
}

.story-content p {
    color: var(--color-muted);
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
}

.catalog-table tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.catalog-table th, .catalog-table td {
    padding: 20px;
    text-align: left;
}

.catalog-table th {
    font-family: var(--font-heading);
    color: var(--color-sandstone);
    font-weight: normal;
    width: 40%;
    background: rgba(255,255,255,0.02);
}

.catalog-table td {
    color: var(--color-ivory);
}

/* ==========================================================================
   ARTIFACT GALLERY
   ========================================================================== */
.artifact-gallery {
    padding: 0;
}

.exhibit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.exhibit-img-container {
    overflow: hidden;
    position: relative;
}

.exhibit-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}

.exhibit:hover .exhibit-img {
    transform: scale(1.05);
}

.exhibit-content {
    padding: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-base);
}

.exhibit-content h3 {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 20px;
}

/* Layout 1: Text Left, Img Right */
.exhibit-1 .exhibit-content { order: 1; border-right: 1px solid var(--glass-border); }
.exhibit-1 .exhibit-img-container { order: 2; }

/* Layout 2: Img Left, Text Right */
.exhibit-2 .exhibit-img-container { order: 1; }
.exhibit-2 .exhibit-content { order: 2; background: var(--bg-surface); border-left: 1px solid var(--glass-border); }

/* Layout 3: Centered */
.exhibit-3 {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 60px;
    background: radial-gradient(circle at center, var(--bg-surface) 0%, var(--bg-base) 100%);
    border-top: 1px solid var(--glass-border);
}
.exhibit-3 .exhibit-content {
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
    align-items: center;
}
.decorative-art {
    color: var(--color-ancient-blue);
    font-size: 3rem;
    margin-bottom: 20px;
}

/* ==========================================================================
   SUPPORT CENTER
   ========================================================================== */
.support-center {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--bg-surface);
}

.support-info h2 {
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 30px;
}

.info-block {
    margin-bottom: 30px;
}

.info-block h4 {
    color: var(--color-sandstone);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.plain-email {
    font-size: 1.2rem;
    color: var(--color-ivory);
    font-family: monospace;
    background: rgba(255,255,255,0.05);
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
}

.faq-list {
    margin-top: 40px;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.faq-q {
    font-family: var(--font-heading);
    color: var(--color-ivory);
    margin-bottom: 5px;
}

.faq-a {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.contact-form {
    background: var(--bg-base);
    padding: 40px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--color-sandstone);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px;
    color: var(--color-ivory);
    font-family: var(--font-body);
    border-radius: 4px;
    transition: var(--trans-smooth);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold);
    background: rgba(255,255,255,0.05);
}

textarea.form-control {
    height: 150px;
    resize: vertical;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--color-gold), var(--color-sandstone));
    color: var(--bg-base);
    padding: 18px;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--trans-smooth);
}

.btn-submit:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-image: url('images/epic-ancient-egyptian-temple-sunset-anubis-guardians-treasure.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 80px 60px 40px;
    margin-left: var(--sidebar-width);
    border-top: 2px solid var(--color-gold);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(12,9,6,0.95), rgba(12,9,6,0.8));
    z-index: 0;
}

.footer-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-logo {
    color: var(--color-gold);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.footer-nav {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-nav a {
    color: var(--color-ivory);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--color-gold);
}

.footer-legal {
    color: var(--color-muted);
    font-size: 0.8rem;
    max-width: 800px;
    margin-bottom: 20px;
}

.footer-compliance {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.footer-compliance span {
    border: 1px solid var(--color-muted);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* ==========================================================================
   LEGAL PAGES
   ========================================================================== */
.legal-content-section {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-surface);
    padding: 60px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.legal-content-section h1 {
    color: var(--color-gold);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 20px;
}

.legal-content-section h2 {
    color: var(--color-sandstone);
    font-size: 1.5rem;
    margin-top: 40px;
    margin-bottom: 15px;
}

.legal-content-section p {
    color: var(--color-muted);
    margin-bottom: 15px;
    line-height: 1.8;
}

.legal-content-section ul {
    margin-left: 20px;
    margin-bottom: 20px;
    list-style: square;
    color: var(--color-muted);
}

.legal-content-section li {
    margin-bottom: 10px;
}

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--color-gold);
    padding: 40px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--color-ivory);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-content h2 {
    color: var(--color-gold);
    margin-bottom: 20px;
}

.modal-content p {
    color: var(--color-muted);
    margin-bottom: 15px;
}

/* ==========================================================================
   MOBILE TOGGLE
   ========================================================================== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .game-chamber {
        grid-template-columns: 1fr;
    }
    
    .game-info-panel {
        padding: 0;
        text-align: center;
    }
    
    .game-controls {
        justify-content: center;
    }
    
    .compliance-tags {
        justify-content: center;
        margin-top: 20px;
    }
    
    .treasure-map-section, .support-center {
        grid-template-columns: 1fr;
    }
    
    .exhibit {
        grid-template-columns: 1fr;
    }
    
    .exhibit-1 .exhibit-content, .exhibit-2 .exhibit-content {
        order: 2;
        border: none;
    }
    
    .exhibit-img-container {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .side-menu {
        transform: translateX(-100%);
        width: 280px;
        transition: transform 0.3s ease;
        box-shadow: 5px 0 20px rgba(0,0,0,0.5);
    }
    
    .side-menu.active {
        transform: translateX(0);
    }
    
    .site-header {
        left: 0;
        padding: 0 20px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .site-footer {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .btn-play-gold {
        display: none; /* Hide in header on mobile to save space */
    }
    
    /* Mobile sticky play button */
    .mobile-sticky-play {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 90;
        width: 90%;
        text-align: center;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    
    .discovery-grid {
        grid-template-columns: 1fr;
    }
    
    .museum-section {
        padding: 60px 20px;
    }
    
    .exhibit-content {
        padding: 40px 20px;
    }
    
    .panel-2-inner {
        transform: translate(0, 0);
    }
}