:root {
    /* Variables Base (Dimensiones, constantes) */
    --radius: 24px;

    /* DEGRADADO DE MI MARCA (Rosa a Cian) - Constante */
    --brand-gradient: linear-gradient(135deg, #ec4899 0%, #06b6d4 100%);
    --brand-glow: rgba(236, 72, 153, 0.3);

    --danger: #ef4444;
    --success: #22c55e;
    --danger: #ef4444;
    --success: #22c55e;

    /* Default Accent (To be overridden by JS) */
    --accent: #ec4899;
    --active-bg: rgba(236, 72, 153, 0.15);
}

body {
    /* DEFAULT DARK THEME (Broadcast Pro) */
    --bg: #09090b;
    --card-bg: #18181b;
    /* Base sólida */
    --glass-bg: rgba(20, 20, 25, 0.7);
    /* Vidrio */
    --card-border: #27272a;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --modal-overlay: rgba(0, 0, 0, 0.85);
    --quote-bg: rgba(255, 255, 255, 0.03);

    /* Inputs */
    --input-bg: #09090b;
    --input-border: #27272a;
    /* --accent move to :root */
    /* --active-bg moved to :root */

    margin: 0;
    padding: 30px 30px 0 30px;
    /* Quitamos el padding inferior (30px -> 0) */
    background: var(--bg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    height: 100vh;
    width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Light Theme Override (Creative Daylight) */
body.light-theme {
    /* Fondo "Amanecer Boreal" - Limpio pero con vida */
    --bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) fixed;

    /* Paneles "Frosted Glass" (Hielo) */
    --card-bg: rgba(255, 255, 255, 0.6);
    /* Más transparente */
    --glass-bg: rgba(255, 255, 255, 0.5);

    /* Borde Blanco Brillante (efecto cristal cortado) */
    --card-border: rgba(255, 255, 255, 0.9);

    --text: #1e293b;
    /* Navy oscuro elegante */
    --text-muted: #475569;

    --input-bg: rgba(255, 255, 255, 0.8);
    --input-border: #fff;

    /* Sombras de color sutiles */
    --brand-glow: rgba(6, 182, 212, 0.2);
    --modal-overlay: rgba(240, 244, 250, 0.8);
    --quote-bg: rgba(0, 0, 0, 0.04);
}



/* ... (Media queries restyle unchanged) ... */

/* RESET GLOBAL DE CAJA */
*,
*::before,
*::after {
    box-sizing: border-box;
}

@media (max-height: 800px) {
    body {
        padding: 0;
    }
}

/* ... Layout styles ... */

.main-layout {
    flex: 1;
    display: grid;
    /* Usar fr en lugar de % evita errores de sub-pixel (rayas fantasmas en Chrome) */
    grid-template-columns: 3fr 3fr 4fr;
    grid-template-rows: 1fr auto;
    gap: 15px;
    /* Gap reducido a impar para evitar artefactos de sub-pixel */
    height: 100%;
    max-width: 100vw;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px) scale(0.99);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    /* Optimización de GPU */
    will-change: transform, opacity;
}

.main-layout.loaded {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Optimización: No renderizar lo que está oculto inicialmente */
#bibleView,
#announcementsView {
    content-visibility: auto;
}

.glass-card {
    background: var(--glass-bg);
    /* backdrop-filter: blur(10px); REMOVIDO - Causaba artefactos y lag */
    /* El blur se aplicará solo a elementos flotantes específicos */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    /* Sombra suave standard, sin inset complejo ni spread negativo agresivo */

    /* CRITICO: AISLAMIENTO DE RENDERIZACIÓN */
    contain: content;
    will-change: transform;

    min-width: 0;
    width: 100%;
    max-width: 100%;
    color: var(--text);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;

    /* OPTIMIZACIÓN DE GPU PARA EL CRISTAL */
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: backdrop-filter;
    perspective: 1000;

    /* AISLAMIENTO DE CAPAS (FIX CHROME GHOST LINES) */
    isolation: isolate;
}

.glass-card::-webkit-scrollbar,
.scroll-list::-webkit-scrollbar {
    display: none !important;
    /* Ocultar barra forzosamente para evitar la raya fea */
}

/* Inputs */
input,
textarea,
select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 12px;
    transition: border-color 0.2s, background 0.3s ease, color 0.3s ease;
}

input[type="range"] {
    padding: 0;
    border: none;
    background: transparent;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--brand-glow);
}

h2,
h3 {
    margin: 0 0 16px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: var(--text-accent, var(--text-muted));
    border-bottom: 2px solid var(--card-border);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

/* Botones con Identidad */
/* Botones Premium */
/* Botones con Identidad (Variables) */
button {
    /* Por defecto usa el gradiente de marca si no es secondary/danger */
    background: var(--brand-gradient);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);

    padding: 10px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    /* Sombras más limpias y profundas */
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

button:focus {
    outline: none !important;
}

button:active {
    transform: translateY(1px) scale(0.98);
}

button.primary,
button.btn-overlay-main {
    background: linear-gradient(135deg, var(--accent) 0%, var(--active-bg) 180%) !important;
    color: white !important;
    border: 1px solid var(--accent) !important;
}

button:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow:
        0 6px 15px rgba(0, 0, 0, 0.25),
        0 0 12px var(--brand-glow),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* Secondary Button (Variable-based) */
button.secondary {
    background: var(--btn-sec-bg, rgba(255, 255, 255, 0.05));
    color: var(--btn-sec-text, var(--text));
    border: 1px solid var(--btn-sec-border, rgba(255, 255, 255, 0.1));
    text-shadow: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    backdrop-filter: blur(5px);
}

button.secondary:hover {
    background: var(--btn-sec-hover-bg, rgba(255, 255, 255, 0.1));
    border-color: var(--btn-sec-hover-border, var(--accent));
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 8px var(--active-bg);
}

button.danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: white;
}

button.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: white;
}

button.icon-btn {
    padding: 0 !important;
    width: 60px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button.icon-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

button.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Botones Minimalistas para Paneles Internos */
.icon-btn-minimal {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    border-radius: 10px;
    box-shadow: none !important;
    position: relative;
}

.icon-btn-minimal:hover {
    background: rgba(128, 128, 128, 0.1) !important;
    color: var(--text);
    transform: scale(1.1) !important;
}

.icon-btn-minimal.active {
    color: var(--accent) !important;
}

/* Cápsula de Controles */
.btn-group-capsule {
    display: flex;
    align-items: center;
    gap: 1px;
    background: rgba(0, 0, 0, 0.15);
    padding: 2px;
    border-radius: 12px;
    border: none !important;
    /* Quitar borde que sale 'de onda' */
}

body.light-theme .btn-group-capsule {
    background: rgba(0, 0, 0, 0.04);
}

/* Item de Multimedia */
.media-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    padding: 8px 12px;
    border-radius: 12px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.media-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

body.light-theme .media-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.04);
}

body.light-theme .media-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* Light Theme Specific Overrides Update */
body.light-theme button.secondary,
body.light-theme .icon-btn {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #1e293b !important;
    text-shadow: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
}

body.light-theme button.primary.icon-btn {
    background: var(--brand-gradient) !important;
    color: #fff !important;
    border: none !important;
}

body.light-theme button.danger.icon-btn-minimal {
    color: #ef4444 !important;
    opacity: 0.7;
}

body.light-theme button.danger.icon-btn-minimal:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    opacity: 1;
}

/* Los iconos SVG heredarán el color de trazo, excepto el logo */
body.light-theme svg:not(.splash-logo-svg):not(.main-logo-svg) {
    stroke: currentColor;
}

/* El logo principal y splash siempre usan relleno, nunca trazo */
body.light-theme .splash-logo-svg,
body.light-theme .main-logo-svg,
body.light-theme .view-header svg {
    stroke: none !important;
}

/* El logo principal mantiene sus colores */
body.light-theme .view-header svg {
    stroke: none;
    /* Porque usan fill */
}

body.light-theme .list-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .glass-card {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Fix text contrast in light mode for active items */
body.light-theme .list-item.active div[style*="color:#aaa"] {
    color: rgba(255, 255, 255, 0.9) !important;
}



/* Listas */
.scroll-list {
    position: relative;
    /* Listas con Scroll Perfecto */
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* BLINDAJE: Nunca mostrar scroll horizontal */
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 5px;
    /* Scrollbar space */
    min-height: 0;
    /* CRÍTICO para Firefox/Grid */
    width: 100%;
    /* Asegurar que ocupe el ancho disponible */
}

/* Grid específico para capítulos (Salmos tiene 150, necesita scroll y orden) */
.chapters-grid {
    display: grid !important;
    /* Sobrescribir flex */
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    /* Celdas más pequeñas */
    gap: 6px;
    align-content: start;
    padding-bottom: 10px;
    /* Espacio al final */
}

.chapters-grid button {
    padding: 0;
    height: 36px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    border-radius: 8px;
    background: transparent;
    /* Por defecto transparente en la grilla */
    color: var(--text-muted);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.chapters-grid button:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.chapters-grid button.active {
    background: var(--brand-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3);
    border: none;
}


/* NAVEGACIÓN TIPO TABS (SEGMENTED CONTROL) */
/* NAVEGACIÓN TIPO TABS (SEGMENTED CONTROL) */
.nav-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    /* Default Dark Mode */
    padding: 4px;
    border-radius: 16px;
    gap: 4px;
    margin-top: 10px;
    border: 1px solid var(--card-border);
}

.nav-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 6px 4px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Light Theme Overrides for Nav & Inputs */
body.light-theme .nav-tabs {
    background: #e2e8f0;
    /* Color sólido limpio para el contenedor */
    border-color: #cbd5e1;
}

body.light-theme .nav-tab {
    background: transparent;
    /* Inactivos transparentes para que respiren */
    color: #475569;
    /* Texto gris suave */
    margin: 0 1px;
    /* Separación visual pequeña */
    border-radius: 8px;
}

body.light-theme .nav-tab:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

body.light-theme .nav-tab.active {
    background: var(--brand-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 0 10px var(--brand-glow);
}

.main-logo-text {
    color: #fff;
}

body.light-theme .main-logo-text {
    color: #1e293b !important;
}

/* Inputs de búsqueda específicos en Light Mode */
body.light-theme input#searchInput,
body.light-theme input#bibleSearch {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

body.light-theme input#searchInput::placeholder,
body.light-theme input#bibleSearch::placeholder {
    color: #94a3b8;
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(0);
    /* Evitar el efecto de botón normal */
    box-shadow: none;
}

.nav-tab.active {
    background: var(--accent);
    color: var(--btn-text-color, white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: var(--btn-text-shadow, none);
}

.list-item {
    padding: 10px 14px;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    border: 1px solid transparent;
    line-height: 1.4;
    margin-bottom: 4px;
    /* FIX ANCHO */
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    /* Permite al flex child encogerse */
}

.list-item.dragging {
    opacity: 0.4;
    cursor: grabbing;
    transform: scale(0.98);
}

.list-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    /* transform: translateX(4px); ELIMINADO POR LAG */
}

.list-item.active {
    background: var(--active-bg);
    border-color: var(--accent);
    color: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2), 0 0 5px var(--brand-glow);
}

/* Estilo original de los versículos (Globos) */
.bible-verse-item {
    display: block !important;
    height: auto !important;
    line-height: 1.6 !important;
    margin-bottom: 4px !important;
    white-space: normal !important;
    flex-shrink: 0 !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.bible-verse-item:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.bible-verse-item strong {
    color: var(--accent);
    margin-right: 8px;
    font-size: 1.1em;
}

.bible-verse-item:hover {
    background: rgba(255, 255, 255, 0.08);
    /* transform: translateX(3px); ELIMINADO POR LAG EN SELECCIÓN */
}

.bible-verse-item.active {
    background: var(--active-bg, rgba(236, 72, 153, 0.15)) !important;
    border: 1px solid var(--accent) !important;
    color: var(--accent);
    font-weight: 600;
}

body.light-theme .bible-verse-item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(255, 255, 255, 0.8);
}

body.light-theme .bible-verse-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

body.light-theme .bible-verse-item.active {
    background: var(--active-bg, rgba(236, 72, 153, 0.2)) !important;
    color: var(--accent) !important;
}

.list-item:not(.active):hover {
    background: #27272a;
}

.list-item.active {
    background: var(--active-bg, rgba(236, 72, 153, 0.15));
    border-color: var(--active-border, #ec4899);
    color: var(--accent);
    font-weight: 600;
}

body.light-theme .list-item:not(.active):hover {
    background: rgba(0, 0, 0, 0.05);
}

.list-item.active div[style*="color:#aaa"] {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    z-index: 100;
    min-width: 140px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    margin-top: 5px;
}

.dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    color: var(--text);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: #27272a;
}

.dropdown-item.active {
    color: var(--text-accent, var(--accent));
    font-weight: bold;
    background-color: rgba(236, 72, 153, 0.1);
}

/* ... (existing code for .dropdown-item.active) ... */

h3,
h2,
h4,
h5,
h6 {
    color: var(--text-muted);
    /* Ensure headings adapt */
}

/* Scrollbar Oscuro (Default) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Scrollbar Claro (Light Mode) */
body.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.col-library {
    grid-row: 1;
    grid-column: 1;
}

.col-setlist {
    grid-row: 1;
    grid-column: 2;
}

.col-live {
    grid-row: 1;
    grid-column: 3;
}

/* Panel de Configuración FLOTANTE (Overlay Fijo) */
/* Panel de Configuración FLOTANTE (Overlay Absoluto) */

/* MODAL ABOUT / CREDITS RESPONSIVE */
.about-card {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: center;
    overflow: hidden;
    /* Blur suave solo en modales flotantes */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 600px) {
    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-card {
        padding: 15px !important;
    }

    .about-card h1 {
        font-size: 32px !important;
    }
}

.col-options {
    position: fixed;
    bottom: 0;
    /* Al ras del monitor */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 60px);
    max-width: 1400px;
    z-index: 9999;
    height: 38px;
    max-height: 38px;
    overflow: hidden;
    background: var(--glass-bg);
    /* Blur suave para efecto flotante sin bugs */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid var(--card-border);
    border-bottom: none;
    /* Eliminar borde inferior para que se funda con el ras */
    border-radius: 20px 20px 0 0;
    /* Solo redondeado arriba */
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    /* Sombra hacia ARRIBA */
}

.col-options.expanded {
    height: auto;
    max-height: 550px;
    bottom: 0;
    padding: 0 20px 20px 20px;
    transform: translateX(-50%);
    border-radius: 25px 25px 0 0;
}

/* Ajustamos el layout principal para que siempre ocupe todo */
.main-layout {
    display: grid;
    grid-template-columns: 30% 30% minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 16px;
    height: 100%;
    overflow: hidden;
    position: relative;
    /* EQUILIBRIO VERTICAL: Gap Horizontal (16px) + Dock (38px) = 54px Total desde bottom */
    padding-bottom: 54px;
}

/* OJO: Sobrescribimos .col-library/setlist/live para que no busquen filas */
.col-library,
.col-setlist,
.col-live {
    grid-row: 1 / -1;
    /* Ocupar toda la altura disponible */
    height: 100%;
}

/* Ocultar contenido cuando está colapsado */
.col-options #overlayOptions {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.col-options.expanded #overlayOptions {
    opacity: 1;
    pointer-events: all;
    transition-delay: 0.1s;
}

/* Control de Diapositivas */
.slide-preview {
    width: 100%;
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px auto;
    border: 2px solid var(--card-border);
    border-radius: 16px;
    text-align: center;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    color: white !important;
    /* PREVIEW SIEMPRE BLANCO SOBRE NEGRO */
    box-sizing: border-box;
    overflow: hidden;
    background: #000 !important;
    /* SIEMPRE NEGRO */
    position: relative;
}

label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    /* USE VARIABLE */
    margin-bottom: 5px;
}

/* Fix Hardcoded Colors in HTML via CSS Specificity */
.list-item[style*="color:#666"] {
    color: var(--text-muted) !important;
}


.main-logo {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
    transition: transform 0.2s;
}

/* RESPONSIVE: Ajustes para pantallas no-4K (Full HD y Laptops) */
/* RESPONSIVE: Ajustes para pantallas no-4K (Full HD y Laptops) */
@media (max-width: 1600px) {
    body {
        padding: 20px;
        /* Antes 10px */
    }

    .main-layout {
        gap: 12px;
        /* Gap 12px + Dock 38px = 50px Total. Body Padding 20px. Layout Padding = 30px */
        padding-bottom: 30px;
    }

    .glass-card {
        padding: 15px;
        /* Más aire interno también */
    }

    button {
        padding: 8px 12px;
        font-size: 11px;
    }

    .list-item {
        padding: 6px 10px;
        font-size: 12px;
    }

    h2 {
        font-size: 11px;
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .slide-preview {
        height: 140px;
        font-size: 13px;
        margin-bottom: 10px;
        padding: 10px;
    }

    input,
    select,
    textarea {
        padding: 8px;
        font-size: 12px;
        margin-bottom: 8px;
    }

    /* Ajuste de Dock para 1600px (padding 20px -> resta 40px) */
    .col-options {
        width: calc(100% - 40px);
    }
}

/* LAPTOPS COMUNES (1366x768 / 1440x900) */
@media (max-width: 1440px) {
    :root {
        /* --radius: 6px; ELIMINADO: Mantener consistencia redonda */
        --radius: 16px;
        /* Un poco menos que los 24px de desktop, pero redondo */
    }

    body {
        padding: 16px;
        /* Antes 8px */
        font-size: 12px;
    }

    .main-logo {
        max-height: 90px;
    }

    /* Logo más pequeño */

    .main-layout {
        grid-template-columns: 30% 30% minmax(0, 1fr);
        /* Equilibrado para laptops */
        gap: 8px;
        /* Gap 8px + Dock 38px = 46px Total. Body Padding 16px. Layout Padding = 30px */
        padding-bottom: 30px;
    }

    .glass-card {
        padding: 10px;
    }

    /* Reducción agresiva de botones e inputs */
    button {
        padding: 6px 10px;
        font-size: 11px;
        height: auto;
    }

    input,
    select,
    textarea {
        padding: 6px;
        font-size: 11px;
        height: auto;
    }

    /* Listas más compactas */
    .list-item {
        padding: 4px 8px;
        font-size: 11px;
        min-height: 28px;
    }

    .scroll-list {
        gap: 2px;
    }

    h2 {
        color: var(--text-accent, var(--accent));
        font-weight: 700;
        font-size: 11px;
        letter-spacing: 1px;
        text-transform: uppercase;
        margin-bottom: 8px;
        padding-bottom: 4px;
        border-bottom: 1px solid var(--card-border);
    }

    /* Preview más pequeño */
    .slide-preview {
        height: 120px;
        font-size: 11px;
        border-width: 1px;
    }

    /* Ajuste de iconos */
    button.icon-btn {
        width: 26px;
        height: 26px;
        font-size: 14px;
    }

    /* Ajuste de Dock para 1440px (padding 16px -> resta 32px) */
    .col-options {
        width: calc(100% - 32px);
        max-width: none;
        /* Permitir fluidez total */
        bottom: 0 !important;
        /* FORZAR AL RAS */
        border-bottom: none !important;
        border-radius: 20px 20px 0 0 !important;
    }
}

/* PANTALLAS PEQUEÑAS (Laptop vieja / Proyector 720p) */
@media (max-width: 1200px) {
    body {
        padding: 4px;
    }

    .main-logo {
        max-height: 70px;
    }

    /* Logo aún más pequeño */
    .main-layout {
        gap: 6px;
        /* Gap 6px + Dock 38px = 44px Total. Body Padding 4px. Layout Padding = 40px */
        padding-bottom: 40px;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1fr);
        /* BLINDADO */
    }

    .glass-card {
        padding: 8px;
        border-radius: 12px;
        /* Redondeado incluso en pantallas chicas */
    }

    button {
        padding: 4px 8px;
        font-size: 10px;
    }

    .list-item {
        padding: 4px 6px;
        font-size: 10px;
    }

    .slide-preview {
        height: 100px;
        font-size: 10px;
        padding: 5px;
    }

    input,
    select,
    textarea {
        padding: 4px;
        font-size: 10px;
        margin-bottom: 6px;
    }

    /* Ajuste de Dock para 1200px (padding 4px) */
    .col-options {
        width: calc(100% - 8px);
        bottom: 0 !important;
        /* FORZAR AL RAS */
        border-bottom: none !important;
        border-radius: 20px 20px 0 0 !important;
    }
}

@keyframes splashLogoSequence {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    40% {
        transform: scale(1.1) translateX(0);
        /* Rebote suave al entrar */
        opacity: 1;
    }

    50% {
        transform: scale(1) translateX(0);
    }

    100% {
        transform: scale(1) translateX(-30px);
        /* Se abre a la izquierda */
        opacity: 1;
    }
}

@keyframes splashTextSequence {

    0%,
    50% {
        transform: scale(0) translateX(-100px);
        /* Oculto y detrás del logo */
        opacity: 0;
    }

    55% {
        opacity: 0.5;
    }

    100% {
        transform: scale(1) translateX(30px);
        /* Emerge y zoom hacia la derecha */
        opacity: 1;
    }
}

/* Splash Screen Dinámico */
.splash-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    z-index: 100000;
    /* Superar al dock y todo lo demás */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.splash-content {
    display: flex;
    align-items: center;
    gap: 0;
    /* Quitamos el gap fijo para que la animación controle el espacio */
}

.splash-logo-svg {
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 0 25px var(--brand-glow));
    animation: splashLogoSequence 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-text-box {
    text-align: left;
    opacity: 0;
    animation: splashTextSequence 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-title-text {
    color: var(--text);
    font-weight: 800;
    font-size: 85px;
    letter-spacing: 4px;
    line-height: 0.85;
}

.splash-subtitle-text {
    color: var(--accent);
    font-weight: 300;
    font-size: 32px;
    letter-spacing: 12px;
    margin-top: 5px;
}

/* Estilos de versículos restaurados arriba bajo .bible-verse-item */

/* Performance Optimized Drag Highlight */
.drag-highlight {
    background-color: var(--active-bg) !important;
    border-color: var(--accent) !important;
    border-style: dashed !important;
    /* Removed heavy transform */
    transition: background-color 0.1s ease, border-color 0.1s ease;
}

/* =========================================
   NUCLEAR SCROLLBAR FIX (GHOST BAR KILLER)
   ========================================= */

/* Hide scrollbar for Chrome, Safari and Opera */
.glass-card::-webkit-scrollbar,
.scroll-list::-webkit-scrollbar,
.col-library::-webkit-scrollbar,
.col-setlist::-webkit-scrollbar,
.col-live::-webkit-scrollbar,
.about-card::-webkit-scrollbar,
#overlayOptions::-webkit-scrollbar,
div::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    -webkit-appearance: none !important;
}

/* Hide scrollbar for IE, Edge and Firefox */
.glass-card,
.scroll-list,
.col-library,
.col-setlist,
.col-live,
.about-card,
#overlayOptions {
    -ms-overflow-style: none !important;
    /* IE and Edge */
    scrollbar-width: none !important;
    /* Firefox */
}