/* ==========================================================================
   SAMYFLW ROYALE - LUXURY GAMING THEME (ESTÉTICA CLASH ROYALE & CYBER LATAM)
   Paleta: Obsidiana Esmeralda + Verde Neón (#00e676) + Oro Real (#fbbf24) + Púrpura (#a855f7)
   Atmósfera: Edificio SAMYFLW Vivo, Parallax Cinematográfico, Cyber Scanline, 3 Cometas
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@600;700;800;900&family=Poppins:wght@700;800;900&display=swap');

:root {
    /* ─── PALETA CORPORATIVA SAMYFLW ROYALE ────────────────────────── */
    --bg-dark: #020905;
    --bg-base: transparent;
    --bg-panel: rgba(3, 12, 8, 0.36);
    --bg-card: rgba(3, 14, 9, 0.35);
    --bg-hover: rgba(0, 230, 118, 0.15);
    --bg-input: rgba(2, 10, 6, 0.65);

    /* Neón Esmeralda */
    --primary: #00e676;
    --primary-bright: #39ff88;
    --primary-dark: #00b359;
    --primary-glow: rgba(0, 230, 118, 0.45);
    --primary-dim: rgba(0, 230, 118, 0.15);

    --secondary: #10b981;
    --accent: #39ff88;

    /* Oro Real Royale */
    --gold: #f59e0b;
    --gold-bright: #fbbf24;
    --gold-glow: rgba(251, 191, 36, 0.35);
    --gold-dim: rgba(245, 158, 11, 0.18);

    /* Acentos por Categoría */
    --samy-green: #39ff88;
    --samy-gold: #fbbf24;
    --samy-purple: #a855f7;
    --samy-pink: #ec4899;
    --samy-red: #ef4444;
    --samy-cyan: #06b6d4;
    --samy-blue: #3b82f6;
    --samy-orange: #f97316;
    --samy-kick: #53fc18;

    /* Textos de Alta Legibilidad */
    --text-main: #f0fdf4;
    --text-muted: #86efac;
    --text-dim: #94a3b8;

    /* Bordes con Glow Neón */
    --border: rgba(0, 230, 118, 0.25);
    --border-bright: rgba(0, 230, 118, 0.55);

    /* Tipografías */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-title: 'Outfit', 'Inter', sans-serif;
    --font-num: 'Poppins', sans-serif;

    /* Sombras y Radios */
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-royale: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 1px rgba(0, 230, 118, 0.3);
}

/* ─── BASE Y CAPAS ─────────────────────────────────────────────── */
html {
    background: #010804 !important;
    min-height: 100vh;
}

body {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    color: var(--text-main) !important;
    font-family: var(--font-main) !important;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: 75px;
}

/* Eliminar pseudo-elementos previos que bloqueaban el fondo */
body::before, body::after {
    display: none !important;
    content: none !important;
}

/* Elevación de contenido sobre el fondo vivo */
header, main, .dashboard-grid, .panel {
    position: relative;
    z-index: 10 !important;
}

/* Modales y Overlays: Siempre fijos en el viewport sobre toda la página */
.modal, .modal-backdrop, .overlay-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background-color: rgba(3, 7, 18, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding: 30px 15px !important;
}

/* Botón de Admin Centrado y Estilizado */
.btn-admin-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 8px !important;
    background: rgba(16, 185, 129, 0.12) !important;
    border: 1px solid rgba(0, 230, 118, 0.4) !important;
    color: #00e676 !important;
    cursor: pointer !important;
    font-size: 1.15rem !important;
    transition: all 0.25s ease !important;
    flex-shrink: 0 !important;
    align-self: center !important;
    margin: 0 !important;
}
.btn-admin-icon:hover {
    background: rgba(0, 230, 118, 0.25) !important;
    border-color: #00e676 !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.5) !important;
    transform: translateY(-1px) scale(1.04) !important;
}
.btn-admin-icon.admin-active {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.25), rgba(6, 182, 212, 0.2)) !important;
    border-color: #00e676 !important;
    color: #00e676 !important;
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.45) !important;
}

#mainStatusBar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9000 !important;
}

/* ==========================================================================
   1. FONDO CINEMATOGRÁFICO MULTI-CAPA VIVO (EDIFICIO SAMYFLW + ANIMACIONES)
   ========================================================================== */
#samyflw-background {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    background: #010804 !important;
}

.samy-bg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* CAPA 1: Imagen Panorámica 16:9 del Edificio SAMYFLW con Cobertura Total y Resplandor Cinematográfico */
.samy-bg-building {
    background-image: url('../assets/samyflw/samyflw-building-bg.jpg') !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    opacity: 0.98 !important;
    transform-origin: center center;
    animation: samyBuildingCinematic 14s ease-in-out infinite alternate !important;
    will-change: transform, filter;
    filter: brightness(1.02) contrast(1.08) saturate(1.15) !important;
}

@keyframes samyBuildingCinematic {
    0% {
        transform: scale(1.0) translateY(0);
        filter: brightness(0.98) contrast(1.05) saturate(1.1);
    }
    50% {
        transform: scale(1.035) translateY(-5px);
        filter: brightness(1.12) contrast(1.15) saturate(1.25);
    }
    100% {
        transform: scale(1.0) translateY(0);
        filter: brightness(0.98) contrast(1.05) saturate(1.1);
    }
}
}

@keyframes samyBuildingCinematic {
    0% {
        transform: scale(1.0) translateY(0);
        filter: brightness(0.96) contrast(1.06) saturate(1.1);
    }
    50% {
        transform: scale(1.045) translateY(-8px);
        filter: brightness(1.14) contrast(1.18) saturate(1.3);
    }
    100% {
        transform: scale(1.0) translateY(0);
        filter: brightness(0.96) contrast(1.06) saturate(1.1);
    }
}

/* CAPA 2: Oscurecimiento muy sutil para dejar ver la imagen con total nitidez */
.samy-bg-darken {
    background: 
        radial-gradient(ellipse at 50% 30%, transparent 0%, rgba(1, 8, 4, 0.22) 100%),
        linear-gradient(180deg, rgba(1, 8, 4, 0.05) 0%, rgba(1, 8, 4, 0.32) 100%);
    mix-blend-mode: multiply;
}

/* CAPA 3: Nebulosa Galáctica Esmeralda, Púrpura y Cyan */
.samy-bg-nebula {
    background: 
        radial-gradient(ellipse at 15% 18%, rgba(0, 230, 118, 0.32) 0%, transparent 48%),
        radial-gradient(ellipse at 85% 22%, rgba(168, 85, 247, 0.30) 0%, transparent 46%),
        radial-gradient(ellipse at 50% 85%, rgba(6, 182, 212, 0.26) 0%, transparent 52%);
    filter: blur(40px);
    animation: samyNebulaDrift 14s ease-in-out infinite alternate !important;
}

@keyframes samyNebulaDrift {
    0%   { opacity: 0.7; transform: scale(1) translateY(0); }
    50%  { opacity: 1.0; transform: scale(1.08) translateY(-12px); }
    100% { opacity: 0.75; transform: scale(0.96) translateY(8px); }
}

/* CAPA 4: Estrellas Galácticas Titilantes (4s) */
.samy-bg-stars {
    background-image: 
        radial-gradient(1.5px 1.5px at 25px 35px, #ffffff, transparent),
        radial-gradient(2.5px 2.5px at 150px 85px, #39ff88, transparent),
        radial-gradient(2px 2px at 290px 125px, #a855f7, transparent),
        radial-gradient(3px 3px at 460px 65px, #ffffff, transparent),
        radial-gradient(2.5px 2.5px at 630px 215px, #00e5ff, transparent),
        radial-gradient(2px 2px at 790px 95px, #ffffff, transparent),
        radial-gradient(2.5px 2.5px at 930px 185px, #fbbf24, transparent),
        radial-gradient(2px 2px at 1120px 75px, #39ff88, transparent),
        radial-gradient(3px 3px at 1300px 245px, #ffffff, transparent),
        radial-gradient(2px 2px at 1470px 135px, #a855f7, transparent),
        radial-gradient(2.5px 2.5px at 1670px 95px, #ffffff, transparent),
        radial-gradient(2px 2px at 1840px 195px, #39ff88, transparent);
    background-size: 380px 380px;
    opacity: 0.95 !important;
    animation: samyStarsTwinkle 4.5s ease-in-out infinite alternate !important;
}

@keyframes samyStarsTwinkle {
    0%   { opacity: 0.45; transform: scale(0.98); }
    50%  { opacity: 1.0; transform: scale(1.02); filter: drop-shadow(0 0 4px #fff); }
    100% { opacity: 0.55; transform: scale(1.0); }
}

/* CAPA 5: Cyber Scanline Holográfico que recorre la pantalla (7.5s) */
.samy-bg-cybergrid {
    position: absolute;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 230, 118, 0.08) 40%,
        rgba(57, 255, 136, 0.28) 50%,
        rgba(0, 229, 255, 0.15) 60%,
        transparent 100%
    );
    filter: drop-shadow(0 0 15px rgba(0, 230, 118, 0.5));
    opacity: 0.75;
    animation: samyCyberScan 7.5s linear infinite !important;
    pointer-events: none;
}

@keyframes samyCyberScan {
    0%   { top: -140px; opacity: 0; }
    12%  { opacity: 0.8; }
    88%  { opacity: 0.8; }
    100% { top: 105%; opacity: 0; }
}

/* CAPA 6: 3 Cometas / Shooting Stars con Destellos Luminosos */
.samy-bg-shooting-star {
    position: absolute;
    top: 5%;
    left: 20%;
    width: 180px;
    height: 3px;
    background: linear-gradient(90deg, #ffffff, #39ff88 30%, #00e5ff 70%, transparent);
    border-radius: 999px;
    box-shadow: 0 0 14px #39ff88, 0 0 25px #00e5ff;
    transform: rotate(-35deg);
    opacity: 0;
    animation: samyShootingStar1 5.5s ease-in-out infinite;
}

.samy-bg-shooting-star-2 {
    position: absolute;
    top: 15%;
    left: 55%;
    width: 220px;
    height: 3px;
    background: linear-gradient(90deg, #ffffff, #a855f7 35%, #ec4899 75%, transparent);
    border-radius: 999px;
    box-shadow: 0 0 16px #a855f7, 0 0 28px #ec4899;
    transform: rotate(-38deg);
    opacity: 0;
    animation: samyShootingStar2 8s ease-in-out infinite 2.5s;
}

.samy-bg-shooting-star-3 {
    position: absolute;
    top: 25%;
    left: 40%;
    width: 160px;
    height: 2.5px;
    background: linear-gradient(90deg, #ffffff, #fbbf24 35%, #39ff88 75%, transparent);
    border-radius: 999px;
    box-shadow: 0 0 14px #fbbf24, 0 0 22px #39ff88;
    transform: rotate(-32deg);
    opacity: 0;
    animation: samyShootingStar3 10.5s ease-in-out infinite 5s;
}

@keyframes samyShootingStar1 {
    0%   { opacity: 0; transform: rotate(-35deg) translate(-250px, -50px) scale(0.6); }
    15%  { opacity: 1; transform: rotate(-35deg) translate(0, 0) scale(1.1); }
    30%  { opacity: 0; transform: rotate(-35deg) translate(400px, 80px) scale(0.7); }
    100% { opacity: 0; transform: rotate(-35deg) translate(400px, 80px) scale(0.7); }
}

@keyframes samyShootingStar2 {
    0%   { opacity: 0; transform: rotate(-38deg) translate(-250px, -50px) scale(0.6); }
    15%  { opacity: 1; transform: rotate(-38deg) translate(0, 0) scale(1.1); }
    30%  { opacity: 0; transform: rotate(-38deg) translate(450px, 90px) scale(0.7); }
    100% { opacity: 0; transform: rotate(-38deg) translate(450px, 90px) scale(0.7); }
}

@keyframes samyShootingStar3 {
    0%   { opacity: 0; transform: rotate(-32deg) translate(-200px, -40px) scale(0.6); }
    15%  { opacity: 1; transform: rotate(-32deg) translate(0, 0) scale(1.1); }
    30%  { opacity: 0; transform: rotate(-32deg) translate(380px, 70px) scale(0.7); }
    100% { opacity: 0; transform: rotate(-32deg) translate(380px, 70px) scale(0.7); }
}

/* CAPA 7: Niebla Tenue con desplazamiento */
.samy-bg-fog {
    background: 
        radial-gradient(ellipse at 35% 92%, rgba(0, 230, 118, 0.1) 0%, transparent 58%),
        radial-gradient(ellipse at 72% 88%, rgba(139, 92, 246, 0.09) 0%, transparent 54%);
    filter: blur(50px);
    animation: samyFogShift 18s ease-in-out infinite alternate !important;
}

@keyframes samyFogShift {
    0%   { transform: translateX(-30px); opacity: 0.65; }
    50%  { transform: translateX(30px); opacity: 1; }
    100% { transform: translateX(-15px); opacity: 0.75; }
}

/* CAPA 8: LEDs Ambientales con Pulsación Neón Rápida (4s) */
.samy-bg-leds {
    background: 
        radial-gradient(circle at 50% 46%, rgba(0, 230, 118, 0.45) 0%, transparent 40%),
        radial-gradient(circle at 44% 42%, rgba(0, 229, 255, 0.30) 0%, transparent 30%),
        radial-gradient(circle at 56% 42%, rgba(168, 85, 247, 0.30) 0%, transparent 30%);
    mix-blend-mode: screen;
    animation: samyLedBreath 4s ease-in-out infinite alternate !important;
}

@keyframes samyLedBreath {
    0%   { opacity: 0.45; filter: brightness(1.0); }
    50%  { opacity: 1.0; filter: brightness(1.6) drop-shadow(0 0 25px rgba(0, 230, 118, 0.7)); }
    100% { opacity: 0.55; filter: brightness(1.1); }
}

/* CAPA 9: Viñeta Oscura Cinematográfica */
.samy-bg-vignette {
    box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.6), inset 0 0 45px rgba(0, 0, 0, 0.45);
}

/* ─── SCROLLBAR FUTURISTA ───────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: rgba(2, 10, 6, 0.85); }
::-webkit-scrollbar-thumb { 
    background: rgba(0, 230, 118, 0.35); 
    border-radius: 4px; 
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}
::-webkit-scrollbar-thumb:hover { 
    background: rgba(0, 230, 118, 0.75); 
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.7);
}

/* ==========================================================================
   2. HEADER & BRANDING SAMYFLW ANIMADO
   ========================================================================== */
header {
    background: linear-gradient(90deg, rgba(2, 12, 7, 0.65) 0%, rgba(5, 26, 17, 0.62) 100%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--border-bright) !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(0, 230, 118, 0.25) !important;
    border-radius: 14px;
    padding: 10px 18px !important;
    margin-bottom: 1.2rem !important;
}

.samyflw-branding-header {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.samyflw-header-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.45));
    animation: samyLogoFloat 6s ease-in-out infinite alternate;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.samyflw-header-logo:hover {
    filter: drop-shadow(0 0 18px rgba(0, 230, 118, 0.85)) drop-shadow(0 0 32px rgba(57, 255, 136, 0.45));
    transform: translateY(-2px) scale(1.04);
}

@keyframes samyLogoFloat {
    0%   { transform: translateY(0); filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.4)); }
    50%  { transform: translateY(-3px); filter: drop-shadow(0 0 16px rgba(0, 230, 118, 0.75)); }
    100% { transform: translateY(0); filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.4)); }
}

.samyflw-brand-titles {
    display: flex;
    flex-direction: column;
}

.samyflw-logo-title {
    margin: 0 !important;
    font-family: var(--font-title) !important;
    font-size: 1.55rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
    background: linear-gradient(135deg, #00e676 0%, #39ff88 45%, #fbbf24 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 0 12px rgba(0, 230, 118, 0.45));
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.1;
}

.samyflw-badge-tag {
    font-size: 0.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00e676, #39ff88);
    color: #020804;
    padding: 2px 7px;
    border-radius: 6px;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.4);
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.samyflw-logo-sub {
    font-size: 0.65rem;
    font-weight: 700;
    color: #86efac;
    letter-spacing: 0.12em;
    opacity: 0.85;
}

/* ==========================================================================
   3. BOTONES CON SHEEN SWEEP Y GLOW
   ========================================================================== */
.btn, .btn-module, button:not([style*="background:none"]) {
    position: relative !important;
    overflow: hidden !important;
    font-family: var(--font-main) !important;
    font-weight: 700 !important;
    border-radius: var(--radius-sm) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn::after, .btn-module::after, button:not([style*="background:none"])::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -130%;
    width: 70%;
    height: 220%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 80%
    );
    transform: rotate(25deg);
    pointer-events: none;
    transition: left 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover:not(:disabled)::after, 
.btn-module:hover::after,
button:not([style*="background:none"]):hover:not(:disabled)::after {
    left: 140%;
}

.btn:hover:not(:disabled), .btn-module:hover {
    transform: translateY(-2px) !important;
}

.btn:active:not(:disabled), .btn-module:active {
    transform: scale(0.97) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #00e676 0%, #00b359 100%) !important;
    color: #02140a !important;
    font-weight: 800 !important;
    border: 1px solid #39ff88 !important;
    box-shadow: 0 4px 18px rgba(0, 230, 118, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.1) !important;
    box-shadow: 0 8px 26px rgba(0, 230, 118, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}

.btn-module {
    background: rgba(4, 20, 13, 0.65) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid var(--border-bright) !important;
    color: #86efac !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45) !important;
}

.btn-module:hover {
    background: rgba(0, 230, 118, 0.25) !important;
    border-color: #00e676 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(0, 230, 118, 0.35) !important;
}

/* ==========================================================================
   4. PANELES Y MÓDULOS CON ANIMACIÓN ELÉCTRICA CYBERPUNK (FRAMES DINÁMICOS)
   ========================================================================== */
.panel {
    position: relative !important;
    background: rgba(3, 14, 9, 0.52) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(0, 230, 118, 0.28) !important;
    border-radius: var(--radius) !important;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.65), 
        0 0 12px rgba(0, 230, 118, 0.18),
        inset 0 0 18px rgba(0, 230, 118, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    animation: electricFramePulse 5s ease-in-out infinite alternate !important;
}

/* Borde Eléctrico Dinámico con Corriente Continua Neón */
.panel::before {
    content: '' !important;
    position: absolute !important;
    inset: -1px !important;
    border-radius: inherit !important;
    padding: 1.5px !important;
    background: linear-gradient(
        90deg,
        rgba(0, 230, 118, 0.25) 0%,
        rgba(0, 255, 234, 0.85) 25%,
        rgba(168, 85, 247, 0.5) 50%,
        rgba(0, 230, 118, 0.9) 75%,
        rgba(0, 230, 118, 0.25) 100%
    ) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
    z-index: 1 !important;
    background-size: 300% 300% !important;
    animation: electricBorderFlow 6s linear infinite, electricSparkJitter 7s ease-in-out infinite alternate !important;
    opacity: 0.8 !important;
}

/* Destello de Chispa / Arco Eléctrico Relampagueante */
.panel::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 1.5px !important;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 255, 234, 0.95) 50%, transparent 100%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 2 !important;
    animation: electricArcFlash 5s ease-in-out infinite !important;
}

@keyframes electricBorderFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes electricFramePulse {
    0% {
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.65), 
            0 0 10px rgba(0, 230, 118, 0.15),
            inset 0 0 14px rgba(0, 230, 118, 0.04);
        border-color: rgba(0, 230, 118, 0.28);
    }
    50% {
        box-shadow: 
            0 14px 40px rgba(0, 0, 0, 0.75), 
            0 0 22px rgba(0, 230, 118, 0.35),
            0 0 38px rgba(6, 182, 212, 0.2),
            inset 0 0 24px rgba(0, 230, 118, 0.09);
        border-color: rgba(0, 255, 234, 0.45);
    }
    100% {
        box-shadow: 
            0 10px 30px rgba(0, 0, 0, 0.65), 
            0 0 10px rgba(0, 230, 118, 0.15),
            inset 0 0 14px rgba(0, 230, 118, 0.04);
        border-color: rgba(0, 230, 118, 0.28);
    }
}

@keyframes electricArcFlash {
    0%, 84%, 100% { opacity: 0; transform: translateX(-100%); }
    86% { opacity: 1; transform: translateX(0%); }
    89% { opacity: 0.3; transform: translateX(25%); }
    92% { opacity: 1; transform: translateX(65%); }
    95% { opacity: 0; transform: translateX(100%); }
}

@keyframes electricSparkJitter {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 2px rgba(0, 230, 118, 0.4)); }
    35% { filter: brightness(1.3) drop-shadow(0 0 9px rgba(0, 255, 234, 0.7)); }
    70% { filter: brightness(1.45) drop-shadow(0 0 14px rgba(0, 230, 118, 0.9)); }
}

.panel:hover {
    background: rgba(3, 16, 10, 0.65) !important;
    border-color: #00e676 !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 18px 45px rgba(0, 0, 0, 0.8), 
        0 0 28px rgba(0, 230, 118, 0.5),
        0 0 50px rgba(0, 255, 234, 0.3),
        inset 0 0 25px rgba(0, 230, 118, 0.12) !important;
}

.panel:hover::before {
    opacity: 1 !important;
    animation-duration: 2.5s !important;
    filter: brightness(1.35) drop-shadow(0 0 8px #00e676) !important;
}

.panel-title {
    font-family: var(--font-title) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #39ff88 !important;
    letter-spacing: -0.2px !important;
    text-shadow: 0 0 14px rgba(0, 230, 118, 0.4) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-header {
    background: rgba(0, 0, 0, 0.15) !important;
    border-bottom: 1px solid rgba(0, 230, 118, 0.15) !important;
}

/* Tarjetas y sub-cajas internas de paneles (Overlays, TTS, etc.) hechas translúcidas */
#panel-giftoverlays [style*="background:#2a2a2a"],
#panel-giftoverlays [style*="background: #2a2a2a"],
#panel-giftoverlays [style*="background:#111"],
#panel-giftoverlays [style*="background: #111"],
#panel-giftoverlays [style*="background:#2d2d2d"],
#panel-giftoverlays [style*="background: #2d2d2d"],
#panel-giftoverlays [style*="background:#1a1a1a"],
#panel-giftoverlays [style*="background: #1a1a1a"],
.subpanel,
.card,
.sound-item,
.checkbox-item,
.leaderboard-item {
    background: rgba(3, 15, 10, 0.35) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(0, 230, 118, 0.18) !important;
}

/* Multistream Viewers contenedores internos translúcidos */
#panel-multistream-viewers [style*="background:#090a10"],
#panel-multistream-viewers [style*="background: #090a10"],
#panel-multistream-viewers [style*="background:radial-gradient"] {
    background: rgba(3, 15, 10, 0.35) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(83, 252, 24, 0.22) !important;
}

/* Batalla contenedores internos translúcidos */
#section-batalla [style*="background:#020709"],
#section-batalla [style*="background: #020709"],
#section-batalla [style*="background:rgba(0,0,0,.3)"],
#section-batalla [style*="background:rgba(0,0,0,.2)"],
#dashBattleLog {
    background: rgba(18, 5, 8, 0.40) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
}

/* Logs panel */
#section-logs, #logs {
    background: rgba(2, 8, 12, 0.40) !important;
    backdrop-filter: blur(4px) !important;
}

/* ==========================================================================
   5. DIFERENCIACIÓN VISUAL POR CATEGORÍA DE MÓDULO (COLORES ELEGANTES)
   ========================================================================== */
/* TTS: Verde Esmeralda Neón */
#section-tts {
    border-top: 3px solid #00e676 !important;
    background: rgba(2, 14, 8, 0.38) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 230, 118, 0.14) !important;
}
#section-tts .panel-title i { color: #00e676 !important; }

/* Ranking / Leaderboard: Oro Real Royale */
#section-leaderboard, .panel:has(#topDonorsList), .panel:has(#topHeartsList) {
    border-top: 3px solid #fbbf24 !important;
    background: rgba(14, 10, 3, 0.38) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(251, 191, 36, 0.14) !important;
}
#section-leaderboard .panel-title i, .panel:has(#topDonorsList) .panel-title i {
    color: #fbbf24 !important;
}

/* Overlays de Regalos: Púrpura Royale */
#panel-giftoverlays, .gift-overlay-section {
    border-top: 3px solid #a855f7 !important;
    background: rgba(14, 6, 20, 0.36) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 22px rgba(168, 85, 247, 0.16) !important;
}

/* Tarro (Coin Jar): Magenta / Rosa */
#coin_jar_module {
    border-top: 3px solid #ec4899 !important;
    background: rgba(18, 6, 14, 0.38) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(236, 72, 153, 0.14) !important;
}

/* Multistream Viewers: Kick Neón Green + TikTok Cyan */
#panel-multistream-viewers {
    border-top: 3px solid #53fc18 !important;
    background: rgba(4, 16, 10, 0.38) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 22px rgba(83, 252, 24, 0.16) !important;
}

/* Música (Song Requests): Fucsia / Rojo */
#srModule, [data-nav="section-music"] {
    border-top: 3px solid #f43f5e !important;
    background: rgba(18, 4, 8, 0.38) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(244, 63, 94, 0.14) !important;
}
#srModule .panel-title i { color: #f43f5e !important; }

/* Sonidos (Sound Alerts): Cyan / Turquesa */
#section-sounds {
    border-top: 3px solid #06b6d4 !important;
    background: rgba(3, 14, 18, 0.38) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(6, 182, 212, 0.14) !important;
}
#section-sounds .panel-title i { color: #06b6d4 !important; }

/* Acción Batalla: Rojo Carmesí Neón */
#section-batalla {
    grid-column: 1 / -1 !important;
    border-top: 3px solid #ef4444 !important;
    background: rgba(18, 5, 7, 0.40) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(239, 68, 68, 0.25) !important;
}

/* Live Logs: Azul / Slate */
#section-logs {
    border-top: 3px solid #3b82f6 !important;
    background: rgba(4, 10, 18, 0.38) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 20px rgba(59, 130, 246, 0.12) !important;
}
#section-logs .panel-title i { color: #3b82f6 !important; }

/* ==========================================================================
   6. ACCIONES & EVENTOS — LAUNCHER FLOTANTE ANIMADO (ESQUINA INFERIOR DERECHA)
   ========================================================================== */
#tik-dashboard-btn {
    position: fixed !important;
    bottom: 58px !important;
    right: 22px !important;
    z-index: 9500 !important;
    background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #06b6d4 100%) !important;
    border: 1.5px solid rgba(168, 85, 247, 0.65) !important;
    border-radius: 30px !important;
    padding: 10px 20px !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 0.88rem !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.55), 0 0 16px rgba(6, 182, 212, 0.4) !important;
    animation: tikFabJump 2.8s cubic-bezier(0.28, 0.84, 0.42, 1) infinite, tikFabGlowPulse 2.4s ease-in-out infinite alternate !important;
    transition: all 0.25s ease !important;
    user-select: none !important;
}

#tik-dashboard-btn:hover {
    animation-play-state: paused !important;
    transform: translateY(-4px) scale(1.06) !important;
    border-color: #38bdf8 !important;
    box-shadow: 0 12px 38px rgba(124, 58, 237, 0.9), 0 0 25px rgba(6, 182, 212, 0.8) !important;
    filter: brightness(1.15) !important;
}

/* Animación saltando (Doble salto rítmico llamativo) */
@keyframes tikFabJump {
    0%, 100% {
        transform: translateY(0);
    }
    12% {
        transform: translateY(-14px) scale(1.05);
    }
    24% {
        transform: translateY(0) scale(0.96);
    }
    34% {
        transform: translateY(-7px) scale(1.02);
    }
    44% {
        transform: translateY(0) scale(1);
    }
    58% {
        transform: translateY(-2px);
    }
    68% {
        transform: translateY(0);
    }
}

@keyframes tikFabGlowPulse {
    0% {
        box-shadow: 0 4px 18px rgba(124, 58, 237, 0.45), 0 0 10px rgba(6, 182, 212, 0.25);
    }
    100% {
        box-shadow: 0 8px 32px rgba(124, 58, 237, 0.85), 0 0 22px rgba(6, 182, 212, 0.65), 0 0 35px rgba(168, 85, 247, 0.45);
    }
}

#tik-dashboard {
    position: fixed !important;
    top: 30px !important;
    bottom: 60px !important;
    left: 30px !important;
    right: 30px !important;
    width: auto !important;
    height: auto !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    background: rgba(10, 15, 26, 0.96) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(139, 92, 246, 0.45) !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(139, 92, 246, 0.25) !important;
    z-index: 9500 !important;
    overflow: hidden !important;
}

.tik-dash-header {
    background: linear-gradient(90deg, #131826 0%, #1a1b32 100%) !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3) !important;
}

.tik-tab-bar {
    background: #0f131f !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.25) !important;
}

.tik-tab.active {
    color: #c4b5fd !important;
    border-bottom: 2px solid #a855f7 !important;
}

.tik-section {
    background: rgba(18, 24, 40, 0.85) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.tik-btn-primary {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%) !important;
    border-color: #a855f7 !important;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4) !important;
}

@media (max-width: 900px) {
    #tik-dashboard {
        top: 10px !important;
        bottom: 55px !important;
        left: 8px !important;
        right: 8px !important;
        border-radius: 12px !important;
    }
}

/* ==========================================================================
   7. BARRA DE ESTADO / NAVEGACIÓN INFERIOR (#mainStatusBar)
   ========================================================================== */
#mainStatusBar.status-bar, .status-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background: linear-gradient(90deg, rgba(2, 10, 6, 0.82) 0%, rgba(5, 20, 13, 0.80) 100%) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border-top: 1px solid rgba(0, 230, 118, 0.28) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.7) !important;
    padding: 8px 24px !important;
    z-index: 8000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.nav-mod-btn {
    border-radius: 20px !important;
    transition: all 0.22s ease !important;
}

.nav-mod-btn:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.15) !important;
}

.nav-mod-btn.active {
    box-shadow: 0 0 14px currentColor, 0 0 2px currentColor inset !important;
}

.status-item {
    font-weight: 700;
    color: #e2e8f0;
}
#viewerCount {
    color: #39ff88;
    font-weight: 800;
    margin-left: 4px;
}

/* ==========================================================================
   8. INPUTS, SELECTS Y CONTROLES (TRANSLÚCIDOS Y 100% LEGIBLES)
   ========================================================================== */
input[type="text"], input[type="password"], input[type="number"], select, textarea {
    background: rgba(2, 10, 6, 0.65) !important;
    backdrop-filter: blur(6px) !important;
    border: 1px solid var(--border) !important;
    color: #f0fdf4 !important;
    border-radius: 9px !important;
    font-family: var(--font-main) !important;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s ease !important;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
    background: rgba(2, 12, 7, 0.85) !important;
    border-color: #00e676 !important;
    box-shadow: 0 0 0 2px rgba(0, 230, 118, 0.35), 0 0 18px rgba(0, 230, 118, 0.25) !important;
}

label {
    color: var(--text-muted) !important;
    font-weight: 500 !important;
}

input[type="range"] {
    accent-color: #00e676 !important;
}

input[type="checkbox"] {
    accent-color: #00e676 !important;
}

/* ==========================================================================
   9. ADAPTABILIDAD RESPONSIVA Y MULTI-PANTALLA (LAPTOPS, TABLETS Y CELULARES)
   ========================================================================== */

/* Laptops Medianas y Tablets Horizontales (<= 1100px) */
@media (max-width: 1100px) {
    #panel-multistream-viewers #multistreamGrid,
    #multistreamGrid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    #srPlayerArea {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

/* Tablets Verticales y Pantallas Medianas (<= 768px) */
@media (max-width: 768px) {
    header {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        gap: 12px !important;
        padding: 12px 14px !important;
    }

    .header-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .samyflw-branding-header {
        justify-content: center !important;
        margin-bottom: 2px !important;
    }

    .nav-modules {
        justify-content: flex-start !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 0 4px !important;
        gap: 6px !important;
    }

    .nav-mod-btn {
        padding: 5px 11px !important;
        font-size: 0.70rem !important;
    }

    #section-sounds {
        overflow-x: auto !important;
    }

    #section-sounds [style*="grid-template-columns"] {
        min-width: 520px !important;
    }
}

/* Celulares y Smartphones (<= 480px) */
@media (max-width: 480px) {
    body {
        padding: 8px !important;
        padding-bottom: 74px !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .panel {
        padding: 14px 12px !important;
        border-radius: 12px !important;
    }

    #panel-multistream-viewers {
        padding: 16px 12px !important;
    }

    #mainStatusBar {
        padding: 0 8px !important;
        gap: 4px !important;
    }

    .nav-mod-btn {
        padding: 4px 8px !important;
        font-size: 0.65rem !important;
    }

    .modal-content,
    #actionsEventsModal > div,
    #mediaLibraryModal > div {
        max-width: 96% !important;
        width: 96% !important;
        padding: 16px !important;
        margin: 12px auto !important;
    }
}



/* ==========================================================================
   BOTÓN DE CERRAR MODAL UNIVERSAL CON NEÓN ROJO ELÉCTRICO (.close-modal)
   ========================================================================== */
.close-modal,
.btn-close-modal {
    position: absolute !important;
    top: 14px !important;
    right: 18px !important;
    width: 34px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 8px !important;
    color: #cbd5e1 !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.close-modal:hover,
.btn-close-modal:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #ef4444 !important;
    transform: scale(1.1) rotate(90deg) !important;
    box-shadow: 0 0 16px rgba(239, 68, 68, 0.6) !important;
}
