/*TODO ESTO ES LO QUE ESTA EN EL SHADER.HTML*/
body {
    overflow-y: hidden;
}

/* Estilos para el editor de shaders */
.container {
    display: flex;
    justify-content: space-between;
    width: 95%;
    max-width: 1600px;
    height: 80vh;
}

#editor-section {
    width: 50%;
    min-width: 0;
    margin: 5px;
}

#canvas-container {
    width: 50%;
    min-width: 0;
    margin: 5px;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    touch-action: none; /* Prevent zoom/scroll on mobile */
}

#glsl-canvas {
    touch-action: none;
}

.shader-save-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.shader-input {
    background-color: rgba(138, 43, 226, 0.2);
    border: 1px solid var(--button-bg);
    color: var(--text-color);
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    transition: border-color 0.3s ease;
    width: 150px;
}

.shader-input:focus {
    outline: none;
    border-color: var(--hover-color);
}

.shader-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.shader-button {
    background-color: var(--button-bg);
    border: none;
    color: var(--text-color);
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.shader-button:hover {
    background-color: var(--hover-color);
    transform: scale(1.05);
}

/* Ajustes para modo móvil */
@media (max-width: 768px) {
    .shader-save-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .shader-input {
        width: 120px;
    }
}

#uniform-sliders {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    margin-top: 20px;
    max-height: 70vh;
}

#uniform-sliders label {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 5px;
}

/* Estilos unificados para los sliders en todos los modos */
html #uniform-sliders,
html #uniform-sliders-fullscreen,
html body[data-mode="mobile"] #uniform-sliders,
html body[data-mode="fullscreen"] #uniform-sliders {
    background: transparent;
    border: none;
    padding: 15px;
    margin-top: 20px;
    max-height: 78vh;
}

/* Solo aplicar scroll al contenedor en modo mobile y fullscreen */
html body[data-mode="mobile"] #uniform-sliders,
html body[data-mode="fullscreen"] #uniform-sliders,
html #uniform-sliders-fullscreen {
    overflow-y: auto;
    overflow-x: hidden;
}

/* En modo común, el scroll viene del body */
html:not([data-mode]) #uniform-sliders,
html body:not([data-mode]) #uniform-sliders {
    overflow: visible;
}

/* Estilos para la barra de scroll - usando las variables globales */
html body[data-mode="mobile"] #uniform-sliders::-webkit-scrollbar,
html body[data-mode="fullscreen"] #uniform-sliders::-webkit-scrollbar,
html #uniform-sliders-fullscreen::-webkit-scrollbar {
    width: 10px;
}

html body[data-mode="mobile"] #uniform-sliders::-webkit-scrollbar-track,
html body[data-mode="fullscreen"] #uniform-sliders::-webkit-scrollbar-track,
html #uniform-sliders-fullscreen::-webkit-scrollbar-track {
    background: var(--background-color);
}

html body[data-mode="mobile"] #uniform-sliders::-webkit-scrollbar-thumb,
html body[data-mode="fullscreen"] #uniform-sliders::-webkit-scrollbar-thumb,
html #uniform-sliders-fullscreen::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

html body[data-mode="mobile"] #uniform-sliders::-webkit-scrollbar-thumb:hover,
html body[data-mode="fullscreen"] #uniform-sliders::-webkit-scrollbar-thumb:hover,
html #uniform-sliders-fullscreen::-webkit-scrollbar-thumb:hover {
    background: var(--hover-color);
}

/* Ajustes específicos para modo mobile */
body[data-mode="mobile"] #uniform-sliders {
    max-height: 60vh;
    padding-right: 15px;
}

/* Estilos para los wrappers de sliders */
html #uniform-sliders>div,
html #uniform-sliders-fullscreen>div,
html body[data-mode="mobile"] #uniform-sliders>div,
html body[data-mode="fullscreen"] #uniform-sliders>div {
    margin-bottom: 10px;
}

/* Estilos para las etiquetas de los sliders */
html #uniform-sliders label,
html #uniform-sliders-fullscreen label,
html body[data-mode="mobile"] #uniform-sliders label,
html body[data-mode="fullscreen"] #uniform-sliders label {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 5px;
    display: block;
}

/* Estilos para los inputs range */
html #uniform-sliders input[type="range"],
html #uniform-sliders-fullscreen input[type="range"],
html body[data-mode="mobile"] #uniform-sliders input[type="range"],
html body[data-mode="fullscreen"] #uniform-sliders input[type="range"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 6px !important;
    background: var(--border-color) !important;
    outline: none !important;
    margin: 10px 0 !important;
    border-radius: 3px !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
}

/* Estilos para el thumb de los sliders */
html #uniform-sliders input[type="range"]::-webkit-slider-thumb,
html #uniform-sliders-fullscreen input[type="range"]::-webkit-slider-thumb,
html body[data-mode="mobile"] #uniform-sliders input[type="range"]::-webkit-slider-thumb,
html body[data-mode="fullscreen"] #uniform-sliders input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: var(--button-bg) !important;
    cursor: pointer !important;
    border: none !important;
    margin-top: -3px !important;
}

html #uniform-sliders input[type="range"]::-moz-range-thumb,
html #uniform-sliders-fullscreen input[type="range"]::-moz-range-thumb,
html body[data-mode="mobile"] #uniform-sliders input[type="range"]::-moz-range-thumb,
html body[data-mode="fullscreen"] #uniform-sliders input[type="range"]::-moz-range-thumb {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: var(--button-bg) !important;
    cursor: pointer !important;
    border: none !important;
    margin-top: -3px !important;
}

/* Estilos para el track de los sliders */
html #uniform-sliders input[type="range"]::-webkit-slider-runnable-track,
html #uniform-sliders-fullscreen input[type="range"]::-webkit-slider-runnable-track,
html body[data-mode="mobile"] #uniform-sliders input[type="range"]::-webkit-slider-runnable-track,
html body[data-mode="fullscreen"] #uniform-sliders input[type="range"]::-webkit-slider-runnable-track {
    background: var(--border-color) !important;
    height: 6px !important;
    border-radius: 3px !important;
    border: none !important;
}

html #uniform-sliders input[type="range"]::-moz-range-track,
html #uniform-sliders-fullscreen input[type="range"]::-moz-range-track,
html body[data-mode="mobile"] #uniform-sliders input[type="range"]::-moz-range-track,
html body[data-mode="fullscreen"] #uniform-sliders input[type="range"]::-moz-range-track {
    background: var(--border-color) !important;
    height: 6px !important;
    border-radius: 3px !important;
    border: none !important;
}

.view-toggle,
.view-toggle-fullscreen {
    display: flex;
    gap: 6px;
    margin: 10px;
    background: rgba(0, 0, 0, 0.65) !important;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: fit-content;
    z-index: 1005;
    /* Asegurar que esté por encima de todo */
    align-self: center;
}

#fullscreen-editor-container {
    background: rgba(0, 0, 0, 0.65) !important;
    position: relative;
    display: flex;
    flex-direction: column;
}

.editor-resizer {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    z-index: 1006;
    background: transparent;
    transition: background 0.2s;
}

.editor-resizer:hover {
    background: rgba(255, 255, 255, 0.1);
}

.editor-resizer::after {
    content: '';
    position: absolute;
    left: 4px;
    height: 30px;
    width: 2px;
    background: rgba(255, 255, 255, 0.2);
    top: 50%;
    transform: translateY(-50%);
    border-radius: 1px;
}

/* Fix for overlapping gutters */
.CodeMirror-gutters {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

#fullscreen-editor .CodeMirror {
    background: transparent !important;
}

#fullscreen-editor .CodeMirror-scroll {
    background: transparent !important;
}

#fullscreen-passes-tab-bar {
    margin: 0 10px 10px 10px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 1004;
}

/* Toolbar hide logic */
#fullscreen-editor-container:has(.view-toggle-fullscreen.in-header) .view-toggle-fullscreen:not(.in-header) {
    display: none !important;
}

.font-size-controls {
    display: flex;
    gap: 4px;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.font-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.font-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.font-btn.active {
    background: var(--primary-color, #ff69b4);
    color: #fff;
    border-color: var(--primary-color, #ff69b4);
}

/* When in header, adjust font controls */
.global-header .font-size-controls {
    border-left-color: rgba(255, 255, 255, 0.2);
}

.view-btn {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.view-btn:hover {
    background-color: var(--hover-color);
}

.view-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

#editor-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#ui-container {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

/* Estilos para modo mobile */
body[data-mode="mobile"] {
    padding: 0 !important;
    padding-top: 0 !important;
    margin: 0;
    overflow: hidden;
    background: #000;
    width: 100vw;
    height: 100vh;
}

/* Mostrar header global en mobile pero con transparencia */
body[data-mode="mobile"] .global-header {
    background: rgba(18, 18, 18, 0.6) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body[data-mode="mobile"] .container {
    width: 100vw;
    height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
}

body[data-mode="mobile"] #canvas-container {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    left: 0;
}

body[data-mode="mobile"] #glsl-canvas {
    width: 100%;
    height: 100%;
    margin: 0;
    border: none;
}

body[data-mode="mobile"] #editor-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: none;
    padding-top: 0;
    z-index: 1000;
    box-sizing: border-box;
}

body[data-mode="mobile"] #editor-section.visible {
    display: block;
}

body[data-mode="mobile"] #editor-container,
body[data-mode="mobile"] #ui-container,
body[data-mode="mobile"] #globals-container,
body[data-mode="mobile"] #passes-container,
body[data-mode="mobile"] #connect-container {
    width: 100%;
    height: calc(100vh - 50px);
    padding: 135px 12px 100px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Estilos para la barra de scroll del editor en mobile */
body[data-mode="mobile"] #editor-container::-webkit-scrollbar {
    width: 8px;
}

body[data-mode="mobile"] #editor-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

body[data-mode="mobile"] #editor-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

body[data-mode="mobile"] #editor-container::-webkit-scrollbar-thumb:hover {
    background: var(--hover-color);
}

/* Asegurar que CodeMirror se ajuste al contenedor en mobile */
body[data-mode="mobile"] .CodeMirror {
    height: auto !important;
    min-height: calc(100vh - 250px);
}

/* Controles en mobile */
body[data-mode="mobile"] #open-editor,
body[data-mode="mobile"] #toggle-editor {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1005;
    background: rgba(138, 43, 226, 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(138, 43, 226, 0.4);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    text-align: center;
}

body[data-mode="mobile"] #shader-controls {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    z-index: 999;
}

/* Ocultar botones de fullscreen en mobile */
body[data-mode="mobile"] #fullscreen-button,
body[data-mode="mobile"] #super-fullscreen-button,
body[data-mode="mobile"] #super-fullscreen-with-code-button {
    display: none !important;
}

/* Ocultar auth container standalone en mobile (ya no hay header) */
body[data-mode="mobile"] #auth-container {
    display: none !important;
}

body[data-mode="mobile"] .view-toggle {
    position: fixed;
    top: 80px;
    /* Debajo del header global de dos lineas en mobile */
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: 95%;
    max-width: 400px;
    z-index: 1003;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    background: rgba(10, 10, 10, 0.9);
    padding: 8px 6px;
    border-radius: 8px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    justify-content: center;
    border: 1px solid rgba(138, 43, 226, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body[data-mode="mobile"] .view-toggle .view-btn {
    padding: 8px 10px;
    font-size: 12px;
    min-width: 50px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1;
}

body[data-mode="mobile"] .view-toggle .view-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

/* Error panel en mobile */
body[data-mode="mobile"] .error-panel {
    position: fixed;
    bottom: 0px;
    left: 0px;
    right: 0px;
    z-index: 1002;
    margin: 0;
    max-height: 35vh;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.5);
    display: none;
    /* Default hidden */
    flex-direction: column;
}

body[data-mode="mobile"] .error-panel.visible {
    display: flex;
}

body[data-mode="mobile"] .error-panel.collapsed {
    max-height: 40px;
}

body[data-mode="mobile"] .error-panel.collapsed .error-list {
    display: none !important;
}

body[data-mode="mobile"] .error-panel .error-list {
    position: relative;
    max-height: none;
    flex-grow: 1;
    overflow-y: auto;
    background: rgba(180, 0, 0, 0.95);
    color: white;
    padding: 10px;
    padding-bottom: 70px;
    /* Padding for the close editor toggle button */
    font-size: 11px;
    margin: 0;
    list-style: none;
}

/* Mejorar tamaño de fuente en CodeMirror mobile y darle transparencia */
body[data-mode="mobile"] .CodeMirror {
    font-size: 14px;
    background: rgba(39, 40, 34, 0.6) !important;
    border-radius: 6px;
}

body[data-mode="mobile"] .CodeMirror-gutters {
    /* Transparent background as it scrolls with code */
    background: transparent !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: absolute !important;
    left: auto !important;
    z-index: 10 !important;
}

body[data-mode="mobile"] .CodeMirror-linenumber {
    font-size: 11px;
    padding: 0 5px;
    color: #888 !important;
}

/* Sliders más grandes en mobile para dedos */
body[data-mode="mobile"] .uniform-slider-row {
    margin-bottom: 25px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

body[data-mode="mobile"] .uniform-slider-row input[type="range"] {
    height: 40px;
    /* Track más alto para tocar mejor */
}

body[data-mode="mobile"] .uniform-name-label {
    font-size: 16px;
    font-weight: bold;
}

/* Tabs de pases más amigables en mobile */
body[data-mode="mobile"] .passes-tab-bar {
    display: flex;
    overflow-x: auto;
    padding: 4px 5px;
    gap: 7px;
    scrollbar-width: none;
    background: rgba(17, 17, 17, 0.85);
    border-radius: 6px;
    flex-wrap: nowrap;
    /* margin-bottom: 39px; */
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 39px;
}

body[data-mode="mobile"] .passes-tab-bar::-webkit-scrollbar {
    display: none;
}

body[data-mode="mobile"] .pass-tab {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
    min-width: 80px;
    justify-content: center;
    border-radius: 6px;
}

body[data-mode="mobile"] .add-pass-btn {
    min-width: 40px;
    height: 40px;
    font-size: 20px;
    border-radius: 6px;
}

/* Canales y ruteo en mobile */
body[data-mode="mobile"] .pass-routing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

body[data-mode="mobile"] .pass-routing-slot {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 6px;
}

body[data-mode="mobile"] .pass-routing-slot label {
    font-size: 11px;
}

body[data-mode="mobile"] .pass-routing-slot select,
body[data-mode="mobile"] .channel-select-routing {
    width: 100%;
    height: 36px;
    font-size: 13px;
    margin-top: 4px;
    padding: 4px 8px;
}

body[data-mode="mobile"] .pass-routing-header {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

body[data-mode="mobile"] .pass-routing-del {
    padding: 8px 14px;
    text-align: center;
    font-size: 12px;
}

/* Passes container ajustes en mobile */
body[data-mode="mobile"] .passes-container {
    height: auto;
    border: none;
    background: transparent;
}

body[data-mode="mobile"] .passes-panel-header h3 {
    font-size: 18px;
}

body[data-mode="mobile"] .passes-panel-desc {
    font-size: 12px;
}

/* Globals container en mobile */
body[data-mode="mobile"] .globals-container {
    height: auto;
    border: none;
    background: transparent;
}

body[data-mode="mobile"] .globals-pre code {
    font-size: 11px;
    word-break: break-all;
    white-space: pre-wrap;
}

/* UI container en mobile */
body[data-mode="mobile"] #ui-container {
    border: none;
    background: transparent;
}

body[data-mode="mobile"] .shader-save-controls {
    flex-direction: column;
    gap: 8px;
}

body[data-mode="mobile"] .shader-save-controls .shader-input {
    width: 100%;
}

body[data-mode="mobile"] .shader-save-controls .shader-button {
    width: 100%;
    padding: 10px;
    font-size: 14px;
}

body[data-mode="mobile"] .export-dropdown {
    width: 100%;
}

body[data-mode="mobile"] .export-dropdown .shader-button {
    width: 100%;
}

/* Connect container en mobile */
body[data-mode="mobile"] #connect-container {
    border: none;
    background: transparent;
}

body[data-mode="mobile"] .comment-form {
    flex-direction: column;
}

body[data-mode="mobile"] .comment-form textarea {
    min-height: 60px;
}

body[data-mode="mobile"] .comment-form button {
    width: 100%;
    padding: 10px;
}


/* Estilos para modo fullscreen */
body[data-mode="fullscreen"] #fullscreen-container {
    display: flex;
}

/* Estilos para modo común */
body[data-mode="common"] .container {
    display: flex;
    flex-direction: row;
}

#editor-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Allow to grow and fill space */
    min-height: 0;
    /* Important for flex child with overflow */
    overflow-x: auto;
    overflow-y: hidden;
}

#glsl-editor {
    width: 100%;
    flex-grow: 1;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

#glsl-canvas {
    width: 100%;
    flex-grow: 1;
    margin-bottom: 10px;
}

#glsl-canvas {
    height: calc(100% - 40px);
    border: 1px solid #3c3c3c;
    border-radius: 4px;
}

#fullscreen-canvas {
    width: 100%;
    height: 100%;
}

#fullscreen-button,
#exit-fullscreen,
#toggle-editor,
#open-editor {
    background-color: var(--button-bg);
    border: none;
    color: var(--text-color);
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    margin: 2px 1px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#fullscreen-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
}

#toggle-editor,
#open-editor {
    position: fixed;
    bottom: 24px;
    left: 20px;
    z-index: 2000; /* Ensure it's above everything including fullscreen container */
}

#fullscreen-button:hover,
#exit-fullscreen:hover,
#toggle-editor:hover,
#open-editor:hover {
    background-color: var(--hover-color);
    transform: scale(1.05);
}

#fullscreen-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    z-index: 1000;
    overflow: hidden;
    flex-direction: row;
}

#glsl-canvas-fullscreen {
    width: 100%;
    height: 100%;
    touch-action: none;
}

#fullscreen-editor-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: rgba(18, 18, 18, 0.85);
    /* Slightly more opaque for better contrast */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow-y: hidden;
    /* Hide scroll on main container, let children scroll */
    overflow-x: hidden;
    z-index: 1001;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Estilos para la scrollbar del fullscreen-editor-container */
#fullscreen-editor-container::-webkit-scrollbar {
    width: 12px;
}

#fullscreen-editor-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

#fullscreen-editor-container::-webkit-scrollbar-thumb {
    background: rgba(138, 43, 226, 0.6);
    border-radius: 6px;
}

#fullscreen-editor-container::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 43, 226, 0.8);
}

#fullscreen-editor {
    flex-grow: 1;
    height: 0;
    /* Let flex handle height */
    font-size: var(--fullscreen-font-size);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* CM handles its own scroll */
}

#fullscreen-error-panel {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    max-width: 100%;
    z-index: 1002;
    margin: 0;
    border-radius: 0;
    border-top: 1px solid #ff4444;
}

#fullscreen-error-panel.error-panel {
    background: rgba(40, 0, 0, 0.9);
}

#fullscreen-error-panel.error-panel {
    background: rgba(40, 0, 0, 0.95);
    border-top: 1px solid #ff4444;
    border-radius: 0;
    margin: 0;
    max-height: 200px;
}

#ui-container-fullscreen,
#passes-container-fullscreen,
#globals-container-fullscreen,
#connect-container-fullscreen {
    flex: 1;
    overflow-y: auto;
    background: transparent;
    border: none;
    padding: 10px 20px;
    display: none;
    /* Controlled by script.js */
    height: auto !important;
    /* Override fixed heights */
}

.error-panel {
    background: rgba(30, 0, 0, 0.95);
    border: 1px solid #ff4444;
    border-radius: 6px;
    margin: 10px 0;
    display: none;
    flex-direction: column;
    max-height: 250px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
}

.error-panel.visible {
    display: flex;
}

.error-panel.collapsed {
    max-height: 40px;
}

.error-panel.collapsed .error-list {
    display: none !important;
}

.error-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(100, 0, 0, 0.4);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 68, 68, 0.2);
    user-select: none;
}

.error-header:hover {
    background: rgba(120, 0, 0, 0.5);
}

.error-title {
    color: #ff6666;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-count {
    background: #ff4444;
    color: white;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.error-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-weight: 600;
}

.error-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.error-toggle-btn {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.4);
    color: #ff8888;
    padding: 2px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.error-toggle-btn:hover {
    background: rgba(255, 68, 68, 0.2);
    color: #ffffff;
}

.error-list {
    margin: 0;
    padding: 12px;
    list-style: none;
    color: #ffcccc;
    font-size: 12.5px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    overflow-y: auto;
    flex-grow: 1;
    line-height: 1.5;
}

.error-list li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    word-break: break-all;
}

.error-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.error-list li span.err-prefix {
    color: #ff4444;
    font-weight: bold;
    margin-right: 5px;
}

/* Custom scrollbar for error list */
.error-list::-webkit-scrollbar {
    width: 6px;
}

.error-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.error-list::-webkit-scrollbar-thumb {
    background: rgba(255, 68, 68, 0.3);
    border-radius: 3px;
}

.error-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 68, 68, 0.5);
}

#fullscreen-error-display {
    color: #ff4444;
    font-size: 13px;
}

#exit-fullscreen {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1002;
    display: block;
}

/* Estilos por defecto para toggle-editor y open-editor (modo común) */
body[data-mode="common"] #toggle-editor,
body[data-mode="common"] #open-editor {
    display: none !important;
}

body[data-mode="fullscreen"] #toggle-editor,
body[data-mode="fullscreen"] #open-editor {
    position: absolute;
    top: 10px;
    right: 70px;
    z-index: 1002;
}

#error-display {
    color: #ff4444;
    font-size: 13px;
}

.CodeMirror {
    flex: 1;
    border-radius: 5px;
    font-size: 14px;
}

#editor-container .CodeMirror {
    flex: 1;
}

/* Estilos para el cursor del editor */
.CodeMirror-cursor {
    border-left: 2px solid #00ff00 !important;
    border-right: none;
    width: 2px;
    height: 20px !important;
}

.CodeMirror .CodeMirror-cursors {
    z-index: 3;
}

/* Estilo para el cursor cuando el editor está enfocado */
.CodeMirror-focused .CodeMirror-cursor {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Estilos específicos para el editor en pantalla completa */
#fullscreen-editor .CodeMirror {
    background-color: rgba(0, 0, 0, 0.0) !important;
    font-size: var(--fullscreen-font-size) !important;
}

#fullscreen-editor .CodeMirror-gutters {
    background-color: transparent !important;
    background: transparent !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 1 !important;
}

#fullscreen-editor .CodeMirror-linenumber {
    color: #888 !important;
    background-color: transparent !important;
    background: transparent !important;
    padding-right: 12px !important;
}



#fullscreen-editor .CodeMirror-scroll {
    overflow-x: auto !important;
    overflow-y: auto !important;
}



@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .container {
        width: 100%;
        height: 100vh;
        flex-direction: column;
    }

    #editor-container,
    #canvas-container {
        width: 100%;
        height: 50%;
    }

    #glsl-canvas {
        height: calc(100% - 40px);
    }

    #fullscreen-button {
        position: fixed;
        bottom: 10px;
        right: 10px;
        z-index: 100;
    }

    #fullscreen-editor-container {
        width: 100%;
        height: 100vh;
    }

    #fullscreen-editor {
        font-size: 12px;
    }
}

#shader-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

#shader-controls-fullscreen {
    position: absolute;
    /* bottom: 10px; */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 1002;
    bottom: 2px;
    padding: 10px;
}

#shader-controls-ui,
#shader-controls-ui-fullscreen {
    padding: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
}

#shader-controls-ui select,
#shader-controls-ui-fullscreen select {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
}

#shader-controls-ui .shader-save-controls,
#shader-controls-ui-fullscreen .shader-save-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#shader-controls-ui .shader-input,
#shader-controls-ui-fullscreen .shader-input {
    flex: 1;
    padding: 8px;
    background: #333;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
}

#shader-controls-ui .shader-button,
#shader-controls-ui-fullscreen .shader-button {
    padding: 8px 15px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#shader-controls-ui .shader-button:hover,
#shader-controls-ui-fullscreen .shader-button:hover {
    background: #45a049;
}

#fetch-shaders-button,
#shader-dropdown,
#fetch-shaders-button-fullscreen,
#shader-dropdown-fullscreen {
    background-color: var(--button-bg);
    border: none;
    color: var(--text-color);
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#shader-dropdown,
#shader-dropdown-fullscreen {
    width: 200px;
}

#fetch-shaders-button:hover,
#shader-dropdown:hover,
#fetch-shaders-button-fullscreen:hover,
#shader-dropdown-fullscreen:hover {
    background-color: var(--hover-color);
    transform: scale(1.05);
}

/* Ajustes para modo móvil */
@media (max-width: 768px) {
    #shader-controls-fullscreen {
        /* bottom: 50px; */
        width: 100%;
        flex-wrap: wrap;
        background-color: black;
    }

    #shader-dropdown-fullscreen {
        width: 150px;
    }
}

/* Estilos para el modo super fullscreen */
body[data-mode="super-fullscreen"] {
    overflow: hidden;
}

body[data-mode="super-fullscreen"] #glsl-canvas {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
}

body[data-mode="super-fullscreen"] #editor-container,
body[data-mode="super-fullscreen"] #fullscreen-editor,
body[data-mode="super-fullscreen"] #error-display,
body[data-mode="super-fullscreen"] #fullscreen-error-display,
body[data-mode="super-fullscreen"] #shader-controls,
body[data-mode="super-fullscreen"] #toggle-editor,
body[data-mode="super-fullscreen"] #open-editor,
body[data-mode="super-fullscreen"] .login-container,
body[data-mode="super-fullscreen"] #ui-container {
    display: none !important;
}

/* Ocultar botones de fullscreen y perfil en modo super-fullscreen-with-code */
body[data-mode="super-fullscreen-with-code"] .fullscreen-button,
body[data-mode="super-fullscreen-with-code"] #profile-button,
body[data-mode="super-fullscreen-with-code"] .user-info {
    display: none !important;
}

/* Ocultar auth-container en modo super-fullscreen-with-code */
body[data-mode="super-fullscreen-with-code"] #auth-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(-20px);
}

/* Mostrar auth-container cuando UI está visible */
body[data-mode="super-fullscreen-with-code"] #auth-container.ui-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Estilos para el slider de tamaño de texto en modo superfullscreenwithcode */
#text-size-slider-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border-radius: 8px;
    backdrop-filter: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#text-size-slider-container.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
}

#text-size-slider-container label {
    color: #f8f8f2;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

#text-size-slider {
    width: 200px;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

#text-size-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #66d9ef;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(102, 217, 239, 0.5);
}

#text-size-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #66d9ef;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(102, 217, 239, 0.5);
}

#text-size-value {
    color: #66d9ef;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-left: 10px;
}

.super-fullscreen-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.super-fullscreen-button:hover {
    background: rgba(0, 0, 0, 0.7);
}

.super-fullscreen-button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

#super-fullscreen-button {
    right: 50px;
    /* Position it to the left of the regular fullscreen button */
}

[data-mode="super-fullscreen"] #canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

#editor-container {
    width: 100%;
}

#glsl-editor {
    width: 100%;
    height: 100%;
}

.CodeMirror {
    width: 100%;
    height: 100%;
}

/* ===== CONNECT (usuarios conectados) ===== */
#connect-container,
#connect-container-fullscreen {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    overflow-y: auto;
    flex: 1;
}

#connect-container h3,
#connect-container-fullscreen h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.connect-users-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.connect-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 30, 30, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.connect-user-item:hover {
    background: rgba(30, 30, 30, 0.95);
    transform: translateY(-1px);
}

.connect-user-name {
    color: var(--text-color);
    font-size: 13px;
    font-weight: 600;
}

.connect-user-id {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.35);
    border-radius: 4px;
    padding: 2px 6px;
}

.connect-user-item.self .connect-user-name {
    color: #66d9ef;
    /* resalta al usuario actual */
}

.connect-empty {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    padding: 8px 0;
}

/* ===== Comentarios en CONNECT ===== */
.comments-section {
    margin-top: 16px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.comments-section h3 {
    margin: 0 0 8px 0;
}

.comments-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(42, 42, 42, 0.8);
}

.comment-meta {
    display: flex;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.comment-text {
    color: var(--text-color);
    flex: 1;
    padding-right: 10px;
}

.comment-form {
    display: flex;
    gap: 8px;
}

.comment-form textarea {
    flex: 1;
    min-height: 48px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    padding: 8px;
    background: rgba(42, 42, 42, 0.8);
    color: var(--text-color);
}

.comment-form button {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: rgba(138, 43, 226, 0.6);
    color: #fff;
}

.comments-empty {
    padding: 8px 10px;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.05);
}

/* === MULTI-PASS SHADER SYSTEM STYLES === */

.passes-tab-bar {
    display: flex;
    gap: 2px;
    background: #1e1e1e;
    padding: 5px 5px 0 5px;
    border-bottom: 2px solid #333;
    margin-bottom: 5px;
}

.pass-tab {
    background: #2d2d2d;
    color: #888;
    border: none;
    padding: 8px 16px;
    font-size: 12px;
    cursor: pointer;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pass-tab:hover {
    background: #3d3d3d;
    color: #ccc;
}

.pass-tab.active {
    background: var(--primary-color, #8a2be2);
    color: white;
}

.add-pass-btn {
    background: transparent;
    color: #555;
    border: 1px dashed #555;
    width: 28px;
    height: 28px;
    margin-left: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: bold;
}

.add-pass-btn:hover {
    border-color: #888;
    color: #888;
}

.pass-connections-ui {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px;
    margin-top: 10px;
}

.pass-connections-ui h4 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.channel-slot {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.channel-slot label {
    font-size: 11px;
    color: #666;
}

.channel-select {
    background: #252525;
    color: #ddd;
    border: 1px solid #444;
    padding: 4px;
    font-size: 11px;
    border-radius: 3px;
    width: 100%;
}

.channel-select:focus {
    outline: none;
    border-color: var(--primary-color, #8a2be2);
}

.remove-pass-icon {
    font-weight: bold;
    font-style: normal;
    font-size: 14px;
    line-height: 1;
    opacity: 0.4;
    padding-left: 8px;
    transition: all 0.2s ease;
}

.remove-pass-icon:hover {
    opacity: 1;
    color: #ff4444;
}

.preview-pass-icon {
    font-style: normal;
    font-size: 14px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.preview-pass-icon.active {
    opacity: 1;
    filter: drop-shadow(0 0 5px var(--primary-color, #8a2be2));
}

/* Globals View Styles */
.globals-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.global-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.global-name {
    color: #03dac6;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    font-size: 1.1em;
}

.global-type {
    color: #ff79c6;
    font-family: 'Fira Code', monospace;
    font-size: 0.85em;
    opacity: 0.8;
}

.global-desc {
    color: #e0e0e0;
    font-size: 0.9em;
    margin-top: 5px;
    line-height: 1.4;
}

/* ===== PASSES ROUTING PANEL ===== */
.passes-container {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    overflow-y: auto;
    height: calc(100% - 60px);
}

.passes-panel-header h3 {
    margin: 0 0 4px 0;
    color: #bb86fc;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.passes-panel-desc {
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin: 0 0 10px 0;
}

.passes-routing-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.pass-routing-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 6px;
    padding: 12px;
}

.pass-routing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pass-routing-title {
    color: #bb86fc;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pass-routing-del {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.4);
    color: #ff6b6b;
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pass-routing-del:hover {
    background: rgba(255, 68, 68, 0.3);
}

.pass-routing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.pass-routing-slot {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pass-routing-slot label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.channel-select-routing {
    background: #1e1e1e;
    color: #ddd;
    border: 1px solid #444;
    padding: 5px 4px;
    font-size: 11px;
    border-radius: 3px;
    width: 100%;
    cursor: pointer;
}

.channel-select-routing:focus {
    outline: none;
    border-color: var(--primary-color, #8a2be2);
}

/* ===== GLOBALS CODE BLOCKS ===== */
.globals-container {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    overflow-y: auto;
    height: calc(100% - 60px);
}

.globals-header h3 {
    margin: 0 0 4px 0;
    color: #bb86fc;
    font-size: 14px;
}

.globals-subtitle {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    margin: 0 0 14px 0;
}

.globals-code-block {
    position: relative;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.globals-code-label {
    background: rgba(138, 43, 226, 0.2);
    color: #bb86fc;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 5px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.globals-copy-btn {
    position: absolute;
    top: 4px;
    right: 6px;
    background: rgba(138, 43, 226, 0.3);
    border: 1px solid rgba(138, 43, 226, 0.5);
    color: #ddd;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1;
}

.globals-copy-btn:hover {
    background: rgba(138, 43, 226, 0.55);
    color: #fff;
}

.globals-pre {
    margin: 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

.globals-pre code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 12px;
    color: #f8f8f2;
    line-height: 1.6;
    white-space: pre;
}

/* ===== UNIFORM SLIDERS WITH PASS TAGS ===== */
.uniform-slider-row {
    margin-bottom: 12px;
}

.uniform-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.uniform-name-label {
    color: var(--text-color);
    font-size: 13px;
}

.uniform-pass-tag {
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.4);
    color: #bb86fc;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}