/* =========================================================
   VARIABLES Y RESETEO (CYBER-MINIMALIST PREMIUM)
   ========================================================= */
:root {
    --bg-dark: #06080b; /* Fondo Obsidiana ultra profundo */
    --bg-panel: rgba(11, 15, 21, 0.7); /* Paneles oscuros translúcidos */
    --bg-card: rgba(11, 15, 21, 0.6);
    --bg-card-hover: rgba(16, 23, 34, 0.85);
    
    --primary: #00e5ff; /* Cyan Eléctrico */
    --primary-dim: rgba(0, 229, 255, 0.15);
    --accent: #d946ef; /* Morado Neón / Fuchsia */
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --border-glow: rgba(0, 229, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.05); /* Borde sutil */
    
    --success: #10b981;
    --error: #ef4444;
    
    --shadow-neon: rgba(0, 229, 255, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.03), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(217, 70, 239, 0.03), transparent 50%);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
    letter-spacing: 0.3px;
}

#hacker-matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    pointer-events: none; /* Los eventos van al documento, Three.js los lee de window */
    opacity: 1; /* Three.js maneja su propio alpha */
}

/* Efecto Scanlines CRT ultra-sutil (casi invisible para no ensuciar el 3D) */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.08) 50%);
    background-size: 100% 4px;
    z-index: -2;
    pointer-events: none;
    opacity: 0.06; /* Casi invisible para no competir con el fondo 3D */
}

/* Scrollbar personalizado limpio */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================================
   ESTRUCTURA PRINCIPAL
   ========================================================= */
.app-container {
    position: relative;
    z-index: 10;
    max-width: 1100px; /* Un poco más centrado */
    margin: 0 auto;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem; /* Más espacio para respirar */
}

/* ENCABEZADO */
.app-header { 
    text-align: center; 
    animation: fadeInDown 0.8s ease-out; 
}

.logo-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-title {
    font-family: 'Space Grotesk', 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-main);
}

.logo-title span {
    font-weight: 400;
    color: var(--primary);
    text-shadow: 0 0 20px var(--shadow-neon);
}

.badge {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
    border: 1px solid var(--border-glow);
    padding: 0.35rem 0.85rem;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    vertical-align: middle;
    margin-left: 1rem;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

/* Badge de Prueba Gratuita */
.trial-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: trialPulse 2s ease-in-out infinite;
}

@keyframes trialPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(16, 185, 129, 0.15); }
    50% { box-shadow: 0 0 14px rgba(16, 185, 129, 0.35); border-color: rgba(16, 185, 129, 0.5); }
}

/* PANEL DE BÚSQUEDA (HÉROE) — Premium Glassmorphism */
.search-panel {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 229, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: fadeInUp 0.8s ease-out 0.2s both;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
    position: relative; /* Contenedor para los HUD corners */
    overflow: hidden;
}

.search-panel:hover {
    box-shadow:
        0 12px 48px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(0, 229, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

/* ── HUD Corner Micro-Details ── */
.hud-corner {
    position: absolute;
    z-index: 5;
    pointer-events: none;
}

.hud-corner::before,
.hud-corner::after {
    content: '';
    position: absolute;
    background: rgba(0, 229, 255, 0.2);
}

/* Top-Left */
.hud-tl {
    top: 10px;
    left: 12px;
}
.hud-tl::before {
    width: 22px; height: 1px;
    top: 0; left: 0;
}
.hud-tl::after {
    width: 1px; height: 22px;
    top: 0; left: 0;
}

/* Top-Right */
.hud-tr {
    top: 10px;
    right: 12px;
}
.hud-tr::before {
    width: 22px; height: 1px;
    top: 0; right: 0;
}
.hud-tr::after {
    width: 1px; height: 22px;
    top: 0; right: 0;
}

/* Bottom-Left */
.hud-bl {
    bottom: 10px;
    left: 12px;
}
.hud-bl::before {
    width: 22px; height: 1px;
    bottom: 0; left: 0;
}
.hud-bl::after {
    width: 1px; height: 22px;
    bottom: 0; left: 0;
}

/* Bottom-Right */
.hud-br {
    bottom: 10px;
    right: 12px;
}
.hud-br::before {
    width: 22px; height: 1px;
    bottom: 0; right: 0;
}
.hud-br::after {
    width: 1px; height: 22px;
    bottom: 0; right: 0;
}

.hud-coord {
    font-family: 'Fira Code', monospace;
    font-size: 0.55rem;
    color: rgba(0, 229, 255, 0.25);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
    padding: 3px 6px;
    white-space: nowrap;
    transition: color 0.5s ease;
    /* Animación de parpadeo de datos sutil */
    animation: hudFlicker 8s infinite alternate;
}

.hud-tl .hud-coord { text-align: left; padding-left: 6px; padding-top: 4px; animation-delay: 0s; }
.hud-tr .hud-coord { text-align: right; padding-right: 6px; padding-top: 4px; animation-delay: 1.8s; }
.hud-bl .hud-coord { text-align: left; padding-left: 6px; padding-bottom: 4px; animation-delay: 3.5s; }
.hud-br .hud-coord { text-align: right; padding-right: 6px; padding-bottom: 4px; animation-delay: 5.2s; }

@keyframes hudFlicker {
    0%, 100% { opacity: 1; filter: brightness(1); }
    32% { opacity: 1; filter: brightness(1); }
    33% { opacity: 0.65; filter: brightness(0.8); }
    34% { opacity: 0.95; filter: brightness(0.95); }
    35% { opacity: 0.4; filter: brightness(0.6); }
    36% { opacity: 1; filter: brightness(1); }
    70% { opacity: 1; filter: brightness(1); }
    71% { opacity: 0.7; filter: brightness(0.85); }
    72% { opacity: 1; filter: brightness(1); }
}

.search-panel:hover .hud-coord {
    color: rgba(0, 229, 255, 0.4);
}

.search-panel:hover .hud-corner::before,
.search-panel:hover .hud-corner::after {
    background: rgba(0, 229, 255, 0.35);
}

.search-box-wrapper { margin-bottom: 2rem; }

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    overflow: hidden; /* Contener la línea láser */
}

/* Pseudo-elemento: Línea Láser de Escaneo de Datos */
.search-input-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 229, 255, 0.0) 40%,
        rgba(0, 229, 255, 0.12) 48%,
        rgba(0, 240, 255, 0.25) 50%,
        rgba(0, 229, 255, 0.12) 52%,
        rgba(0, 229, 255, 0.0) 60%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Activar animación de escaneo láser */
.search-input-container.scanning::after {
    opacity: 1;
    animation: laserScan 0.8s ease-in-out forwards;
}

/* Activar animación de escaneo láser en bucle rápido */
.search-input-container.scanning-loop::after {
    opacity: 1;
    animation: laserScan 0.6s linear infinite;
}

/* Efecto fade-in para la tarjeta de acceso restringido */
.fade-in-restricted {
    animation: fadeInRestricted 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes laserScan {
    0%   { left: -100%; }
    100% { left: 100%; }
}

@keyframes fadeInRestricted {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 4px 24px rgba(0, 229, 255, 0.12);
    background: rgba(5, 5, 5, 0.7);
}

.search-icon {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    margin-right: 1rem;
    transition: color 0.3s;
}
.search-input-container:focus-within .search-icon {
    color: var(--primary);
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.15rem;
    font-family: 'Outfit', sans-serif;
    outline: none;
    padding: 0.85rem 0;
    font-weight: 400;
}

#search-input::placeholder { 
    color: #475569; 
    font-weight: 300;
}

.glow-button {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 1rem 2.25rem;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* Efecto de emisión de luz propia constante */
    box-shadow: 
        0 0 12px rgba(0, 229, 255, 0.4),
        0 0 20px rgba(0, 229, 255, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.glow-button:hover {
    transform: translateY(-2px);
    background: #33eaff;
    /* Brillo intensificado de neón */
    box-shadow:
        0 0 22px rgba(0, 240, 255, 0.8),
        0 0 40px rgba(0, 240, 255, 0.35),
        0 6px 15px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.glow-button:active {
    transform: translateY(0px) scale(0.97);
    box-shadow: 
        0 0 10px rgba(0, 240, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

/* CONTROLES Y FILTROS */
.controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.control-group { display: flex; align-items: center; gap: 1.25rem; }
.group-label { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }

.filter-chips { display: flex; gap: 0.75rem; }

.chip {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 500;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chip:hover { 
    border-color: rgba(255, 255, 255, 0.3); 
    color: white;
    background: rgba(255, 255, 255, 0.03);
}

.chip.active {
    background: var(--primary-dim);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow:
        0 0 10px rgba(0, 229, 255, 0.15),
        inset 0 0 12px rgba(0, 229, 255, 0.05);
    animation: chipGlow 2s ease-in-out infinite;
}

@keyframes chipGlow {
    0%, 100% {
        box-shadow:
            0 0 8px rgba(0, 229, 255, 0.12),
            inset 0 0 10px rgba(0, 229, 255, 0.04);
        border-color: var(--primary);
    }
    50% {
        box-shadow:
            0 0 16px rgba(0, 229, 255, 0.25),
            inset 0 0 16px rgba(0, 229, 255, 0.08);
        border-color: #33eaff;
    }
}

/* ESTADO DE CARGA */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 229, 255, 0.1);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    margin-bottom: 1.5rem;
}

/* ESTADÍSTICAS Y BOTÓN EXPORTAR — Premium Glassmorphism */
.stats-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.12);
    border-top: 1px solid rgba(16, 185, 129, 0.18);
    padding: 1.25rem 2rem;
    border-radius: 16px;
    box-shadow:
        0 6px 24px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(16, 185, 129, 0.03);
    animation: fadeIn 0.4s ease-out;
}

.stats-highlight { 
    color: var(--success); 
    font-weight: 600; 
    font-size: 1.15rem; 
    font-family: 'Fira Code', monospace;
}

.export-btn {
    background: transparent;
    border: 1px solid var(--success);
    color: var(--success);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}
.export-btn:hover { 
    background: var(--success); 
    color: var(--bg-dark); 
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}

/* TARJETAS DE RESULTADOS (DISEÑO LIMPIO Y TABULAR) */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.result-card:hover {
    background: rgba(12, 12, 12, 0.7);
    border-color: rgba(0, 229, 255, 0.15);
    transform: translateY(-4px);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.55),
        0 0 40px rgba(0, 229, 255, 0.04);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.url-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.url-text {
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.data-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.data-label {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 60px;
}

.data-value { 
    color: var(--text-main);
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    flex: 1; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.data-value.password { 
    color: var(--primary);
    font-weight: 500;
}

.action-icon {
    cursor: pointer;
    color: #475569;
    transition: all 0.2s ease;
    margin-left: 0.75rem;
    flex-shrink: 0;
    opacity: 0; /* Oculto por defecto para limpieza visual */
}
.result-card:hover .action-icon {
    opacity: 1; /* Revelado on hover */
}
.action-icon:hover { 
    color: var(--primary);
    transform: scale(1.1);
}

/* NOTIFICACIONES TOAST */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1000;
}

.toast {
    background: #0f172a;
    border: 1px solid var(--primary);
    color: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-error { border-color: var(--error); }

/* =========================================================
   VENTANA MODAL PRO
   ========================================================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #0b0f15;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    width: 95%;
    max-width: 440px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-input-group {
    margin-bottom: 2rem;
    text-align: left;
}

.modal-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.modal-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    outline: none;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.modal-input:focus {
    border-color: var(--primary);
}

/* Barra de carga */
.progress-container { margin: 2rem 0; text-align: left; }
.progress-bar-bg {
    width: 100%; height: 6px; background: #1e293b; border-radius: 10px; overflow: hidden;
}
.progress-bar-fill {
    height: 100%; width: 0%; background: var(--primary); border-radius: 10px; transition: width 0.2s ease;
}
.progress-status {
    display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem;
}

.modal-buttons {
    display: flex; gap: 1rem; justify-content: flex-end;
}

.modal-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    outline: none;
    font-family: 'Outfit', sans-serif;
}

.modal-btn-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}
.modal-btn-cancel:hover { background: rgba(255, 255, 255, 0.05); color: white; }

.modal-btn-action {
    background: var(--primary);
    border: none;
    color: #000;
}
.modal-btn-action:hover { background: #33eaff; }

.success-checkmark {
    width: 64px; height: 64px; border-radius: 50%;
    background: rgba(16, 185, 129, 0.1); border: 2px solid var(--success);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem auto; color: var(--success); font-size: 2rem;
    animation: popCheck 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popCheck { 0% { transform: scale(0); } 100% { transform: scale(1); } }

/* UTILIDADES Y ANIMACIONES */
.hidden { display: none !important; }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 768px) {
    .app-container { padding: 1.5rem 1rem; }
    .search-panel { padding: 1.5rem; }
    .search-input-container { flex-direction: column; padding: 1rem; }
    #search-input { width: 100%; margin-bottom: 1rem; }
    .glow-button { width: 100%; padding: 0.85rem; }
    .controls-wrapper { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .logo-title { font-size: 1.8rem; }
    .results-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   PÁGINA DE LOGIN MISTERIOSA Y PREMIUM (CYBERPUNK TERMINAL)
   ========================================================= */
.login-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    padding: 2rem;
    position: relative;
    z-index: 100;
    animation: fadeIn 1s ease-out;
}

.login-card-mysterious {
    background: rgba(4, 6, 9, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    padding: 3rem;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 229, 255, 0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-card-mysterious::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.glow-lock-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    color: var(--primary);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.1);
    animation: pulseGlow 3s infinite ease-in-out;
}

.glow-lock-icon svg {
    width: 32px;
    height: 32px;
}

.terminal-text-container {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    text-align: left;
    color: var(--text-muted);
    line-height: 1.6;
}

.term-prompt {
    color: var(--primary);
    margin-right: 0.5rem;
}

.term-status-error {
    color: var(--error);
    font-weight: 700;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    animation: flicker 1.5s infinite;
}

.mysterious-title {
    font-family: 'Space Grotesk', 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.mysterious-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.telegram-widget-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.telegram-widget-wrapper:hover {
    border-color: var(--border-glow);
    background: rgba(0, 229, 255, 0.02);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.05);
}

.key-login-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto;
}

#web-access-key-input {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 4px;
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
    padding: 0.8rem;
    text-align: center;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

#web-access-key-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
    background: rgba(0, 0, 0, 0.8);
}

#submit-key-btn {
    width: 100%;
    padding: 0.8rem;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.login-footer-terminal {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    margin-top: 1rem;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 25px rgba(0, 229, 255, 0.1);
        border-color: rgba(0, 229, 255, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 35px rgba(217, 70, 239, 0.2);
        border-color: rgba(217, 70, 239, 0.3);
        color: var(--accent);
    }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}


/* =========================================================
   NAVEGACIÓN POR PESTAÑAS (TABS)
   ========================================================= */
.tabs-nav {
    display: flex;
    justify-content: flex-start;
    gap: 0.5rem;
    margin: 1.5rem 0 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: rgba(0, 229, 255, 0.03);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

/* Iconos vectoriales minimalistas */
.tab-icon-svg, 
.chip-icon-svg {
    width: 15px;
    height: 15px;
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
    fill: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover .tab-icon-svg,
.tab-btn.active .tab-icon-svg,
.chip:hover .chip-icon-svg,
.chip.active .chip-icon-svg {
    transform: scale(1.15);
}

/* PANES DE CONTENIDO DE LAS PESTAÑAS */
.tab-pane {
    animation: fadeIn 0.4s ease forwards;
}

.tab-pane.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* GENERAL PANELS CARD — Premium Glassmorphism */
.panel-card {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    padding: 2rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(0, 229, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    margin-bottom: 2rem;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.panel-card:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(0, 229, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.section-title {
    font-family: 'Space Grotesk', 'Outfit', sans-serif;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.subsection-title {
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

/* =========================================================
   PROGRAMA DE AFILIADOS
   ========================================================= */
.ref-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.ref-stat-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ref-stat-value {
    font-family: 'Fira Code', monospace;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

.ref-stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group-premium {
    margin-bottom: 2rem;
}

.input-label-premium {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.copy-input-container {
    display: flex;
    gap: 10px;
}

.copy-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    padding: 0.8rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.copy-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

/* LISTA DE HITOS */
.milestones-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.milestone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.milestone-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.milestone-name {
    color: white;
    font-weight: bold;
}

.milestone-reward {
    color: var(--primary);
}

.milestone-status {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.milestone-status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.milestone-status.claimed {
    background: rgba(16, 185, 129, 0.25);
    color: var(--success);
    border: 1px solid var(--success);
}

.milestone-status.locked {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

/* =========================================================
   TOP 10 OPERADORES
   ========================================================= */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.hacker-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    text-align: left;
}

.hacker-table th, .hacker-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hacker-table th {
    color: var(--accent);
    font-weight: bold;
    border-bottom: 2px solid rgba(217, 70, 239, 0.2);
    text-transform: uppercase;
}

.hacker-table tbody tr {
    transition: background 0.2s ease;
}

.hacker-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.hacker-table tr.top-rank-1 {
    background: rgba(251, 191, 36, 0.05);
}
.hacker-table tr.top-rank-1 td:first-child {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.hacker-table tr.top-rank-2 {
    background: rgba(156, 163, 175, 0.03);
}
.hacker-table tr.top-rank-2 td:first-child {
    color: #9ca3af;
}

.hacker-table tr.top-rank-3 {
    background: rgba(217, 119, 6, 0.03);
}
.hacker-table tr.top-rank-3 td:first-child {
    color: #d97706;
}

/* =========================================================
   TABLA DE PRECIOS
   ========================================================= */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.price-card {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Plan Básico */
.price-card.basic {
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-top: 1px solid rgba(0, 229, 255, 0.25);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 229, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.price-card.basic:hover {
    border-color: rgba(0, 229, 255, 0.35);
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 229, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Plan Premium (Recomendado) - Sobresale y destaca en cian brillante */
.price-card.popular {
    border: 1.5px solid rgba(0, 229, 255, 0.55);
    border-top: 1.5px solid rgba(0, 229, 255, 0.85);
    transform: scale(1.05) translateY(-4px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(0, 229, 255, 0.18),
        inset 0 0 15px rgba(0, 229, 255, 0.05);
    z-index: 2;
}

.price-card.popular:hover {
    transform: scale(1.06) translateY(-9px);
    border-color: rgba(0, 229, 255, 0.85);
    box-shadow: 
        0 18px 50px rgba(0, 0, 0, 0.7),
        0 0 45px rgba(0, 229, 255, 0.25),
        inset 0 0 20px rgba(0, 229, 255, 0.08);
}

/* Plan Pro - Azul Eléctrico */
.price-card.pro {
    border: 1px solid rgba(0, 91, 234, 0.35);
    border-top: 1px solid rgba(0, 198, 251, 0.55);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 91, 234, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.price-card.pro:hover {
    border-color: rgba(0, 198, 251, 0.65);
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(0, 91, 234, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Plan Ilimitado - Morado / Magenta neón */
.price-card.unlimited {
    border: 1px solid rgba(217, 70, 239, 0.35);
    border-top: 1px solid rgba(217, 70, 239, 0.65);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(217, 70, 239, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.price-card.unlimited:hover {
    border-color: rgba(217, 70, 239, 0.65);
    transform: translateY(-5px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.6),
        0 0 40px rgba(217, 70, 239, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.price-badge {
    position: absolute;
    top: 12px;
    right: -32px;
    background: var(--primary);
    color: var(--bg-dark);
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 4px 35px;
    transform: rotate(45deg);
    font-family: 'Fira Code', monospace;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.price-card.unlimited .price-badge {
    background: var(--accent);
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.3);
}

.price-card.pro .price-badge {
    background: #005bea;
    color: white;
    box-shadow: 0 0 10px rgba(0, 91, 234, 0.3);
}

.price-card.basic .price-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    box-shadow: none;
}

.price-title {
    font-family: 'Fira Code', monospace;
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1.5rem;
}

.price-values {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.price-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.price-amount {
    font-family: 'Space Grotesk', 'Outfit', sans-serif;
    font-size: 1.55rem;
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.price-qty {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
}

.price-card.pro .price-qty {
    color: #00c6fb;
}

.price-card.unlimited .price-qty {
    color: var(--accent);
}

.price-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.price-features li {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Ocultar check original de ::before */
.price-features li::before {
    display: none !important;
}

/* Icono SVG de check vectorial */
.check-icon-svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.price-card.basic .check-icon-svg {
    stroke: rgba(0, 229, 255, 0.5);
}

.price-card.popular .check-icon-svg {
    stroke: var(--primary);
    filter: drop-shadow(0 0 3px rgba(0, 229, 255, 0.4));
}

.price-card.pro .check-icon-svg {
    stroke: #00c6fb;
    filter: drop-shadow(0 0 3px rgba(0, 198, 251, 0.3));
}

.price-card.unlimited .check-icon-svg {
    stroke: var(--accent);
    filter: drop-shadow(0 0 3px rgba(217, 70, 239, 0.4));
}

.pricing-btn {
    margin-top: auto;
    text-align: center;
    display: block;
    width: 100%;
    text-decoration: none !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto shine para la tarjeta Premium */
.price-card.popular .pricing-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -150%;
    width: 60px;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 30%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0.4) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    animation: buttonShine 3s infinite linear;
    pointer-events: none;
}

@keyframes buttonShine {
    0% {
        left: -150%;
    }
    12% {
        left: 150%;
    }
    100% {
        left: 150%;
    }
}

/* Hover interactivo y escalado suave por tarjeta */
.price-card.basic .pricing-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(200, 200, 200, 0.8) 100%) !important;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.6), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: scale(1.04) translateY(-1px);
}

.price-card.popular .pricing-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #008ba3 100%) !important;
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.8), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: scale(1.04) translateY(-1px);
}

.price-card.pro .pricing-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #005bea 100%) !important;
    box-shadow: 0 0 25px rgba(0, 91, 234, 0.7), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: scale(1.04) translateY(-1px);
}

.price-card.unlimited .pricing-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #d946ef 100%) !important;
    box-shadow: 0 0 25px rgba(217, 70, 239, 0.7), 0 4px 15px rgba(0, 0, 0, 0.4);
    transform: scale(1.04) translateY(-1px);
}

.pricing-footer {
    text-align: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* =========================================================
   PERFIL DE USUARIO CENTRALIZADO Y PREMIUM
   ========================================================= */
.auth-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(11, 15, 21, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 229, 255, 0.05);
    transition: all 0.3s ease;
}

.user-profile-badge:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 229, 255, 0.15);
    transform: translateY(-2px);
}

.user-profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 8px; /* Diseño Cuadrado con bordes suaves */
    border: 1px solid var(--primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
    object-fit: cover;
    transition: all 0.3s ease;
}

.user-profile-badge:hover .user-profile-avatar {
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
    transform: scale(1.05);
}

.user-profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 130px;
    overflow: hidden;
}

.user-profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile-tokens {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile-tokens span {
    color: var(--primary);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.logout-button {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--error);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Fira Code', monospace;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-left: 8px;
}

.logout-button:hover {
    background: var(--error);
    color: #000;
    border-color: var(--error);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

/* Tarjeta de Saldo Insuficiente — Glassmorphism + Resplandor Coral */
.insufficient-credits-card {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 107, 107, 0.12);
    border-top: 1px solid rgba(255, 107, 107, 0.18);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    text-align: center;
    margin: 2rem auto;
    max-width: 520px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(255, 107, 107, 0.03),
        inset 0 0 40px rgba(255, 107, 107, 0.04),
        inset 0 0 80px rgba(255, 80, 80, 0.02);
}

.insufficient-credits-card:hover {
    border-color: rgba(255, 107, 107, 0.25);
    transform: translateY(-3px);
    box-shadow:
        0 14px 44px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 107, 107, 0.06),
        inset 0 0 50px rgba(255, 107, 107, 0.06),
        inset 0 0 100px rgba(255, 80, 80, 0.03);
}

/* Icono de Escudo Digital SVG */
.insufficient-credits-card .warning-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.06);
    border: 1px solid rgba(255, 107, 107, 0.15);
    box-shadow: 0 0 25px rgba(255, 107, 107, 0.08);
    animation: shieldPulse 2.5s ease-in-out infinite;
}

.insufficient-credits-card .warning-icon svg {
    width: 34px;
    height: 34px;
}

.insufficient-credits-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Fira Code', monospace;
    letter-spacing: 1px;
    color: #ff6b6b;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 15px rgba(255, 107, 107, 0.2);
}

.insufficient-credits-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 400px;
}

/* Contenedor de botones */
.insufficient-credits-card .recharge-buttons {
    display: flex;
    gap: 14px;
    margin-top: 0.5rem;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

/* Botones RECARGAR con degradado animado */
.insufficient-credits-card .warning-btn {
    background: linear-gradient(
        135deg,
        #ff416c 0%,
        #ff4b2b 25%,
        #ff6b6b 50%,
        #ff4b2b 75%,
        #ff416c 100%
    ) !important;
    background-size: 300% 300% !important;
    animation: gradientShift 4s ease-in-out infinite !important;
    border: none !important;
    color: white !important;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 4px 20px rgba(255, 75, 43, 0.25) !important;
    padding: 12px 24px !important;
    border-radius: 10px !important;
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.insufficient-credits-card .warning-btn.admin-btn {
    background: linear-gradient(
        135deg,
        #00c6fb 0%,
        #005bea 25%,
        #00a8ff 50%,
        #005bea 75%,
        #00c6fb 100%
    ) !important;
    background-size: 300% 300% !important;
    box-shadow: 0 4px 20px rgba(0, 168, 255, 0.2) !important;
}

.insufficient-credits-card .warning-btn:hover {
    transform: translateY(-2px) scale(1.03) !important;
    box-shadow: 0 6px 30px rgba(255, 75, 43, 0.45) !important;
}

.insufficient-credits-card .warning-btn.admin-btn:hover {
    box-shadow: 0 6px 30px rgba(0, 168, 255, 0.4) !important;
}

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

@keyframes shieldPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 107, 107, 0.08);
        border-color: rgba(255, 107, 107, 0.15);
    }
    50% {
        transform: scale(1.06);
        box-shadow: 0 0 35px rgba(255, 107, 107, 0.15);
        border-color: rgba(255, 107, 107, 0.3);
    }
}

/* Tarjeta de Confirmación de Créditos */
.confirmation-card {
    border: 1px solid rgba(217, 70, 239, 0.25) !important;
    border-top: 1.5px solid rgba(217, 70, 239, 0.55) !important;
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 35px rgba(217, 70, 239, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
    max-width: 420px !important;
}

/* Estilos de Botones de Gestión de API Key */
.api-action-btn {
    transition: color 0.2s ease, transform 0.1s ease;
}
.api-action-btn:hover {
    color: var(--primary) !important;
    transform: scale(1.15);
}
.api-action-btn svg {
    vertical-align: middle;
}

/* =========================================================
   CYBERPUNK SWITCH (PRUEBA GRATIS OPCIONAL)
   ========================================================= */
.cyber-switch-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-family: 'Space Grotesk', 'Fira Code', monospace;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    user-select: none;
    margin-left: 0.2rem;
}

.cyber-switch-label:hover {
    color: var(--text-main);
}

.cyber-switch-label input {
    display: none;
}

.cyber-switch {
    width: 38px;
    height: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    position: relative;
    margin-right: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

.cyber-switch::after {
    content: '';
    width: 12px;
    height: 12px;
    background: #64748b; /* gris neutro muted */
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cyber-switch-label input:checked + .cyber-switch {
    background: rgba(0, 229, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.cyber-switch-label input:checked + .cyber-switch::after {
    background: var(--primary);
    transform: translateX(20px);
    box-shadow: 0 0 6px var(--primary);
}

.cyber-switch-text {
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* Estado bloqueado/opacado del switch (para profundidades incompatibles) */
.cyber-switch-label.disabled {
    opacity: 0.25;
    pointer-events: none;
    cursor: not-allowed;
}
.cyber-switch-label.disabled .cyber-switch::after {
    background: #334155;
}

