/**
 * TextoFX — editor shell styles
 * @author SteveManchado
 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --bg-editor: #1e1e1e;
    --bg-preview: #0f172a;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0f172a;
    color: #f8fafc;
    margin: 0;
    min-height: 100dvh;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Escritorio: una sola pantalla sin scroll externo */
@media (min-width: 768px) {
    body {
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
}

.code-font {
    font-family: 'Fira Code', monospace;
}

textarea {
    background: var(--bg-editor);
    color: #d1d5db;
    resize: none;
    border: 1px solid #334155;
    transition: all 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.preview-container {
    background-color: var(--bg-preview);
    background-image: radial-gradient(#1e293b 1px, transparent 1px);
    background-size: 20px 20px;
}

#preview-frame {
    width: 100%;
    height: 100%;
    min-height: 240px;
    border: none;
    background: transparent;
}

@media (min-width: 768px) {
    #preview-frame {
        min-height: 0;
    }
}

/* Panel splitter (TextoFX) */
.app-main--split {
    --split-left-pct: 50%;
}

@media (min-width: 768px) {
    .app-main--split .app-panel--left {
        width: var(--split-left-pct, 50%);
        max-width: none;
        flex: 0 0 var(--split-left-pct, 50%);
    }

    .app-main--split .app-panel--right {
        flex: 1 1 0%;
        min-width: 0;
    }

    .app-splitter {
        display: flex;
        flex: 0 0 6px;
        width: 6px;
        cursor: col-resize;
        align-self: stretch;
        background: #1e293b;
        border-left: 1px solid #334155;
        border-right: 1px solid #334155;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .app-splitter:hover,
    .app-splitter:focus-visible {
        background: #334155;
    }

    .app-splitter.is-dragging {
        background: #475569;
    }
}

@media (max-width: 767px) {
    .app-splitter {
        display: none;
    }
}

body.app-splitter-active {
    cursor: col-resize;
    user-select: none;
}

.tab-btn {
    border-bottom: 2px solid transparent;
}
.tab-btn.active {
    border-bottom-color: #3b82f6;
    color: #3b82f6;
}

#creator-code textarea,
#creator-code input[type="text"] {
    font-size: 0.75rem;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e293b;
}
::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 100%;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background: none;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: 1px solid #334155;
    border-radius: 6px;
}

input.hex-input {
    min-width: 0;
    max-width: 7.5rem;
}

/* Logo V3D1 — tipografía integrada al bloque de marca */
.brand-v3d1-wordmark {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 0 24px rgba(56, 189, 248, 0.25);
}

.brand-v3d1-wordmark .brand-v3d1-core {
    background: linear-gradient(105deg, #22d3ee 0%, #38bdf8 35%, #818cf8 70%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-v3d1-wordmark .brand-v3d1-tld {
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Controles táctiles más cómodos en móvil */
@media (max-width: 767px) {
    #export-btn,
    #run-btn,
    #reset-btn {
        min-height: 44px;
        min-width: 44px;
    }

    input[type="range"] {
        min-height: 44px;
    }
}
