@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo:wght@300;400;600&family=Roboto:wght@400;500;700&display=swap');

/* Design tokens – scrollbar & accent */
:root {
    --vs-accent: rgba(0, 255, 200, 0.35);
    --vs-accent-hover: rgba(0, 255, 200, 0.6);
    --vs-scrollbar-size: 6px;
}

/* Global Futuristic Theme */
* {
    box-sizing: border-box;
}

/* Single source of truth: minimal themed scrollbars */
.vs-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--vs-accent) transparent;
}
.vs-scrollbar::-webkit-scrollbar {
    width: var(--vs-scrollbar-size);
    height: var(--vs-scrollbar-size);
}
.vs-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.vs-scrollbar::-webkit-scrollbar-thumb {
    background: var(--vs-accent);
    border-radius: 10px;
    transition: background 0.2s ease;
}
.vs-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--vs-accent-hover);
}

/* Minimal toast – subtle, non-intrusive (e.g. save confirmation) */
.vs-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    font-size: 12px;
    line-height: 1.3;
    color: var(--vs-accent-hover);
    background: rgba(0, 255, 200, 0.08);
    border: 1px solid var(--vs-accent);
    border-radius: 8px;
    backdrop-filter: blur(6px);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.vs-toast.show {
    opacity: 1;
    transform: translateY(0);
}

body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', 'Exo', monospace;
    background: #323232; /* Grey background matching universe theme */
    overflow: hidden;
    color: #FFFFFF;
    font-size: 14px; /* Smaller font size */
    line-height: 1.4;
}

/* Boundless Universe Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -2;
    pointer-events: none;
    background: 
        linear-gradient(135deg, #323232 0%, #404040 100%);
}

/* Universe Particle Effect */
#starfield {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -1;
    background: 
        radial-gradient(2px 2px at 20px 30px, rgba(200, 200, 200, 0.4), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(180, 180, 180, 0.3), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(220, 220, 220, 0.5), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(190, 190, 190, 0.4), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: twinkle 20s infinite linear;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* Code Editor Container Styles - Updated for new layout */

/* Code Editor Container Styles */
.code-editor-container {
    display: flex;
    height: 100%;
    background: rgba(35, 35, 35, 0.9);
    border-radius: 0; /* Remove border radius to make flush with ESC menu */
    border: none; /* Remove border to make flush with ESC menu */
    overflow: hidden; /* Prevent nested scrollbars */
}

.code-editor-code-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(35, 35, 35, 0.9);
    border-radius: 0; /* Remove border radius to make flush */
    border: none; /* Remove border to make flush */
    overflow: hidden;
}

.code-editor-ai-assistant {
    width: 300px;
    display: flex;
    flex-direction: column;
    background: rgba(45, 45, 45, 0.8);
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid rgba(0, 255, 204, 0.2);
    overflow: hidden; /* Prevent nested scrollbars */
}

/* Preview iframe styles */
#preview-iframe {
    margin-top: 1rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .code-editor-container {
        flex-direction: column;
        height: auto;
    }
    
    #files-pane,
    .code-editor-ai-assistant {
        width: 100%;
        max-width: none;
    }
}

/* Enhanced World Map Styling */
#map-canvas-host {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden; /* No horizontal scrollbar */
    background: #1f2327; /* Fallback background */
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px #343a40;
}

/* Map canvas styling */
#map-canvas-host canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: auto;
    border-radius: 14px;
}

/* Map controls positioning */
.map-controls {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 0.75rem;
    z-index: 10;
}

/* Map legend styling */
.map-legend {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(45,45,45,0.8);
    padding: 1rem;
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10;
}

/* Map info box styling */
#sphere-info-box {
    position: absolute;
    background: rgba(45,45,45,0.9);
    color: #fff;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    pointer-events: none;
    z-index: 20;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Boundless Universe Glassmorphism Panels */
.glassy-box {
    backdrop-filter: blur(15px);
    background: rgba(50, 50, 50, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border-radius: 8px;
}

/* Welcome Container */
.welcome-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 480px;
    max-width: 95vw;
    text-align: center;
    padding: 3rem 2.5rem 2.5rem 2.5rem;
    border-radius: 16px;
    z-index: 2;
    background: rgba(55, 55, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Typography */
h1 {
    margin-bottom: 2rem;
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #00FFCC;
    text-shadow: 
        0 0 10px rgba(0, 255, 204, 0.5),
        0 0 20px rgba(0, 255, 204, 0.3),
        0 0 30px rgba(0, 255, 204, 0.1);
    text-transform: uppercase;
}

/* Form Toggle */
.form-toggle {
    margin-bottom: 1.5rem;
}

.form-toggle button {
    margin: 0 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-toggle button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.form-toggle button.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Auth Forms */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.auth-form input {
    padding: 0.6rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: 'Exo', sans-serif;
    font-size: 14px;
    background: rgba(45, 45, 45, 0.8);
    color: #FFFFFF;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.auth-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Input Groups */
.input-group {
    display: flex;
    align-items: center;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

.input-icon {
    padding: 0 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    opacity: 0.8;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #FFFFFF;
    font-family: 'Exo', sans-serif;
    font-size: 14px;
    padding: 0.6rem 0.4rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 14px;
    font-family: 'Exo', sans-serif;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 400;
    transition: all 0.3s ease;
}

.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    background: rgba(45, 45, 45, 0.8);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me input[type="checkbox"]:checked {
    background: rgba(0, 255, 204, 0.3);
    border-color: #00FFCC;
    box-shadow: 
        0 0 6px rgba(0, 255, 204, 0.4),
        inset 0 0 4px rgba(0, 255, 204, 0.2);
}

.remember-me input[type="checkbox"]:checked::after {
    /* Removed checkmark - using neon fill instead */
    content: '';
}

.remember-me input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.15);
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Login Button */
.login-btn {
    width: 85%;
    margin: 1rem auto 0 auto;
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 2px solid #00FFCC;
    border-radius: 8px;
    padding: 1rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 10px rgba(0, 255, 204, 0.3),
        0 0 20px rgba(0, 255, 204, 0.1),
        inset 0 0 10px rgba(0, 255, 204, 0.05);
    position: relative;
    overflow: hidden;
    display: block;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: #00FFCC;
    transform: translateY(-2px);
    box-shadow: 
        0 0 15px rgba(0, 255, 204, 0.4),
        0 0 30px rgba(0, 255, 204, 0.2),
        inset 0 0 15px rgba(0, 255, 204, 0.1);
}

.login-btn:hover::before {
    left: 100%;
}

/* Form Messages */
.form-message {
    color: #00FFCC;
    font-family: 'Exo', sans-serif;
    font-size: 14px;
    min-height: 1.5em;
    margin-top: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    padding: 0.5rem;
    border-radius: 4px;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.3);
    display: none;
}

.form-message:not(:empty) {
    display: block;
}

.form-message.error {
    color: #FF6B6B;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.form-message.success {
    color: #00FFCC;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.3);
}

/* Social Login Section */
.social-login-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.divider {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    gap: 0.8rem;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.divider-text {
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Exo', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.social-btn {
    /* Approximately 50–60% of main login button width */
    width: 45%;
    max-width: 180px;
    min-width: 140px;
    margin: 0;
    padding: 0.65rem 0.35rem;
    border-radius: 6px;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    box-shadow:
        0 0 4px rgba(255, 255, 255, 0.1),
        inset 0 0 4px rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow:
        0 0 6px rgba(255, 255, 255, 0.15),
        inset 0 0 6px rgba(255, 255, 255, 0.05);
}

.social-btn:active {
    transform: translateY(0);
    box-shadow:
        0 0 3px rgba(255, 255, 255, 0.12),
        inset 0 0 4px rgba(255, 255, 255, 0.04);
}

.social-btn.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.social-btn.is-loading .spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.social-icon {
    flex-shrink: 0;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.social-btn:hover::before {
    left: 100%;
}

/* Brand-specific classes kept for semantics/icons, but visual style is unified
   with the Volosphere teal theme (no brand-specific colors). */
.google-btn,
.apple-btn {
    /* No additional styles needed; inherit from .social-btn */
}

@media (max-width: 600px) {
    .social-buttons {
        flex-direction: column;
    }

    .social-btn {
        width: 85%;
        max-width: none;
        min-width: 0;
    }
}

/* Legal Links */
.legal-links {
    margin-top: 0.8rem;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.legal-links a {
    color: #00FFC3;
    text-decoration: none;
    transition: all 0.3s ease;
}

.legal-links a:hover {
    text-decoration: underline;
    color: #00FFC3;
    text-shadow: 0 0 8px rgba(0, 255, 195, 0.5);
}

.legal-links .separator {
    color: rgba(255, 255, 255, 0.3);
}

/* Register Link */
.register-link {
    margin-top: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Exo', sans-serif;
    font-size: 13px;
    font-weight: 400;
}

.register-link a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
}

.register-link a:hover {
    color: #FFFFFF;
}

/* =========================================================
   AUTH MODAL – single source of truth (backdrop, panel, forgot steps)
   ========================================================= */

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 160ms ease;
    pointer-events: auto;
}

.auth-modal-backdrop.open {
    opacity: 1;
}

.auth-modal-panel {
    width: 420px;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    padding: 28px;
    background: rgba(32, 32, 34, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    color: #FFFFFF;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 160ms cubic-bezier(0.16, 0.84, 0.44, 1),
                transform 160ms cubic-bezier(0.16, 0.84, 0.44, 1);
}

.auth-modal-panel.open {
    opacity: 1;
    transform: scale(1);
}

.forgot-step {
    display: none;
}

.forgot-step.step-active {
    display: block;
}

.auth-modal-title {
    margin-bottom: 1rem;
}

.auth-modal-subtext {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.auth-modal-panel .login-btn.secondary {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-modal-panel .login-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.auth-modal-panel h2 {
    margin-top: 0;
    margin-bottom: 18px;
}

.auth-modal-panel .auth-form {
    margin-top: 10px;
}

.auth-modal-panel .form-message {
    margin-top: 10px;
}

.auth-modal-panel .register-link {
    margin-top: 16px;
    text-align: center;
}

.auth-back-link {
    cursor: pointer;
}

.auth-modal-panel .register-link .auth-back-link {
    margin-left: 0;
}

/* HUD and Menu Styles */
#hud {
    position: fixed;
    top: 1rem;
    left: 1rem;
    color: #FFFFFF;
    background: rgba(25, 25, 45, 0.9);
    border: 2px solid #00FFCC;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    z-index: 10;
    min-width: 250px;
    pointer-events: none;
    box-shadow: 
        0 0 20px rgba(0, 255, 204, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.3);
}

#menu {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(25, 25, 45, 0.95);
    border: 2px solid #00FFCC;
    color: #FFFFFF;
    padding: 2.5rem 3rem;
    border-radius: 16px;
    z-index: 20;
    text-align: center;
    font-family: 'Orbitron', monospace;
    box-shadow: 
        0 0 30px rgba(0, 255, 204, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.4);
}

#menu h2 {
    color: #00FFCC;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
}

#menu button {
    margin: 0.5rem;
    padding: 0.75rem 2rem;
    border: 2px solid #00FFCC;
    border-radius: 8px;
    background: rgba(0, 255, 204, 0.1);
    color: #00FFCC;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#menu button:hover {
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    transform: translateY(-2px);
}

/* Crosshair */
.crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #00FFCC;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1000;
    display: none;
    box-shadow: 
        0 0 10px rgba(0, 255, 204, 0.8),
        0 0 20px rgba(0, 255, 204, 0.4);
    transition: all 0.3s ease;
}

.crosshair.locked {
    display: block;
    opacity: 1;
}

.crosshair.unlocked {
    opacity: 0;
}

/* Creator Panel Styles */
.creator-panel {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    width: 300px;
    height: 400px;
    background: rgba(25, 25, 45, 0.95);
    border: 2px solid #00FFCC;
    border-radius: 12px;
    z-index: 100;
    display: none;
    box-shadow: 
        0 0 30px rgba(0, 255, 204, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.4);
    font-family: 'Orbitron', monospace;
}

.creator-header {
    background: rgba(0, 255, 204, 0.1);
    padding: 1rem;
    border-bottom: 2px solid #00FFCC;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.creator-title {
    color: #00FFCC;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.creator-close {
    background: none;
    border: none;
    color: #00FFCC;
    font-size: 18px;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.creator-close:hover {
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.creator-tabs {
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 40, 0.8);
}

.creator-tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #FFFFFF;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid transparent;
}

.creator-tab:hover {
    background: rgba(0, 255, 204, 0.1);
    border-left-color: #00FFCC;
}

.creator-tab.active {
    background: rgba(0, 255, 204, 0.2);
    border-left-color: #00FFCC;
    color: #00FFCC;
}

.creator-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.creator-button {
    background: rgba(0, 255, 204, 0.1);
    border: 2px solid #00FFCC;
    color: #00FFCC;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.25rem;
}

.creator-button:hover {
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
}

.creator-button.primary {
    background: linear-gradient(135deg, #00FFCC 0%, #00FFFF 100%);
    color: #000000;
    font-weight: 700;
}

.creator-button.primary:hover {
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.5);
    transform: translateY(-2px);
}

/* Code Editor Styles */
.code-editor-container {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    gap: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.code-editor-file-column {
    width: 200px;
    flex-shrink: 0;
    background: rgba(45, 45, 45, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 204, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.code-editor-code-viewer {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    background: rgba(45, 45, 45, 0.9);
    border-radius: 0;
    border: none;
    overflow: hidden;
}

.code-editor-ai-assistant {
    width: 200px;
    flex-shrink: 0;
    background: rgba(45, 45, 45, 0.3);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 204, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* File column elements */
.code-editor-file-column h4 {
    margin: 0 0 1rem 0;
    color: #00FFCC;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-editor-file-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.code-editor-file-column li {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-family: 'Exo', monospace;
}

.code-editor-file-column li:hover {
    background: rgba(0, 255, 204, 0.2);
    border-color: rgba(0, 255, 204, 0.4);
    transform: translateX(2px);
}

.code-editor-file-column li.active {
    background: rgba(0, 255, 204, 0.3);
    border-color: #00FFCC;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

/* Code viewer elements (CodeMirror 6) */
.code-editor-code-viewer .cm-editor {
    flex: 1;
    height: 100%;
    font-family: 'Exo', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.code-editor-code-viewer .cm-scroller {
    min-height: 0;
}

.code-editor-code-viewer .cm-gutters {
    background: rgba(45, 45, 45, 0.5);
    border-right: 1px solid rgba(0, 255, 255, 0.2);
}

.code-editor-code-viewer .cm-lineNumbers .cm-gutterElement {
    color: rgba(0, 255, 255, 0.6);
}

.code-editor-code-viewer .cm-cursor {
    border-color: #00FFCC;
}

.code-editor-code-viewer .cm-selectionBackground {
    background: rgba(0, 255, 204, 0.2);
}

/* Inline AI ghost suggestion */
.cm-ai-ghost {
    opacity: 0.4;
    color: #8fa1ff;
    pointer-events: none;
}

/* AI Safe Apply Preview */
.ai-preview {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: rgba(15, 26, 29, 0.95);
    border: 1px solid rgba(140, 255, 230, 0.25);
    border-radius: 8px;
    font-size: 12px;
}
.ai-preview-header {
    color: #00FFCC;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.ai-preview-edit {
    margin-bottom: 0.5rem;
}
.ai-preview-path {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}
.ai-preview-action {
    color: rgba(140, 255, 230, 0.8);
    margin-left: 0.25rem;
}
.ai-preview-diff {
    margin: 0.25rem 0 0 0;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 8em;
    overflow: auto;
    font-size: 11px;
}
.ai-preview-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.ai-preview-actions button {
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid rgba(140, 255, 230, 0.3);
    background: rgba(0, 255, 204, 0.1);
    color: #00FFCC;
}
.ai-preview-actions button:hover {
    background: rgba(0, 255, 204, 0.2);
}

/* AI Runtime Error (event bus) */
.ai-runtime-error {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: rgba(40, 20, 20, 0.95);
    border: 1px solid rgba(255, 140, 140, 0.35);
    border-radius: 8px;
    font-size: 12px;
}
.ai-runtime-error-header {
    color: #ff8888;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.ai-runtime-error-message {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.25rem;
    word-break: break-word;
}
.ai-runtime-error-phase {
    color: rgba(255, 200, 200, 0.9);
    font-size: 11px;
    margin-bottom: 0.5rem;
}
.ai-runtime-error-location {
    display: block;
    font-size: 12px;
    margin-bottom: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.25);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
}
.ai-runtime-error-location:hover {
    background: rgba(0, 255, 204, 0.14);
    border-color: rgba(0, 255, 204, 0.4);
}
.ai-runtime-error-location:focus {
    outline: 1px solid rgba(0, 255, 204, 0.5);
    outline-offset: 2px;
}
.ai-runtime-error-location .ai-runtime-error-location-label {
    color: rgba(0, 255, 204, 0.85);
    margin-right: 0.25rem;
}
.ai-runtime-error-location .ai-runtime-error-location-value {
    margin-right: 0.75rem;
}
.ai-runtime-error-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.ai-runtime-error-actions button {
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid rgba(255, 140, 140, 0.4);
    background: rgba(255, 100, 100, 0.15);
    color: #ffaaaa;
}
.ai-runtime-error-actions button:hover {
    background: rgba(255, 100, 100, 0.25);
}

/* AI compact error bar (bottom, dismissible) */
.ai-error-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(180, 40, 40, 0.15);
  border-top: 1px solid rgba(255, 80, 80, 0.4);
  font-size: 12px;
}
.ai-error-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-error-actions button {
  margin-left: 6px;
  font-size: 11px;
}

.ai-runtime-console {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,15,20,0.95);
  font-family: monospace;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  max-height: 200px;
}

.ai-console-header {
  display: flex;
  justify-content: space-between;
  padding: 4px 8px;
  background: rgba(0,0,0,0.3);
}

.ai-console-body {
  overflow-y: auto;
  padding: 6px;
}

.ai-console-entry {
  margin-bottom: 4px;
  white-space: pre-wrap;
}

.ai-console-log {
  color: #8fa1ff;
}

.ai-console-warn {
  color: #ffcc66;
}

.ai-console-error {
  color: #ff6b6b;
}

#editor-view-switch > #editor-view-container,
#editor-view-switch > #console-view-container {
  flex: 1;
  min-height: 0;
}

#console-view-container {
  background: #0d0f15;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.console-header {
  flex: 0 0 auto;
}

.console-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

#standalone-console {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  font-family: monospace;
  font-size: 13px;
}

#standalone-console .console-body {
  padding: 12px;
  min-height: 0;
}

/* AI Assistant elements */
.code-editor-ai-assistant h4 {
    margin: 0 0 1rem 0;
    color: #00FFCC;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.code-editor-ai-assistant input {
    width: 100%;
    padding: 0.5rem;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #FFFFFF;
    font-family: 'Exo', sans-serif;
    font-size: 12px;
}

.code-editor-ai-assistant button {
    background: transparent;
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    width: 100%;
}

.code-editor-ai-assistant button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.code-editor-ai-assistant button:active {
    background: rgba(255, 255, 255, 0.2);
}

/* AI Suggestions display */
#ai-suggestions {
    flex: 1;
    background: rgba(45, 45, 45, 0.9);
    padding: 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    overflow-y: auto;
    font-size: 11px;
    font-family: 'Exo', monospace;
    color: #00FFCC;
    line-height: 1.4;
}

/* Responsive design */
@media (max-width: 768px) {
    .code-editor-container {
        flex-direction: column;
        gap: 0;
    }
    
    .code-editor-file-column,
    .code-editor-ai-assistant {
        width: 100%;
        flex-shrink: 0;
    }
    
    .code-editor-code-viewer {
        min-width: 0;
        min-height: 300px;
    }
}

/* Fallback textarea styles */
.code-editor-textarea {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 1rem;
    background: rgba(45, 45, 45, 0.9);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-family: 'Exo', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
    overflow: auto;
}

.code-editor-textarea:focus {
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

/* Button styles for file management */
.code-editor-file-column button,
.code-editor-code-viewer button {
    background: transparent;
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.code-editor-file-column button:hover,
.code-editor-code-viewer button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.code-editor-file-column button:active,
.code-editor-code-viewer button:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Current file name display */
#current-file-name {
    font-weight: bold;
    color: #00FFCC;
    text-align: center;
    padding: 0.5rem;
    background: rgba(0, 255, 204, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 204, 0.3);
    margin-bottom: 1rem;
}

/* Preview container styles */
#preview-container {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(45, 45, 45, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

#preview-container h4 {
    margin: 0 0 1rem 0;
    color: #00FFFF;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#preview-scene {
    min-height: 200px;
    background: rgba(45, 45, 45, 0.9);
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 255, 255, 0.6);
    font-family: 'Exo', monospace;
    font-size: 12px;
}

/* Status Messages */
.status-message {
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    font-family: 'Exo', sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.status-success {
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid #00FFCC;
    color: #00FFCC;
}

.status-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #FF6B6B;
    color: #FF6B6B;
}

.status-info {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00FFFF;
    color: #00FFFF;
}

/* Loading States */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 255, 204, 0.3);
    border-radius: 50%;
    border-top-color: #00FFCC;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .welcome-container {
        min-width: 320px;
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .creator-panel {
        width: 280px;
        height: 350px;
        right: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Utility Classes */
.text-neon {
    text-shadow: 0 0 10px currentColor;
}

.border-neon {
    box-shadow: 0 0 10px currentColor;
}

.glow {
    filter: drop-shadow(0 0 10px currentColor);
}

/* Ambient Particle System */
.particle {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 204, 0.6) 0%, rgba(0, 255, 204, 0.2) 50%, transparent 100%);
    animation: float 8s infinite ease-in-out;
}

.particle:nth-child(odd) {
    background: radial-gradient(circle, rgba(0, 255, 255, 0.4) 0%, rgba(0, 255, 255, 0.1) 50%, transparent 100%);
    animation-duration: 12s;
}

.particle:nth-child(3n) {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    animation-duration: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px) scale(1.1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-15px) scale(0.9);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-30px) translateX(5px) scale(1.2);
        opacity: 0.7;
    }
} 

/* Full-Screen ESC Menu Overlay - Optimized for Performance */
#esc-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(50, 50, 50, 0.7);
    z-index: 1000;
    font-family: 'Orbitron', monospace;
    color: #FFFFFF;
    /* Use transform for better performance instead of display changes */
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Optimize for GPU acceleration */
    will-change: transform, opacity;
    /* Prevent layout thrashing */
    contain: layout style paint;
}

#esc-menu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    display: flex;
    flex-direction: row;
}

/* ESC Menu Header */
#esc-menu .esc-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(40, 40, 40, 0.9);
    z-index: 1001;
}

#esc-menu .esc-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #00FFCC;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(0, 255, 204, 0.5);
}

#esc-menu .esc-close {
    background: rgba(0, 255, 204, 0.1);
    border: 2px solid #00FFCC;
    color: #00FFCC;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
}

#esc-menu .esc-close:hover {
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    transform: scale(1.05);
}

/* ESC Menu Exit Sphere Button */
#esc-menu .esc-exit-sphere {
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid #FF6B6B;
    color: #FF6B6B;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    margin-right: 1rem;
    /* Optimized transitions for better performance */
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration for smooth animations */
    will-change: background-color, box-shadow, transform;
    /* Prevent layout thrashing */
    contain: layout style;
    /* Smooth transform for hover effects */
    transform: scale(1);
}

#esc-menu .esc-exit-sphere:hover {
    background: rgba(255, 107, 107, 0.2);
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.4);
    transform: scale(1.05);
}

/* Enhanced Settings Controls */
#esc-menu .enhanced-slider {
    width: 200px;
    height: 6px;
    background: rgba(40, 40, 40, 0.9);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    /* Optimized transitions for better performance */
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration for smooth animations */
    will-change: background-color;
    /* Prevent layout thrashing */
    contain: layout style;
}

#esc-menu .enhanced-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #00FFCC;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px #00FFCC;
    /* Smooth transitions */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration */
    will-change: transform, box-shadow;
}

#esc-menu .enhanced-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #00FFCC;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px #00FFCC;
    /* Smooth transitions */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration */
    will-change: transform, box-shadow;
}

#esc-menu .enhanced-slider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
    box-shadow: 0 0 8px #00FFCC;
}

#esc-menu .enhanced-slider:hover::-moz-range-thumb {
    transform: scale(1.1);
    box-shadow: 0 0 8px #00FFCC;
}

/* Keybinding Inputs */
#esc-menu .keybinding-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #00FFCC;
    border-radius: 6px;
    color: #FFFFFF;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    outline: none;
    /* Optimized transitions */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration */
    will-change: border-color, background-color, transform;
    /* Prevent layout thrashing */
    contain: layout style;
}

#esc-menu .keybinding-input:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: #00FFCC;
    transform: scale(1.02);
}

#esc-menu .keybinding-input:focus {
    background: rgba(0, 255, 204, 0.15);
    border-color: #00FFCC;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

/* Enhanced Checkboxes */
#esc-menu .enhanced-checkbox {
    width: 18px;
    height: 18px;
    background: rgba(45, 45, 45, 0.8);
    border: 2px solid #00FFCC;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    /* Optimized transitions */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration */
    will-change: background-color, border-color, transform;
    /* Prevent layout thrashing */
    contain: layout style;
    /* Custom appearance */
    -webkit-appearance: none;
    appearance: none;
    position: relative;
}

#esc-menu .enhanced-checkbox:checked {
    background: #00FFCC;
    border-color: #00FFCC;
}

#esc-menu .enhanced-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #1a1a1a;
    font-size: 12px;
    font-weight: bold;
}

#esc-menu .enhanced-checkbox:hover {
    background: rgba(0, 255, 204, 0.1);
    transform: scale(1.05);
}

/* Enhanced Select Dropdowns */
#esc-menu .enhanced-select {
    width: 100%;
    padding: 8px 12px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid #00FFCC;
    border-radius: 6px;
    color: #FFFFFF;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    /* Optimized transitions */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration */
    will-change: border-color, background-color;
    /* Prevent layout thrashing */
    contain: layout style;
}

#esc-menu .enhanced-select:hover {
    background: rgba(0, 255, 204, 0.1);
    border-color: #00FFCC;
}

#esc-menu .enhanced-select:focus {
    background: rgba(0, 255, 204, 0.15);
    border-color: #00FFCC;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

#esc-menu .enhanced-select option {
    background: rgba(30, 30, 30, 0.95);
    color: #FFFFFF;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
}

/* Enhanced Buttons */
#esc-menu .enhanced-button {
    background: rgba(0, 255, 204, 0.1);
    color: #00FFCC;
    border: 2px solid #00FFCC;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Optimized transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration */
    will-change: background-color, box-shadow, transform;
    /* Prevent layout thrashing */
    contain: layout style;
    /* Smooth transform for hover effects */
    transform: scale(1);
}

#esc-menu .enhanced-button:hover {
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    transform: scale(1.05);
}

/* Responsive Design for Settings */
@media (max-width: 768px) {
    #esc-menu .enhanced-slider {
        width: 150px;
    }
    
    #esc-menu .keybinding-input {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    #esc-menu .enhanced-select {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    #esc-menu .enhanced-button {
        font-size: 11px;
        padding: 0.5rem 1rem;
    }
}

/* ESC Menu Left Column - Vertical Tabs */
#esc-menu .esc-tabs {
    width: 200px;
    padding: 10px;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid #00FFCC;
    display: flex;
    flex-direction: column;
    margin-top: 68px; /* Match content area alignment */
    height: calc(100% - 68px);
    overflow-y: auto;
}

#esc-menu .esc-tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #FFFFFF;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid transparent;
    margin-bottom: 0.25rem;
    border-radius: 0 6px 6px 0;
    /* Optimized transitions for better performance */
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-left-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration for smooth animations */
    will-change: background-color, border-left-color, color, transform;
    /* Prevent layout thrashing */
    contain: layout style;
    /* Smooth transform for hover effects */
    transform: translateX(0);
}

#esc-menu .esc-tab:hover {
    background: rgba(0, 255, 204, 0.1);
    border-left-color: #00FFCC;
    color: #00FFCC;
    transform: translateX(4px);
}

#esc-menu .esc-tab.active {
    background: rgba(0, 255, 204, 0.2);
    border-left-color: #00FFCC;
    color: #00FFCC;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
    transform: translateX(4px);
}

/* ESC Menu Content Area - Optimized */
#esc-menu .esc-content {
    flex: 1;
    padding: 0; /* Remove padding to make borders flush */
    overflow-y: auto;
    margin-top: 68px; /* Fine-tuned to be perfectly flush with header */
    height: calc(100% - 68px);
    background: rgba(45, 45, 45, 0.8);
    /* Optimize scrolling performance */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Prevent layout thrashing */
    contain: layout style;
    /* GPU acceleration for smooth scrolling */
    will-change: scroll-position;
}

/* Add padding back for non-code-editor content */
#esc-menu .esc-content > *:not(.code-editor-container) {
    padding: 1.5rem;
}

/* Code Editor Button Shimmer Effect */
.code-editor-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 204, 0.2), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.code-editor-btn:hover::before {
    left: 100%;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    #esc-menu {
        flex-direction: column;
    }
    
    #esc-menu .esc-tabs {
        width: 100%;
        height: auto;
        max-height: 200px;
        margin-top: 68px;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    #esc-menu .esc-tab {
        white-space: nowrap;
        margin-bottom: 0;
        margin-right: 0.5rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 6px 6px 0 0;
    }
    
    #esc-menu .esc-tab:hover,
    #esc-menu .esc-tab.active {
        transform: translateY(-2px);
        border-left: none;
        border-bottom-color: #00FFCC;
    }
    
    #esc-menu .esc-content {
        margin-top: 68px;
        height: calc(100% - 68px);
    }
}

/* ESC Menu Content Styling */
#esc-menu .esc-content h3 {
    color: #00FFCC;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

#esc-menu .esc-content p {
    color: #FFFFFF;
    font-family: 'Exo', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1rem;
}

#esc-menu .esc-content button {
    background: transparent;
    border: none;
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.25rem;
    transition: all 0.2s ease;
}

#esc-menu .esc-content button:hover {
    background: rgba(255, 255, 255, 0.1);
}

#esc-menu .esc-content input,
#esc-menu .esc-content select {
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #FFFFFF;
    font-family: 'Exo', sans-serif;
    font-size: 14px;
    padding: 0.5rem;
    margin: 0.25rem 0;
    /* Optimized transitions for better performance */
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* GPU acceleration for smooth animations */
    will-change: border-color, box-shadow;
    /* Prevent layout thrashing */
    contain: layout style;
}

#esc-menu .esc-content input:focus,
#esc-menu .esc-content select:focus {
    outline: none;
    border-color: #00FFCC;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}

/* Create tab – section headings and message */
#create-section h3 {
    font-size: 14px;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Create tab – internal sub-navigation */
#create-subnav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.create-subnav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.create-subnav-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.create-subnav-btn.active {
    color: #00ffc8;
    border-bottom: 2px solid #00ffc8;
}

/* World tab – internal sub-navigation */
#world-subnav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.world-subnav-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.world-subnav-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.world-subnav-btn.active {
    color: #00ffc8;
    border-bottom: 2px solid #00ffc8;
}

/* System tab – header row (title + nav on one line) */
.system-header {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 1rem;
}

.system-title {
    color: #00FFCC;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    font-family: 'Orbitron', monospace;
}

.system-nav {
    display: flex;
    gap: 28px;
}

/* Shared tab header layout (SOCIAL, WORLD, CREATE) */
.tab-header {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 1rem;
}

.tab-title {
    color: #00FFCC;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    font-family: 'Orbitron', monospace;
}

.tab-nav {
    display: flex;
    gap: 28px;
}

/* Subtle dividers between nav buttons (SYSTEM, SOCIAL, WORLD, CREATE) */
.system-nav button,
.tab-nav button {
    position: relative;
    padding: 0 18px;
}

.system-nav button:not(:last-child)::after,
.tab-nav button:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(180, 180, 180, 0.18);
}

/* WORLD → MAP: split-pane layout (fills .esc-content, no outer scroll) */
#world-section {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

#world-view-map {
    flex: 1;
    min-height: 0;
    display: flex;
}

#world-view-map > div {
    display: flex;
    flex: 1;
    min-height: 0;
    margin: 0;
    padding: 0;
}

#world-view-map > div > div:last-child {
    flex: 1;
    position: relative;
    min-height: 0;
}

#esc-menu #map-canvas-host {
    width: 100%;
    height: 100%;
}

/* WORLD → MAP: FILTER panel (compact vertical stack, only #filter-results scrolls) */
.filter-panel {
    display: flex;
    flex-direction: column;
    width: 300px;
    min-width: 300px;
    min-height: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #2E2E2E 0%, #2E2E2E 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
}

.filter-panel > * {
    margin-bottom: 16px;
}

.filter-panel > *:last-child {
    margin-bottom: 0;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-panel #filter-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: rgba(45, 45, 45, 0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#world-view-discover {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* World tab – Discover view */
.discover-section h4 {
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.discover-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.discover-tag-btn {
    background: rgba(0, 255, 200, 0.1);
    border: 1px solid rgba(0, 255, 200, 0.3);
    color: #00ffc8;
    padding: 4px 10px;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.discover-tag-btn:hover {
    background: rgba(0, 255, 200, 0.2);
}

.discover-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.discover-card-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.discover-card-description {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.discover-card-meta {
    font-size: 11px;
    opacity: 0.6;
    margin-bottom: 10px;
}

.discover-card-actions {
    margin-top: auto;
}

.create-message {
    margin-top: 10px;
    color: #ff6b6b;
    font-size: 13px;
}

.create-success {
    padding: 15px;
    border: 1px solid rgba(0, 255, 200, 0.3);
    border-radius: 6px;
}

#create-metadata-panel label {
    display: block;
    margin-bottom: 0.25rem;
}

#create-metadata-panel input,
#create-metadata-panel select,
#create-metadata-panel textarea {
    width: 100%;
    margin-bottom: 1rem;
}

#create-metadata-panel textarea {
    min-height: 80px;
    resize: vertical;
}

/* Create tab – primary/secondary buttons (theme-consistent) */
#esc-menu .esc-primary-btn {
    background: rgba(0, 255, 204, 0.1);
    color: #00FFCC;
    border: 2px solid #00FFCC;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

#esc-menu .esc-primary-btn:hover:not(:disabled) {
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
}

#esc-menu .esc-secondary-btn {
    background: rgba(45, 45, 45, 0.8);
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

#esc-menu .esc-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* My Spheres cards (Create tab Phase 2) */
.my-sphere-card {
    border: 1px solid rgba(0, 255, 200, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.my-sphere-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.my-sphere-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
}

.my-sphere-badge.public {
    background: rgba(0, 255, 200, 0.2);
}

.my-sphere-badge.private {
    background: rgba(255, 100, 100, 0.2);
}

.my-sphere-description {
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.my-sphere-meta {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.7;
}

.my-sphere-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.my-sphere-confirm-label {
    font-size: 12px;
    margin-right: 8px;
}

/* ESC Menu Status Messages */
#esc-menu .esc-status {
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    font-family: 'Exo', sans-serif;
    font-size: 12px;
    font-weight: 600;
}

#esc-menu .esc-status.success {
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid #00FFCC;
    color: #00FFCC;
}

#esc-menu .esc-status.error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #FF6B6B;
    color: #FF6B6B;
}

#esc-menu .esc-status.info {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00FFFF;
    color: #00FFFF;
}

/* Avatar / name tag – glass pill (user and sphere hover) */
#user-name-tag,
#sphere-name-tag {
    background: rgba(10, 18, 30, 0.65);
    backdrop-filter: blur(6px);
    border-radius: 999px;
    border: 1px solid rgba(80, 220, 255, 0.35);
    box-shadow:
        0 0 8px rgba(80, 220, 255, 0.25),
        inset 0 0 6px rgba(80, 220, 255, 0.15);
    font-size: 12px;
    letter-spacing: 0.5px;
    font-weight: 500;
    color: rgba(220, 245, 255, 0.95);
    padding: 4px 12px;
}
#user-name-tag {
    transform: translateY(-4px);
}

/* Sphere Settings Input Hover Effects */
#sphere-name-edit:hover,
#sphere-description-edit:hover,
#sphere-tags-edit:hover,
#sphere-max-users-edit:hover,
#sphere-invite-code:hover,
#add-user-input:hover,
#permission-level:hover {
    border-color: rgba(0, 255, 204, 0.6) !important;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

#sphere-name-edit:focus,
#sphere-description-edit:focus,
#sphere-tags-edit:focus,
#sphere-max-users-edit:focus,
#sphere-invite-code:focus,
#add-user-input:focus,
#permission-level:focus {
    border-color: #00FFCC !important;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
    outline: none;
    transition: all 0.3s ease;
}

/* Sphere Settings Button Hover Effects */
button[onclick="updateSphereSettings()"]:hover,
button[onclick="resetSphereSettings()"]:hover,
button[onclick="generateInviteCode()"]:hover,
button[onclick="addSphereUser()"]:hover,
button[onclick="kickSelectedUser()"]:hover,
button[onclick="blockSelectedUser()"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 204, 0.3);
    transition: all 0.3s ease;
}

button[onclick="updateSphereSettings()"]:hover {
    background: rgba(0, 255, 204, 0.2) !important;
}

button[onclick="resetSphereSettings()"]:hover {
    background: rgba(255, 193, 7, 0.2) !important;
}

button[onclick="generateInviteCode()"]:hover {
    background: rgba(0, 255, 255, 0.2) !important;
}

button[onclick="addSphereUser()"]:hover {
    background: rgba(0, 255, 204, 0.2) !important;
}

button[onclick="kickSelectedUser()"]:hover {
    background: rgba(255, 193, 7, 0.2) !important;
}

button[onclick="blockSelectedUser()"]:hover {
    background: rgba(255, 107, 107, 0.2) !important;
}

/* Login Status Messages */
#login-message { 
    margin-top: 8px; 
    font-size: 12px; 
    color: #cfd6dc; 
    min-height: 1em; 
}

#login-message[data-type="ok"]   { color: #39f6d6; }
#login-message[data-type="warn"] { color: #ffcf6e; }
#login-message[data-type="error"]{ color: #ff7a7a; }

.login-btn.is-loading { 
    opacity: .6; 
    pointer-events: none; 
}

/* ===== Volosphere Settings Layout ===== */
:root{
  --vs-bg:#0d1315;
  --vs-panel:#2E2E2E;
  --vs-edge:rgba(140,255,230,.18);
  --vs-edge-2:rgba(140,255,230,.10);
  --vs-text:#cfe9e6;
  --vs-title:#9efbe7;
  --vs-focus:rgba(140,255,230,.35);
  --vs-warn:#ffc451;
  --vs-rad:12px;
  --vs-line:1px;
  --vs-gap:14px;
}

#sphere-settings.vs-settings{
  width:100%;
  margin:0; padding:0 18px 22px; /* slight interior padding to avoid modal edges */
  display:flex; flex-direction:column; gap:18px;
}

/* Header */
.vs-head{
  display:flex; justify-content:space-between; align-items:center; padding:8px 0 0;
  border-bottom:var(--vs-line) solid var(--vs-edge-2);
}
.vs-head h2{
  margin:0; color:var(--vs-title); letter-spacing:.1em; font-weight:800; text-transform:uppercase;
}
.vs-sub{ margin:6px 0 14px; color:#9db; font-size:13px; }
.vs-header-btn{
  height:36px; padding:0 16px; font-size:12px;
}

/* Card sections */
.vs-card{
  background:var(--vs-panel);
  border:var(--vs-line) solid var(--vs-edge);
  border-radius:var(--vs-rad);
  padding:16px;
}
.vs-section{
  margin:0 0 10px; color:var(--vs-title); font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  border-bottom:var(--vs-line) solid var(--vs-edge-2);
  padding-bottom:8px;
}

/* Grid (2 columns on wide, 1 column on small) */
.vs-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: var(--vs-gap) var(--vs-gap);
}
.vs-col-2{ grid-column: 1 / -1; }
@media (max-width: 1024px){
  .vs-grid{ grid-template-columns: 1fr; }
}

/* Fields */
.vs-field{ display:flex; flex-direction:column; gap:6px; }
.vs-field > span{ color:#aee; font-size:12px; letter-spacing:.06em; text-transform:uppercase; }
.vs-field input[type="text"],
.vs-field textarea,
.vs-field select{
  background: transparent;
  color: var(--vs-text);
  border: var(--vs-line) solid var(--vs-edge);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.vs-field textarea{ resize: vertical; }
.vs-field select{ appearance: none; background-image: none; }

/* Inline input + button */
.vs-inline{ display:grid; grid-template-columns: 1fr auto; gap:10px; }

/* Checkboxes */
.vs-check{ display:flex; align-items:center; gap:10px; }
.vs-check input[type="checkbox"]{
  appearance:none; width:18px; height:18px; border-radius:4px;
  border:var(--vs-line) solid var(--vs-edge); background:transparent; position:relative;
}
.vs-check input[type="checkbox"]:checked{
  border-color:var(--vs-focus); box-shadow:0 0 0 2px rgba(140,255,230,.12) inset;
}
.vs-check input[type="checkbox"]:checked::after{
  content:''; position:absolute; inset:3px; border-radius:2px; background:var(--vs-focus);
}
.vs-check span{ color:var(--vs-text); }

/* Focus states */
.vs-field input:focus,
.vs-field textarea:focus,
.vs-field select:focus{
  border-color: var(--vs-focus);
  box-shadow: 0 0 0 3px rgba(140,255,230,.08);
}

.vs-btn{
  height:42px; border-radius:12px; font-weight:800; letter-spacing:.08em;
  border:var(--vs-line) solid var(--vs-edge); background:transparent; color:#bff;
}
.vs-btn:hover{ background:rgba(140,255,230,.08); }
.vs-btn.primary{
  border-color: var(--vs-focus);
  background: linear-gradient(180deg, rgba(140,255,230,.18), rgba(140,255,230,.08));
}
.vs-btn.warn{
  border-color: rgba(255,196,81,.45);
  background: linear-gradient(180deg, rgba(255,196,81,.20), rgba(255,196,81,.08));
  color: #fff3d3;
}
.vs-btn.ghost{
  border-color: var(--vs-edge);
}

/* Remove emoji remnants that might be in headings or buttons */
.vs-settings :is(h2,h3,button,label,span)::before{
  content: none !important;
}

/* === Settings Tab Theme (reusing Sphere Settings) === */
#settings-root.vs-settings{
  width:100%; margin:0; padding:0 18px 22px;
  display:flex; flex-direction:column; gap:18px;
}

/* Header, cards, sections, grid – identical to Sphere Settings */
.vs-head{ display:flex; justify-content:space-between; align-items:center; padding:8px 0 0; border-bottom:var(--vs-line) solid var(--vs-edge-2); }
.vs-head h2{ margin:0; color:var(--vs-title); letter-spacing:.1em; font-weight:800; text-transform:uppercase; }
.vs-sub{ margin:6px 0 14px; color:#9db; font-size:13px; }
.vs-header-actions{ display:flex; gap:10px; align-items:center; }

.vs-card{ background:var(--vs-panel); border:none; border-radius:var(--vs-rad); padding:16px; }
.vs-section{ margin:0 0 10px; color:var(--vs-title); font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  border-bottom:var(--vs-line) solid var(--vs-edge-2); padding-bottom:8px; }

.vs-grid{ display:grid; grid-template-columns: repeat(2, minmax(280px,1fr)); gap:var(--vs-gap); }
.vs-col-2{ grid-column:1 / -1; }
@media (max-width:1024px){ .vs-grid{ grid-template-columns:1fr; } }

.vs-field{ display:flex; flex-direction:column; gap:6px; }
.vs-field > span{ color:#aee; font-size:12px; letter-spacing:.06em; text-transform:uppercase; }

.vs-field input[type="text"],
.vs-field textarea,
.vs-field select{
  background:transparent; color:var(--vs-text);
  border:var(--vs-line) solid var(--vs-edge);
  border-radius:10px; padding:10px 12px; outline:none;
  transition:border-color .15s, box-shadow .15s;
}
.vs-field textarea{ resize:vertical; }
.vs-field select{ appearance:none; background-image:none; }

.vs-check{ display:flex; align-items:center; gap:10px; }
.vs-check input[type="checkbox"]{
  appearance:none; width:18px; height:18px; border-radius:4px;
  border:var(--vs-line) solid var(--vs-edge); background:transparent; position:relative;
}
.vs-check input[type="checkbox"]:checked{
  border-color:var(--vs-focus); box-shadow:0 0 0 2px rgba(140,255,230,.12) inset;
}
.vs-check input[type="checkbox"]:checked::after{
  content:''; position:absolute; inset:3px; border-radius:2px; background:var(--vs-focus);
}
.vs-check span{ color:var(--vs-text); }

.vs-field input:focus,
.vs-field textarea:focus,
.vs-field select:focus{
  border-color:var(--vs-focus);
  box-shadow:0 0 0 3px rgba(140,255,230,.08);
}

/* ============================================================================
 * SPHERE ORB STYLES
 * FIX: Moved inline styles to CSS classes for consistency
 * Note: Three.js mesh materials are still defined in code (voloscape.js),
 * but any DOM elements related to spheres should use these classes
 * ============================================================================ */

.sphere-orb {
    /* Base sphere orb container styles */
    position: relative;
    display: inline-block;
}

.sphere-orb-container {
    /* Container for sphere orb UI elements */
    background: rgba(173, 216, 230, 0.1);
    border: 1px solid rgba(173, 216, 230, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    color: #add8e6;
    font-family: 'Orbitron', monospace;
    font-size: 12px;
}

.sphere-orb-glow {
    /* Emissive glow effect (applied via Three.js material, but CSS for UI feedback) */
    box-shadow: 0 0 10px rgba(173, 216, 230, 0.5),
                0 0 20px rgba(173, 216, 230, 0.3),
                0 0 30px rgba(173, 216, 230, 0.1);
}

.sphere-orb-hover {
    /* Hover state for sphere orb UI elements */
    background: rgba(173, 216, 230, 0.2);
    border-color: rgba(173, 216, 230, 0.5);
    transform: scale(1.05);
    transition: all 0.3s ease;
}

/* Hints / helper text */
.vs-hint{ margin:-2px 0 10px; font-size:12px; color:#9db; }

/* Inline input + affix (range + label) */
.vs-inline{ display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
.vs-meter{ color:#aee; font-weight:700; }

/* Range slider theming */
input[type="range"]{
  -webkit-appearance:none; appearance:none; height:4px; background:var(--vs-edge-2);
  border-radius:999px; outline:none;
}
input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none; width:16px; height:16px; border-radius:50%;
  background:var(--vs-focus); border:1px solid var(--vs-edge);
  box-shadow:0 0 12px rgba(140,255,230,.35);
}
input[type="range"]::-moz-range-thumb{
  width:16px; height:16px; border-radius:50%; background:var(--vs-focus); border:1px solid var(--vs-edge);
  box-shadow:0 0 12px rgba(140,255,230,.35);
}

/* Remove any emoji/legacy icon pseudo-content in Settings */
#settings-root :is(h2,h3,label,button,span)::before{ content:none !important; }

/* Micro-interactions */
.vs-btn.saved{ 
  box-shadow: 0 0 0 3px rgba(140,255,230,.15); 
}

/* Moderation list */
.vs-list{
  border: var(--vs-line) solid var(--vs-edge);
  border-radius: 10px;
  background: rgba(46,46,46,.6);
  padding: 8px;
  max-height: 360px; overflow: auto;
}
.vs-user{
  display: grid;
  grid-template-columns: 1fr 160px auto;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: var(--vs-line) solid var(--vs-edge-2);
}
.vs-user:last-child{ border-bottom: none; }
.vs-user .name{ color: var(--vs-text); }
.vs-user .role{ min-width: 140px; }
.vs-user .role select{
  width:100%; background:transparent; color:var(--vs-text);
  border: var(--vs-line) solid var(--vs-edge); border-radius:8px; padding:6px 8px;
}
.vs-user .actions .vs-btn{ height:30px; padding:0 10px; }

/* Boot overlay – dark slate background, no green tint; neon text and loader unchanged */
#boot-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.03), transparent 70%),
        #1a1d20;
}

.boot-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.boot-particles::before,
.boot-particles::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.04), transparent 50%);
    filter: blur(60px);
    animation: floatParticles 12s ease-in-out infinite alternate;
}

@keyframes floatParticles {
    from { transform: translateY(-10px); }
    to   { transform: translateY(10px); }
}

.boot-card {
    position: relative;
    min-width: 520px;
    padding: 40px 60px;
    border-radius: 16px;
    background: rgba(40, 40, 40, 0.75);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,255,200,0.15);
    box-shadow:
        0 0 40px rgba(0,255,200,0.08),
        0 20px 60px rgba(0,0,0,0.4);
    text-align: center;
}

.boot-title {
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 500;
    color: #8fffe0;
    text-shadow: 0 0 10px rgba(0,255,200,0.35);
    margin-bottom: 18px;
}

.boot-loader {
    width: 100%;
    max-width: 420px;
    height: 3px;
    margin: 0 auto;
    background: rgba(0,255,200,0.08);
    border-radius: 4px;
    overflow: hidden;
}

.boot-loader-bar {
    height: 100%;
    width: 35%;
    background: linear-gradient(
        90deg,
        rgba(0,255,200,0.12),
        rgba(0,255,200,0.35),
        rgba(0,255,200,0.12)
    );
    border-radius: 4px;
    animation: bootLoaderMove 1.8s ease-in-out infinite;
}

@keyframes bootLoaderMove {
    0%   { transform: translateX(-100%); }
    50%  { transform: translateX(80%); }
    100% { transform: translateX(200%); }
}

#boot-overlay.fade-out {
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

#social-subnav {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-subnav-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.social-subnav-btn.active {
    color: #00ffc8;
    border-bottom: 2px solid #00ffc8;
}

.subnav-badge {
    background: #ff3b3b;
    color: white;
    font-size: 10px;
    border-radius: 10px;
    padding: 2px 6px;
    margin-left: 6px;
    display: none;
}

#friends-subnav {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.friends-subnav-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.friends-subnav-btn.active {
    color: #00ffc8;
    border-bottom: 2px solid #00ffc8;
}

#esc-notification-bell {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

#esc-notification-count {
    background: #00ffc8;
    color: #000;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.friend-online-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #555;
    margin-right: 6px;
}

.friend-online-indicator.online {
    background: #00ffc8;
}