/*
Theme Name: DVide Arts Dark
Theme URI: https://www.dvidearts.com
Author: WebWizard
Author URI: https://www.dvidearts.com
Description: Custom dark theme
Version: 45.0
License: GPL-2.0+
Text Domain: dvidedark
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #000;
    color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: #00a8a8; text-decoration: none; transition: color 0.3s; }
a:hover { color: #FF6B00; }
img { max-width: 100%; height: auto; display: block; }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1003;
    display: flex; align-items: center; justify-content: space-between;
    padding: 15px 30px;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,168,168,0.2);
}
.site-branding { display: flex; align-items: center; gap: 15px; white-space: nowrap; }
.site-branding img { height: 40px; width: auto; }
.site-tagline {
    color: rgba(255,255,255,0.6); font-size: 12px;
    letter-spacing: 1px; text-transform: uppercase;
    white-space: nowrap;
}
.main-navigation .nav-menu {
    display: flex; list-style: none; gap: 30px;
}
.main-navigation .nav-menu a {
    color: #fff; font-size: 14px; font-weight: 500;
    letter-spacing: 0.5px; text-transform: uppercase;
    position: relative;
    white-space: nowrap;
}
.main-navigation .nav-menu a:hover { color: #FF6B00; }

/* ===== NAVIGATION DROPDOWN (Games submenu) ===== */
.main-navigation .nav-menu li {
    position: relative;
}
.main-navigation .nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,168,168,0.2);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    z-index: 1001;
}
/* Shift submenus for rightmost nav items so they don't overflow viewport */
.main-navigation .nav-menu li:nth-last-child(-n+2) .sub-menu,
.main-navigation .nav-menu li:last-child .sub-menu {
    left: auto;
    right: 0;
}
.main-navigation .nav-menu .sub-menu li {
    display: block;
}
.main-navigation .nav-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.main-navigation .nav-menu .sub-menu a:hover {
    background: rgba(255,107,0,0.1);
}
.main-navigation .nav-menu li:hover > .sub-menu {
    display: block;
}

/* ===== PAGE HEADER (centered titles) ===== */
.page-header {
    padding: 120px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0,168,168,0.15);
    margin-bottom: 20px;
}
.page-header h1 {
    font-size: 36px; font-weight: 700; color: #fff;
    letter-spacing: 3px; text-transform: uppercase;
    text-align: center;
}

/* ===== ENTRY HEADER (used inside content area) ===== */
.entry-header {
    padding: 40px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0,168,168,0.15);
    margin-bottom: 20px;
}
.entry-header .entry-title {
    font-size: 32px; font-weight: 700; color: #fff;
    letter-spacing: 2px; text-transform: uppercase;
    text-align: center;
}

/* ===== BATTLEBRAIN PAGE ===== */
.battlebrain-screenshot {
    text-align: center;
    margin: 0 auto 20px;
}
.battlebrain-screenshot img {
    display: block;
    margin: 0 auto;
}

    /* BattleBrain store buttons: Apple left, Google right */
.entry-content .store-buttons.battlebrain-stores {
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
}
.entry-content .store-buttons.battlebrain-stores a {
    flex-shrink: 0;
}
.entry-content .store-buttons.battlebrain-stores a img {
    width: 270px;
    height: 88px;
}
.entry-content .store-buttons.battlebrain-stores.shrink a img {
    width: 162px;
    height: 53px;
}

/* ===== CONTENT AREA ===== */
.content-area {
    max-width: 900px; margin: 0 auto; padding: 0 20px 60px;
}
.entry-content p { margin-bottom: 1.2em; color: rgba(255,255,255,0.85); }
.entry-content h2, .entry-content h3 {
    color: #fff; margin: 1.5em 0 0.5em;
    text-align: center;
}
.entry-content ul { margin: 1em 0 1.5em 1.5em; color: rgba(255,255,255,0.85); }
.entry-content li { margin-bottom: 0.5em; }

/* ===== HOMEPAGE HERO ===== */
.hero { position: relative; height: 100vh; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hero-video-container { position: absolute; inset: 0; z-index: 1; }
.hero-video-container video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; z-index: 2; background: transparent; }
.hero-scroll-indicator { position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%); z-index: 3; }
.scroll-circle { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 2px solid rgba(255,255,255,0.5); border-radius: 50%; animation: bounce 2s infinite; }
.scroll-circle svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(10px); } 60% { transform: translateY(5px); } }

/* ===== SERVICES SECTION ===== */
.services-section { padding: 80px 20px; background: #0a0a0a; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; max-width: 1100px; margin: 0 auto; }
a.service-card { display: block; text-decoration: none; color: inherit; }
.service-card { text-align: center; padding: 40px 30px; background: rgba(255,255,255,0.03); border: 1px solid rgba(0,168,168,0.1); border-radius: 12px; transition: transform 0.3s, border-color 0.3s; }
.service-icon { font-size: 48px; color: #fff; margin-bottom: 20px; }
.service-card h3 { font-size: 20px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.service-card p { color: rgba(255,255,255,0.7); font-size: 15px; }

/* ===== GAMES GRID (archive) ===== */
.games-section { padding: 20px 20px 80px; }
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}
.game-card {
    display: block;
    background: #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,168,168,0.15);
    transition: transform 0.35s, box-shadow 0.35s, border-color 0.35s;
    text-decoration: none;
}
.game-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(255,107,0,0.3);
    border-color: #FF6B00;
}
.game-thumbnail {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}
.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s;
}
.game-card:hover .game-thumbnail img { transform: scale(1.05); }
.game-content { padding: 24px; }
.game-content h3 {
    font-size: 22px; font-weight: 700; color: #fff;
    margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px;
}
.game-excerpt {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ===== PARTNERS SECTION (Company page) ===== */
.partners-section { padding: 60px 20px; }
.partners-section .section-title {
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
}
.partners-section .section-title span { color: #FF6B00; }
.partners-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: center;
    justify-items: center;
}
.partners-grid img {
    width: 192px;
    height: 192px;
    object-fit: contain;
    filter: grayscale(0.3);
    transition: filter 0.3s, transform 0.3s;
}
.partners-grid img:hover {
    filter: grayscale(0);
    transform: scale(1.05);
}

/* ===== STORE BUTTONS ===== */
.store-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.store-buttons a img {
    width: 270px;
    height: 88px;
    object-fit: contain;
    transition: transform 0.3s, filter 0.3s;
}
.store-buttons a img:hover {
    transform: scale(1.05);
    filter: brightness(1.15);
}

/* Right-align Google Play buttons inside entry-content */
.entry-content a[href*="play.google.com"] {
    display: block;
    text-align: right;
}
.entry-content a[href*="play.google.com"] img {
    display: inline-block;
    margin: 8px 0;
}

/* Flex layout for SiteOrigin panel grids that contain store buttons */
.entry-content .panel-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
}
.entry-content .panel-grid .panel-grid-cell {
    flex: 0 0 auto;
}

/* Terms of Service: spacing above bold section headers */
.terms-content p > strong {
    display: inline-block;
    margin-top: 1.5em;
    margin-bottom: 0.2em;
    color: #fff;
    font-size: 1.1em;
}
.terms-content p:first-of-type > strong {
    margin-top: 0;
}

/* ===== FOOTER ===== */
.site-footer {
    padding: 30px 20px;
    border-top: 1px solid rgba(0,168,168,0.15);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-legal {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    text-align: right;
}
.footer-legal a {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
}
.footer-legal a:hover { color: #FF6B00; }
.footer-copy {
    color: rgba(255,255,255,0.4);
    font-size: 13px;
}
.footer-social {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}
.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    transition: background 0.3s, transform 0.3s;
}
.footer-social a:hover {
    background: rgba(255,107,0,0.2);
    transform: translateY(-2px);
}
.footer-social a svg {
    display: block;
    width: 18px;
    height: 18px;
}

/* ===== MOBILE HAMBURGER MENU ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1004;
}
.hamburger-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
    border-radius: 1px;
}
/* When active, real bars vanish instantly */
.menu-toggle.active .hamburger-bar {
    display: none;
}
/* Clean X via pseudo-elements (instant, no animation) */
.menu-toggle.active::before,
.menu-toggle.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 2px;
    margin-top: -1px;
    margin-left: -11px;
    background: #fff;
    border-radius: 1px;
}
.menu-toggle.active::before {
    transform: rotate(45deg);
}
.menu-toggle.active::after {
    transform: rotate(-45deg);
}
/* When menu-toggle is NOT active, hide the pseudo-elements */
.menu-toggle:not(.active)::before,
.menu-toggle:not(.active)::after {
    display: none;
}

/* ===== VIEWPORT-TRIGGERED STYLES ===== */
body.tagline-small .site-tagline { font-size: 11px; }

/* ===== MOBILE SLIDE-OUT PANEL ===== */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
}
.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(12px);
    border-left: 1px solid rgba(0,168,168,0.2);
    z-index: 1002;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    padding: 80px 0 40px;
}
.mobile-nav-panel.open {
    transform: translateX(0);
}
.mobile-nav-overlay.active,
.mobile-nav-panel.open + .mobile-nav-overlay {
    display: block;
}
.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-nav-item {
    border-bottom: 1px solid rgba(0,168,168,0.15);
}
.mobile-nav-item > a {
    display: block;
    padding: 16px 24px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s, background 0.3s;
}
.mobile-nav-item > a:hover {
    color: #FF6B00;
    background: rgba(255,107,0,0.08);
}
.mobile-nav-item.has-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.mobile-nav-item.has-sub > a {
    flex: 1;
}
.mobile-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 8px;
}
.toggle-icon {
    display: block;
    width: 12px;
    height: 12px;
    position: relative;
}
.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    background: #fff;
    transition: transform 0.3s ease;
}
.toggle-icon::before {
    width: 12px;
    height: 2px;
    top: 5px;
    left: 0;
}
.toggle-icon::after {
    width: 2px;
    height: 12px;
    top: 0;
    left: 5px;
}
.mobile-sub-toggle.open .toggle-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}
.mobile-sub {
    list-style: none;
    width: 100%;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: rgba(0,168,168,0.05);
}
.mobile-sub.open {
    max-height: 600px;
}
.mobile-sub li {
    border-top: 1px solid rgba(0,168,168,0.1);
}
.mobile-sub li a {
    display: block;
    padding: 12px 24px 12px 40px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: color 0.3s, background 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mobile-sub li a:hover {
    color: #FF6B00;
    background: rgba(255,107,0,0.08);
}

/* Mobile legal link */
.mobile-nav-legal a {
    font-size: 12px !important;
    color: rgba(255,255,255,0.5) !important;
    letter-spacing: 0.5px;
}
.mobile-nav-legal a:hover {
    color: rgba(255,107,0,0.7) !important;
    background: none !important;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
    .games-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .partners-grid { grid-template-columns: repeat(3, 1fr); }
    .partners-grid img { width: 160px; height: 160px; }
    .store-buttons { justify-content: center; }
}
@media (max-width: 600px) {
    .site-tagline { display: none; }
}

@media (max-width: 850px) {
    .site-header { padding: 12px 15px; }
    .desktop-nav { display: none; }
    .menu-toggle { display: flex; }
    .page-header { padding: 100px 15px 15px; }
    .page-header h1 { font-size: 28px; }
    .games-grid { grid-template-columns: 1fr; gap: 20px; }
    .game-thumbnail { height: 200px; }
    .services-grid { grid-template-columns: 1fr; }
    .partners-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .partners-grid img { width: 140px; height: 140px; }
    .services-section { padding: 40px 15px; }
    .store-buttons { justify-content: center; }
    .footer-inner { flex-direction: column; align-items: flex-end; }
    .footer-legal { justify-content: flex-end; }
    .footer-social { justify-content: flex-end; }
}

/* ===== GAME PAGE STORE BUTTONS (Apple left, Google right) ===== */
.store-buttons.game-page-stores {
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
}
.store-buttons.game-page-stores a {
    flex-shrink: 0;
}
.store-buttons.game-page-stores a img {
    width: 270px;
    height: 88px;
}
.store-buttons.game-page-stores.shrink a img {
    width: 162px;
    height: 53px;
}

/* ===== APPLE-ONLY CENTERED STORE BUTTONS ===== */
.store-buttons.app-store-center {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 20px 0;
}
.store-buttons.app-store-center a {
    margin: 0 auto;
}

/* ===== GAME TRAILER / VIDEO EMBED ===== */
.game-trailer {
    max-width: 860px;
    margin: 20px auto;
    border-radius: 4px;
    overflow: hidden;
}
.game-trailer iframe {
    display: block;
    width: 860px;
    height: 480px;
    border: 0;
}
@media (max-width: 750px) {
    .game-trailer iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

/* ===== YOUTUBE VIDEO EMBED ===== */
.video-embed-container {
    position: relative;
    width: 100%;
    max-width: 860px;
    margin: 20px auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}
.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Extended Reality page description spacing */
.xr-desc { margin-bottom: 5em; }

/* ===== SCREENSHOT GALLERY (vertical stack like Crusade of Destiny) ===== */
.screenshot-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}
.screenshot-gallery .gallery-item {
    text-align: center;
}
.screenshot-gallery .gallery-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0 auto;
}

/* ===== GAME PAGE SCREENSHOT CENTERING ===== */
.game-screenshot {
    text-align: center;
    margin: 20px auto;
    max-width: 860px;
}
.game-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 0 auto;
}

/* ===== OPENUSD SIMULATION DEMO ===== */

/* Entry header inside content-area (simulations page) */
body.simulations-page .entry-header {
    padding: 90px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0,168,168,0.15);
    margin-bottom: 0;
}

/* Full-width canvas area overrides theme container */
.simulation-canvas-area {
    position: relative;
    width: 100%;
    height: calc(100vh - 160px);
    min-height: 500px;
    overflow: hidden;
    background: #0a0a0f;
    margin: 0;
    padding: 0;
}

/* Override theme container max-width for simulation page */
body.simulations-page .content-area,
body.simulations-page .container {
    max-width: none;
    width: 100%;
    padding: 0;
    margin: 0;
}
@supports not selector(:has(*)) {
    body.simulations-page .content-area,
    body.simulations-page .container {
        max-width: none;
        width: 100%;
        padding: 0;
        margin: 0;
    }
}

/* Canvas container */
#canvas-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
#canvas-container canvas {
    display: block;
}

/* UI Overlay — glassmorphism panels */
#ui-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#ui-overlay > * {
    pointer-events: auto;
}

/* Header panel */
#ui-overlay .header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 20px;
    max-width: fit-content;
}
#ui-overlay .header .logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}
#ui-overlay .header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: -0.3px;
    text-transform: none;
    margin: 0;
}
#ui-overlay .subtitle {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* Scene tabs */
.scene-tabs {
    display: flex;
    gap: 8px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 8px;
    max-width: fit-content;
}
.scene-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.scene-btn:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.scene-btn.active {
    background: rgba(0, 122, 255, 0.2);
    color: #4da3ff;
    box-shadow: 0 0 0 1px rgba(0,122,255,0.3);
}
.scene-btn .icon {
    font-size: 18px;
}

/* Controls panel */
.controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 16px;
    max-width: fit-content;
}
.controls button {
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.controls button:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
}
.speed-control label {
    font-size: 12px;
    color: #888;
}

/* Info panel */
.info-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    z-index: 10;
}
.scene-info {
    background: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 12px 16px;
}
.scene-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}
.scene-info p {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Info panel inside sidebar (not the overlay one) */
.simulation-sidebar .info-panel {
    display: none;
}
.specs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.specs li {
    font-size: 12px;
    color: #777;
}

/* Tech badge */
.tech-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.tech-badge span {
    background: rgba(0, 122, 255, 0.12);
    border: 1px solid rgba(0,122,255,0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 11px;
    color: #4da3ff;
    font-weight: 500;
}

/* Loading overlay */
#loading {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #0a0a0f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 100;
    transition: opacity 0.5s;
}
#loading.hidden {
    opacity: 0;
    pointer-events: none;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #4da3ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
#loading p {
    color: #888;
    font-size: 14px;
}

/* ===== SIMULATION LAYOUT ===== */
.simulation-wrapper {
    display: flex;
    width: 100%;
    height: 70vh;
    min-height: 540px;
    background: #000;
    overflow: hidden;
}
.simulation-sidebar {
    width: 280px;
    min-width: 240px;
    max-width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: #0a0a0a;
    border-right: 1px solid rgba(0,168,168,0.15);
    overflow-y: auto;
}
.simulation-viewport {
    flex: 1;
    position: relative;
    background: #000;
    min-width: 0;
}
.sidebar-block {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 14px;
}
.scene-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.simulation-sidebar .scene-tabs {
    width: 100%;
    max-width: none;
}
.scene-btn {
    text-align: left;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.simulation-sidebar .scene-btn {
    width: 100%;
}
.scene-btn:hover { background: rgba(255,255,255,0.12); }
.scene-btn.active { background: rgba(255,107,0,0.4); border-color: #FF6B00; color: #fff; }
.controls-inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.controls-inner button {
    text-align: left;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.controls-inner button:hover { background: rgba(255,255,255,0.15); }
.simulation-sidebar .speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.simulation-sidebar .speed-control input[type="range"] {
    flex: 1;
    width: 100%;
    accent-color: #FF6B00;
}
.info-panel h3 { font-size: 14px; margin: 0 0 8px; }
.info-panel p { font-size: 12px; color: rgba(255,255,255,0.6); margin: 0 0 10px; line-height: 1.5; }

/* ===== SIMULATION RESPONSIVE ===== */
@media (max-width: 850px) {
    .simulation-wrapper {
        flex-direction: column-reverse;
        height: auto;
        min-height: auto;
    }
    .simulation-sidebar {
        width: 100%;
        max-width: none;
        min-width: auto;
        border-right: none;
        border-top: 1px solid rgba(0,168,168,0.15);
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }
    .sidebar-block { min-width: auto; width: 100%; }
    .scene-tabs {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 8px;
        width: 100%;
        max-width: none;
    }
    .scene-btn { width: 100%; }
    .info-panel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
        grid-column: auto;
    }
    .info-panel h3,
    .info-panel p { word-break: break-word; }
    .simulation-viewport {
        height: 50vh;
        min-height: 300px;
    }
    .simulation-canvas-area {
        height: calc(100vh - 130px);
    }
    #ui-overlay .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    #ui-overlay .header h1 { font-size: 16px; }
    .scene-tabs { flex-wrap: wrap; }
    .scene-btn { padding: 8px 12px; font-size: 12px; }
    .scene-btn .label { display: none; }
    .controls { flex-wrap: wrap; }
    .info-panel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
    }
    .tech-badge {
        bottom: 10px;
        right: 10px;
    }
}
