/* Zion Cast Panel - Zion Presenter Design System */
/* Font Imports - Professional Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');


:root {
    /* --- ZION PRESENTER DESIGN TOKENS --- */

    /* Dimensiones Base */
    --radius: 24px;

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

    /* Colores de Estado */
    --danger: #ef4444;
    --success: #22c55e;

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

    /* LIGHT THEME (Creative Daylight) */
    --bg: linear-gradient(135deg, #f0f4e8 0%, #e8f5d8 100%);
    --card-bg: rgba(255, 255, 255, 0.98);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --card-border: rgba(0, 0, 0, 0.06);
    --text: #000000;
    --text-muted: #6b7280;
    --input-bg: #f9fafb;
    --input-border: rgba(0, 0, 0, 0.1);
    --modal-overlay: rgba(240, 244, 232, 0.95);
    --quote-bg: rgba(0, 0, 0, 0.03);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    /* Sombras Suaves */
    --shadow-1: 0 4px 30px rgba(0, 0, 0, 0.12);
    --shadow-2: 0 4px 25px rgba(0, 0, 0, 0.08);
}

/* --- DARK THEME (Broadcast Pro) --- */
body.dark-mode {
    --bg: #1a1a1d;
    --card-bg: #18181b;
    --glass-bg: rgba(20, 20, 25, 0.7);
    --card-border: #27272a;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --modal-overlay: rgba(0, 0, 0, 0.85);
    --quote-bg: rgba(255, 255, 255, 0.03);
    --input-bg: #09090b;
    --input-border: #27272a;
}

/* Dark Mode Specific Tweaks */
body.dark-mode .btn-vis {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .btn-vis:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
}

/* ACTIVE buttons use accent color in Dark Mode */
body.dark-mode .btn-vis.active {
    background: var(--brand-gradient) !important;
    color: white !important;
    box-shadow: 0 0 15px var(--brand-glow);
}

/* Input Fields in Dark Mode */
body.dark-mode input[type="text"],
body.dark-mode textarea,
body.dark-mode select {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    color: var(--text) !important;
}

body.dark-mode input[type="text"]:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus {
    outline: none;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--brand-glow) !important;
}


/* === LIGHT MODE INPUTS - MUST BE AFTER DARK MODE === */
body:not(.dark-mode) input[type="text"],
body:not(.dark-mode) input[type="search"],
body:not(.dark-mode) textarea,
body:not(.dark-mode) select {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

body:not(.dark-mode) textarea#center {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    flex: 1;
    resize: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 0.85rem;
}

/* === END LIGHT MODE INPUTS === */



/* Exception: Central Textarea maintains its specific dark look, just ensuring border matches */
body.dark-mode textarea#center {
    border: 1px solid #444 !important;
    flex: 1;
    resize: none;
    border-radius: 4px;
    padding: 10px;
    font-size: 0.85rem;
}

body.dark-mode .about-card {
    background: #18181b;
}

/* === LIGHT MODE OVERRIDES === */
/* Force white inputs/textareas in light mode */
body:not(.dark-mode) input[type="text"],
body:not(.dark-mode) input[type="search"],
body:not(.dark-mode) textarea,
body:not(.dark-mode) select {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

body:not(.dark-mode) textarea#center {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

body:not(.dark-mode) input[type="text"]:focus,
body:not(.dark-mode) textarea:focus,
body:not(.dark-mode) select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px var(--brand-glow) !important;
}

/* === END LIGHT MODE OVERRIDES === */


/* THEMES */
/* THEMES: TRENDY & VIBRANT PALETTES */
/* Note: Theme variables now override accents to colorize buttons! */

/* THEMES: PROFESSIONAL & ELEGANT */

/* --- TEMAS CON COLORES SÓLIDOS FUERTES --- */

/* 1. COSMIC (Deep Violet) */
body.theme-cosmic {
    --accent: #d500f9;
    --active-bg: rgba(213, 0, 249, 0.15);
    --brand-gradient: linear-gradient(135deg, #d500f9 0%, #651fff 100%);
    --brand-glow: rgba(213, 0, 249, 0.3);
}

body.dark-mode.theme-cosmic {
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    background:
        radial-gradient(ellipse at 15% 20%, rgba(213, 0, 249, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 80%, rgba(101, 31, 255, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #2a1a3d 0%, #1a0e28 100%) !important;
}

/* 2. EMERALD (Teal) */
body.theme-emerald {
    --accent: #1de9b6;
    --active-bg: rgba(29, 233, 182, 0.15);
    --brand-gradient: linear-gradient(135deg, #1de9b6 0%, #00bfa5 100%);
    --brand-glow: rgba(29, 233, 182, 0.3);
}

body.dark-mode.theme-emerald {
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    background:
        radial-gradient(ellipse at 80% 15%, rgba(29, 233, 182, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 85%, rgba(0, 191, 165, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #1a3530 0%, #0e201d 100%) !important;
}

/* 3. SUNSET (Red) */
body.theme-sunset {
    --accent: #ff1744;
    --active-bg: rgba(255, 23, 68, 0.15);
    --brand-gradient: linear-gradient(135deg, #ff1744 0%, #d50000 100%);
    --brand-glow: rgba(255, 23, 68, 0.3);
}

body.dark-mode.theme-sunset {
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 23, 68, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(213, 0, 0, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #3d1a22 0%, #280e12 100%) !important;
}

/* 4. GOLD (Amber) */
body.theme-gold {
    --accent: #ffc400;
    --active-bg: rgba(255, 196, 0, 0.15);
    --brand-gradient: linear-gradient(135deg, #ffc400 0%, #ffab00 100%);
    --brand-glow: rgba(255, 196, 0, 0.3);
}

body.dark-mode.theme-gold {
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    background:
        radial-gradient(ellipse at 25% 25%, rgba(255, 196, 0, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 75%, rgba(255, 171, 0, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #3d2f10 0%, #261c05 100%) !important;
}

/* 5. MIDNIGHT (Lime) */
body.theme-midnight {
    --accent: #c6ff00;
    --active-bg: rgba(198, 255, 0, 0.15);
    --brand-gradient: linear-gradient(135deg, #c6ff00 0%, #aeea00 100%);
    --brand-glow: rgba(198, 255, 0, 0.3);
}

body.dark-mode.theme-midnight {
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    background:
        radial-gradient(ellipse at 70% 30%, rgba(198, 255, 0, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(174, 234, 0, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #2d3a12 0%, #1d2506 100%) !important;
}

/* 6. AZURE (Light Blue) */
body.theme-azure {
    --accent: #00b0ff;
    --active-bg: rgba(0, 176, 255, 0.15);
    --brand-gradient: linear-gradient(135deg, #00b0ff 0%, #0091ea 100%);
    --brand-glow: rgba(0, 176, 255, 0.3);
}

body.dark-mode.theme-azure {
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    background:
        radial-gradient(ellipse at 60% 20%, rgba(0, 176, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(0, 145, 234, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #122a3d 0%, #051925 100%) !important;
}

/* 7. FLAME (Deep Orange) */
body.theme-flame {
    --accent: #ff9100;
    --active-bg: rgba(255, 145, 0, 0.15);
    --brand-gradient: linear-gradient(135deg, #ff9100 0%, #ff6d00 100%);
    --brand-glow: rgba(255, 145, 0, 0.3);
}

body.dark-mode.theme-flame {
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    background:
        radial-gradient(ellipse at 40% 25%, rgba(255, 145, 0, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 75%, rgba(255, 109, 0, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #3d2410 0%, #281404 100%) !important;
}

/* 8. NEW: ELECTRIC (Solid Bright Blue) */
body.theme-electric {
    --accent: #007bff;
    --active-bg: rgba(0, 123, 255, 0.15);
    --brand-gradient: #007bff;
    /* Solid Color */
    --brand-glow: rgba(0, 123, 255, 0.4);
}

body.dark-mode.theme-electric {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 123, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 123, 255, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #0d2a4d 0%, #001a33 100%) !important;
}

/* 9. NEW: NEON (Solid Bright Pink) */
body.theme-neon {
    --accent: #ff00ff;
    --active-bg: rgba(255, 0, 255, 0.15);
    --brand-gradient: #ff00ff;
    /* Solid Color */
    --brand-glow: rgba(255, 0, 255, 0.4);
}

body.dark-mode.theme-neon {
    background:
        radial-gradient(ellipse at 75% 40%, rgba(255, 0, 255, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 25% 60%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #4d1a4d 0%, #2e002e 100%) !important;
}

/* 10. NEW: LIME (Solid Bright Green) */
body.theme-lime {
    --accent: #39ff14;
    --active-bg: rgba(57, 255, 20, 0.15);
    --brand-gradient: #39ff14;
    /* Solid Color */
    --brand-glow: rgba(57, 255, 20, 0.4);
}

body.dark-mode.theme-lime {
    background:
        radial-gradient(ellipse at 50% 70%, rgba(57, 255, 20, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 30%, rgba(57, 255, 20, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #1a2d0d 0%, #0d1a00 100%) !important;
}


*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    /* SISTEMA DE BACKGROUND ESTILO ZION PRESENTER */
    background: var(--bg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}

/* Light mode input/textarea overrides */
body:not(.dark-mode) input[type="text"],
body:not(.dark-mode) input[type="search"],
body:not(.dark-mode) textarea,
body:not(.dark-mode) select {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

body:not(.dark-mode) textarea#center {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
}

/* LOGO (Material Typography) */
.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    /* Reducido de 20px */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    /* Reducido de 1px */
    color: white !important;
    -webkit-text-fill-color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    user-select: none;
    padding: 1px 0;
    /* Reducido de 5px */
    display: inline-block;
}

.logo-text span {
    font-weight: 900;
}

/* End Logo Styles */
/* --- PANEL CONTAINER (ZION PRESENTER LAYOUT) --- */
.panel-container {
    grid-row: 2;
    /* Ocupa la segunda fila del grid del body */
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    /* Se limita al tamaño de la fila 1fr */
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* --- SCROLLBAR (ZION PRESENTER STYLE) --- */
::-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:not(.dark-mode) ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
}

body:not(.dark-mode) ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* --- HEADER (PROFESSIONAL MINIMAL) --- */
header {
    grid-row: 1;
    /* Ocupa la primera fila */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 8px 20px;
    /* Más aire arriba, pegadito abajo */
    background: var(--card-bg);
    border: none;
    border-bottom: 2px solid var(--card-border);
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    flex-shrink: 0;
    margin: 0 !important;
}

.btn-header-opt {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-header-opt:hover {
    background: var(--active-bg);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--brand-glow), 0 0 20px var(--brand-glow);
}

.btn-header-opt svg {
    opacity: 0.8;
}

.btn-header-opt:hover svg {
    opacity: 1;
}


#btnThemeToggle {
    margin-left: auto !important;
}

header h1 {
    font-size: 0.8rem;
    /* Reducido de 0.85rem */
    margin: 0;
    font-weight: 700;
    background: none;
    -webkit-text-fill-color: white;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Reducido de 0.6px */
    line-height: 1;
    /* Compactar altura de línea */
}

/* --- CARDS (ZION PRESENTER GLASSMORPHISM) --- */
section.card,
details.card {
    background: var(--glass-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-shadow: var(--shadow-1);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    color: var(--text);
    transition: background 0.6s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s ease, box-shadow 0.5s ease, color 0.5s ease;
    backface-visibility: hidden;
    transform: translateZ(0);
    isolation: isolate;
}

section.card::-webkit-scrollbar,
details.card::-webkit-scrollbar {
    display: none !important;
}

section.card:hover,
details.card:hover {
    box-shadow: var(--shadow-2);
}

/* --- HEADINGS (ZION PRESENTER STYLE) --- */
h2,
h3 {
    margin: 0 0 8px 0;
    /* Reduced bottom margin */
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    color: var(--accent);
    /* --- USE THEME ACCENT COLOR --- */
    border-bottom: 1px solid var(--active-bg);
    /* --- SLIGHTLY THEMED BORDER --- */
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.5s ease;
}

/* Inputs */
/* Material Inputs */
/* Material Inputs (Light Mode) */
/* Standard Inputs (White Style like Bible Search) */
/* --- INPUTS (ZION PRESENTER STYLE) --- */
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.5s ease, color 0.5s 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);
}

/* EXCEPTION: Central Message Textarea (Keep distinct) */
/* MOVED TO DARK-MODE SECTION - textarea#center now respects light/dark modes */

textarea {
    resize: vertical;
    min-height: 60px;
}

/* Buttons */
/* --- BOTONES PREMIUM (ZION PRESENTER STYLE) --- */
button {
    /* Por defecto usa el gradiente de marca */
    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;
    font-family: var(--font-main);
    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);
    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: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;
}

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

/* Secondary Button */
.btn-secondary,
button.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid 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;
}

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

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

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

/* Option Button */
.btn-opt {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-opt:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--text);
    transform: scale(1.05);
}

/* Colorful Hovers for specific buttons */
#btnSearchKeywords:hover {
    color: var(--accent);
}

#btnPrevVerse:hover {
    color: var(--accent);
}

#btnNextVerse:hover {
    color: var(--accent);
}

#btnHighlight:hover {
    color: var(--accent);
}

#btnRestoreSketch:hover {
    color: var(--accent);
}

/* Search Bar Specifics */
.search-group {
    display: flex;
    gap: 5px;
    margin-bottom: 4px;
    /* Reducido de 8px */
}

/* Search Bar (Material Filled) */
/* Search Bar (Light Mode Header Input) */
/* Search Bar (Specific Override: Elegant Rounded Style) */
.search-group input {
    font-weight: 500;
    text-align: left;
    font-size: 0.9rem;
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    /* Remove heavy material line */
    color: var(--text-primary);
    padding: 8px 35px 8px 12px;
    border-radius: 20px;
    /* Fully rounded/Pill style */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
    height: 32px;
}

.search-group input:focus {
    background: #fff !important;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

/* New Wrapper for Inner X */
.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    box-sizing: border-box !important;
    /* Vital para que la altura sea real */
}

.input-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: -6px;
    /* Ajuste para subir el botón y centrarlo visualmente con el texto */
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 28px;
    /* Área de clic más grande */
    height: 28px;
    /* Área de clic más grande */
    border-radius: 50%;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s, opacity 0.2s;
    z-index: 10;
    pointer-events: auto;
}

.input-clear:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.input-clear:active {
    opacity: 0.8;
}

.search-group button {
    padding: 0 10px;
    font-size: 0.9rem;
}

/* Bible Version Selector */
#bibleVersionSelector:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

#bibleVersionSelector:focus {
    opacity: 1;
    outline: none;
    border-color: var(--accent);
}


/* --- VISIBILITY BUTTONS (ZION PRESENTER STYLE) --- */
.header-vis-toolbar button {
    flex: 1;
    /* Make buttons expand to fill space */
    white-space: nowrap;
}

.btn-vis {
    background: rgba(255, 255, 255, 0.05);
    /* Subtle dark background */
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    /* Slightly more rounded */
    font-weight: 800;
    /* Extra bold for impact */
    font-size: 11px;
    /* Larger font */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 32px;
    /* Taller buttons */
    padding: 0 15px;
    text-shadow: none;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-vis:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-vis.active {
    background: var(--brand-gradient) !important;
    color: white !important;
    box-shadow: 0 0 15px var(--brand-glow);
    font-weight: 700;
    border: none;
}




/* Slots Grid */
.slots-area {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin-top: 8px;
}

.slot-btn {
    width: 100%;
    height: 28px;
    /* Fixed small height */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: var(--font-mono);
}

.slot-btn:hover {
    border-color: var(--accent-blue);
}

.slot-btn.filled {
    background: var(--brand-gradient);
    border: none;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px var(--brand-glow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Config & Details */
details summary {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    padding: 2px 0;
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
}

/* Custom Range Sliders - Compact */
input[type=range] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 6px 0;
    /* Reduced margin */
}

input[type=range]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    height: 12px;
    /* Smaller thumb */
    width: 12px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    margin-top: -5px;
    border: 2px solid #fff;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    /* Thinner track */
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.range-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    margin-bottom: 2px;
    color: var(--text-secondary);
}

.range-value {
    color: var(--accent-cyan);
    font-weight: 700;
    font-family: var(--font-mono);
    font-size: 0.7rem;
}

/* Responsive tweaks removed to avoid conflicts with new Zion Presenter grid */

.logo-text {
    font-size: 14px;
}

section.card,
details.card {
    padding: 8px;
    margin-bottom: 4px;
}

input[type="text"],
textarea,
select {
    padding: 6px;
    font-size: 0.8rem;
}

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

/* End of responsive cleanup */

/* TOAST NOTIFICATIONS (Alert Replacement) */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 17, 21, 0.95);
    border: 1px solid rgba(255, 43, 43, 0.3);
    /* Red border base */
    border-radius: 12px;
    padding: 12px 24px;
    box-shadow: 0 0 20px rgba(255, 43, 43, 0.2), 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -20px);
    /* Start slightly above */

    backdrop-filter: blur(10px);
}

#toast-container.toast-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

#toast-container.toast-error {
    border-color: var(--accent-danger);
    box-shadow: 0 0 25px rgba(255, 43, 43, 0.4);
}

#toast-message {
    color: #ffffff;
    /* Force white text on dark toast bg */
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ABOUT MODAL STYLES (Zion Cast) */
.about-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.about-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

.about-card {
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 40px;
    width: 90%;
    max-width: 900px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
    position: relative;
    overflow: hidden;

    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Add a colorful top stripe like the header */
.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #FF9800, #4CAF50, #2196F3, #9C27B0);
}

.about-backdrop.visible .about-card {
    transform: scale(1) translateY(0);
}

.logo-glow {
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
}

.about-card h2 {
    display: block;
    width: 100%;
    margin: 0 0 15px 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-align: center;
    color: var(--text-primary);
    text-shadow: none;
}

.about-card .meaning p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.about-card .highlight {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.about-card .divider {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--border-color);
    margin: 20px auto;
    width: 80%;
}

.badge-rc {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
}

.meta {
    grid-column: 1 / -1;
    text-align: center;
}

.signature {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

.signature strong {
    color: var(--text);
}

/* =========================================
/* Legacy desktop dashboard layout removed to avoid conflicts with global grid */

.search-card {
    flex: 0 0 auto;
    /* Fixed size */
    margin: 0;
}

.style-card {
    flex: 1;
    /* Grows to take remaining space */
    min-height: 0;
    /* Crucial for scrolling */
    overflow-y: auto !important;
    margin: 0;
    display: block;
    /* Simpler */
    padding-bottom: 20px;
    scrollbar-width: thin;
}

/* Move padding to content areas only */
/* .main-card,
    .search-card,
    .style-card,
    .perm-card {
        margin: 0 20px;
        Add side margins
    } */

/* Except Header */
header {
    margin: 0;
    /* Full width */
    border-radius: 0;
}

/* Assign Areas */
.vis-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    background: transparent;
}

.search-card {
    grid-area: search;
    margin-bottom: 0;
    height: min-content;
}

.main-card {
    grid-area: main;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    min-height: 0;
    /* Add this to allow shrinking */
    /* Contains inner scroll */
}

.perm-card {
    grid-area: perm;
    height: min-content;
}

.style-card {
    grid-area: style;
    height: 100%;
    max-height: 100%;
    overflow-y: auto !important;
    /* Force Scroll */
    display: block;
    /* Simpler display */
    padding-bottom: 20px;
    /* Custom Scrollbar for Style Card */
    scrollbar-width: thin;
    scrollbar-color: var(--text-disabled) transparent;
}

/* End of layout cleanup */

/* --- SPOTLIGHT SEARCH REFACTOR (Material Dialog) --- */
/* --- SPOTLIGHT SEARCH REFACTOR (Material Dialog Light) --- */
.spotlight-panel {
    width: 600px;
    max-width: 90%;
    background: #FFFFFF;
    /* White Dialog */
    border: none;
    border-radius: 4px;
    /* Material Dialog Radius */
    box-shadow: var(--shadow-4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: scale(0.95);
    opacity: 0;
}

.about-backdrop.visible .spotlight-panel {
    transform: scale(1);
    opacity: 1;
}

.about-backdrop.visible .spotlight-panel {
    transform: scale(1);
}

.spotlight-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    gap: 15px;
}

.spotlight-icon {
    width: 24px;
    opacity: 0.9;
    mix-blend-mode: lighten;
    /* Fix Black BG */
}

.spotlight-header input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 1.4rem;
    color: var(--text-primary) !important;
    /* Dark text in modal */
    padding: 0;
    margin: 0;
    height: auto;
    font-weight: 300;
}

.spotlight-header input::placeholder {
    color: var(--text-disabled);
}

.spotlight-header button {
    background: transparent;
    border: none;
    opacity: 0.5;
    padding: 5px;
    cursor: pointer;
}

.spotlight-header button:hover {
    opacity: 1;
}

.spotlight-header button img {
    width: 20px;
    mix-blend-mode: lighten;
    /* Fix Black BG */
}

.spotlight-results {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

/* Scrollbar for Spotlight */
.spotlight-results::-webkit-scrollbar {
    width: 8px;
}

.spotlight-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.spotlight-empty {
    text-align: center;
    color: #666;
    margin: 40px 0;
    font-size: 1.1rem;
}

.spotlight-empty small {
    display: block;
    margin-top: 10px;
    color: #444;
    font-size: 0.9rem;
}

/* Result Item Override for Spotlight */
/* Result Item Override for Spotlight */
.result-item {
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 12px 16px !important;
    margin-bottom: 0 !important;
    cursor: pointer;
    transition: background-color 0.1s;
    border-bottom: 1px solid var(--border-color) !important;
}

.result-item:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    /* Dark hover for light mode */
    /* Soft hover state */
    transform: none;
    box-shadow: none;
}

/* Highlight inside results */
/* Highlight inside results */
.result-item div:first-child {
    color: var(--accent-cyan) !important;
    /* Use accent color for title */
    font-size: 0.85rem !important;
    opacity: 1;
    margin-bottom: 4px !important;
    font-family: var(--font-mono);
    font-weight: 700;
}

/* FIX: Theme Buttons Overflow */
.btn-theme {
    padding: 0 !important;
    /* Remove generic button padding */
    min-width: 0 !important;
    /* Allow shrinking */
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-theme:hover {
    transform: scale(1.15);
    z-index: 2;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.result-item div:last-child {
    font-size: 1.1rem !important;
    color: #fff !important;
    font-weight: 500;
}

.verse-active {
    background: rgba(41, 121, 255, 0.3) !important;
    border-radius: 4px;
}

/* FIX: Obsidian Theme Compatibility with Dark Mode */
body.dark-mode.theme-obsidian {
    --bg-gradient: linear-gradient(180deg, #121212 0%, #000000 40%);
    --accent-cyan: #ffffff;
    --accent-blue: #eeeeee;
}

/* =========================================
   ZION PRESENTATION ENGINE (DEFINITIVE V3)
   ========================================= */
body {
    background: linear-gradient(135deg, #f0f4e8 0%, #e8f5d8 100%) !important;
    background-attachment: fixed !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    display: grid !important;
    grid-template-rows: auto 1fr !important;
    overflow: hidden !important;
}

header {
    grid-row: 1 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 20px !important;
    /* Centrado vertical perfecto */
    background: rgba(18, 18, 20, 0.75) !important;
    /* Glass effect base */
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 100 !important;
    margin: 0 !important;
    min-height: 54px !important;
}

.panel-container {
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 6px 0 0 0 !important;
    /* Margen de respiro entre header y paneles */
    margin: 0 !important;
}

.main-grid {
    padding: 0px 8px 6px 8px !important;
    gap: 8px !important;
}

section.card {
    padding: 10px !important;
    /* Interior balanceado para las tarjetas */
}