/* ============================================================
   VERIFÍCALO — DARK FORTRESS DESIGN 2025
   Diseño: Glassmorphism extremo · Neon · Premium Dark
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    /* Neon Palette */
    --cyan:       #00E5FF;
    --cyan-dim:   rgba(0, 229, 255, 0.15);
    --cyan-glow:  rgba(0, 229, 255, 0.35);
    --violet:     #7B61FF;
    --violet-dim: rgba(123, 97, 255, 0.15);

    /* Status Colors */
    --danger:   #FF3B55;
    --danger-dim: rgba(255, 59, 85, 0.18);
    --danger-glow: rgba(255, 59, 85, 0.4);
    --success:  #00FF88;
    --success-dim: rgba(0, 255, 136, 0.15);
    --warning:  #FFB800;
    --warning-dim: rgba(255, 184, 0, 0.15);
    --whatsapp: #25D366;

    /* Dark Surfaces */
    --bg:       #080C18;
    --surface:  rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.07);
    --surface-hover: rgba(255, 255, 255, 0.09);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-border-bright: rgba(255, 255, 255, 0.18);

    /* Text */
    --text:           #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-muted:     rgba(255, 255, 255, 0.35);

    /* Shadows */
    --glow-cyan:   0 0 24px rgba(0, 229, 255, 0.4);
    --glow-danger: 0 0 24px rgba(255, 59, 85, 0.45);
    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.06);
    --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.7);

    /* Shapes */
    --radius-sm: 8px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Motion */
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

/* ============================================================
   BODY — FONDO DINÁMICO CON ORBES NEON
   ============================================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 55% 45% at 12% 18%,  rgba(0, 229, 255, 0.09)  0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 88% 78%,  rgba(123, 97, 255, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 35% 30% at 55% 45%,  rgba(0, 229, 255, 0.04)  0%, transparent 55%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    padding-top: 52px !important;
}

/* ============================================================
   BARRA DE ALERTAS
   ============================================================ */
#alert-bar {
    position: fixed !important;
    top: 0; left: 0; width: 100%;
    z-index: 9999;
    transition: top 0.3s ease-in-out;
}

.alert-bar {
    background: linear-gradient(90deg, #C0392B, var(--danger), #C0392B);
    background-size: 200% 100%;
    animation: alertShift 5s ease-in-out infinite;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    min-height: 44px;
    text-transform: uppercase;
    transition: filter 0.2s;
}

.alert-bar:hover { filter: brightness(1.1); }

.alert-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
    word-wrap: break-word;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.pulsa-aqui {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-weight: 900;
    padding: 2px 10px;
    border-radius: 4px;
    margin-left: 8px;
    font-size: 12px;
    letter-spacing: 1px;
    animation: pulsaAqui 1.2s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes pulsaAqui {
    0%, 100% { background: rgba(255,255,255,0.25); transform: scale(1); }
    50% { background: rgba(255,255,255,0.45); transform: scale(1.05); }
}

/* --- Alert Bar CTA --- */
.alert-live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    margin-right: 10px;
    animation: livePulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,255,255,0.7); }
    50% { opacity: 0.4; box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}

.alert-cta-text {
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.alert-cta-aqui {
    display: inline-block;
    background: #fff;
    color: var(--danger);
    font-weight: 900;
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 4px;
    letter-spacing: 1px;
    margin-left: 10px;
    flex-shrink: 0;
    animation: aquiPulse 2s ease-in-out infinite;
    white-space: nowrap;
    text-decoration: none;
}

@keyframes aquiPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,255,255,0.5); }
    50% { transform: scale(1.05); box-shadow: 0 0 12px 2px rgba(255,255,255,0.3); }
}

/* Responsive alert bar */
@media (max-width: 600px) {
    .alert-cta-text { font-size: 10px; letter-spacing: 0.5px; }
    .alert-cta-aqui { font-size: 10px; padding: 2px 8px; margin-left: 6px; }
}

@keyframes alertShift {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.container {
    max-width: 660px;
    margin: 0 auto;
    padding: 56px 24px 56px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInDown 0.6s ease-out;
}

.logo-container {
    display: inline-block;
    margin-bottom: 22px;
    animation: float 3.5s ease-in-out infinite;
}

.shield-logo {
    width: 140px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 18px var(--cyan-glow)) drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    transition: var(--transition);
}

.shield-logo:hover {
    transform: scale(1.06);
    filter: drop-shadow(0 0 32px var(--cyan-glow)) drop-shadow(0 8px 20px rgba(0,0,0,0.6));
}

.main-title {
    font-size: 58px;
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 14px;
    color: #fff;
    text-shadow: 0 0 60px rgba(0, 229, 255, 0.25);
}

.subtitle {
    font-size: 17px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-9px); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ZONA DE BÚSQUEDA
   ============================================================ */
.search-section {
    animation: fadeInUp 0.6s ease-out 0.15s backwards;
}

.search-box {
    background: var(--surface);
    border-radius: 18px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 18px 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 18px;
}

.search-box:hover {
    border-color: var(--glass-border-bright);
}

.search-box:focus-within {
    border-color: var(--cyan);
    box-shadow: var(--shadow-card), 0 0 0 3px var(--cyan-dim), var(--glow-cyan);
}

.search-input {
    width: 100%;
    border: none;
    outline: none !important;
    font-size: 17px;
    font-family: inherit;
    color: var(--text);
    font-weight: 400;
    resize: none;
    min-height: 26px;
    max-height: 120px;
    overflow-y: auto;
    background: transparent;
    line-height: 1.55;
    padding: 0;
    caret-color: var(--cyan);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ============================================================
   BOTONES DE ACCIÓN
   ============================================================ */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.action-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-spring);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    min-height: 115px;
}

.action-card:hover {
    border-color: var(--cyan);
    background: rgba(0, 229, 255, 0.06);
    box-shadow: 0 0 0 1px var(--cyan), var(--glow-cyan);
    transform: translateY(-4px) scale(1.01);
}

.action-card:active {
    transform: translateY(-1px) scale(0.99);
}

.action-card.active {
    border-color: var(--danger);
    background: var(--danger-dim);
    box-shadow: 0 0 0 1px var(--danger), var(--glow-danger);
}

.action-card.active .action-icon {
    color: var(--danger);
    animation: pulse 1.5s ease-in-out infinite;
}

.action-icon {
    width: 44px;
    height: 44px;
    color: var(--cyan);
    transition: var(--transition);
}

.action-card:hover .action-icon {
    transform: scale(1.12);
    filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.action-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.12); }
}

/* ============================================================
   BOTÓN ANALIZAR — EL BOTÓN QUE LO CAMBIA TODO
   ============================================================ */
.analyze-btn {
    width: 100%;
    background: var(--cyan);
    color: #080C18;
    border: none;
    border-radius: var(--radius-full);
    padding: 18px 36px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.2px;
    cursor: pointer;
    box-shadow: 0 4px 32px var(--cyan-glow), 0 0 0 0 var(--cyan);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
}

.analyze-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 48px rgba(0, 229, 255, 0.6), 0 0 80px rgba(0, 229, 255, 0.2);
    background: #1AECFF;
}

.analyze-btn:active {
    transform: translateY(0);
}

.analyze-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.analyze-btn.loading {
    animation: btnPulse 1.5s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 4px 32px var(--cyan-glow); }
    50%       { box-shadow: 0 4px 56px rgba(0, 229, 255, 0.7); }
}

.btn-icon { width: 20px; height: 20px; }

.analyze-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================================================
   CONTADOR SOCIAL
   ============================================================ */
.social-counter {
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: 18px;
    font-weight: 400;
}

.counter-number {
    font-weight: 800;
    color: var(--cyan);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   ÁREA DE RESULTADOS
   ============================================================ */
.results-area { margin-top: 36px; }
.results-area.hidden { display: none; }

/* Animación de Escaneo */
.scanning-animation {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.4s ease-out;
}

.scanning-animation.hidden { display: none; }

.radar-container {
    position: relative;
    width: 200px;
    height: 240px;
    margin: 0 auto 30px;
    overflow: visible;
}

@keyframes techBreathe {
    0%   {
        transform: scale(1);
        filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.5));
    }
    50%  {
        transform: scale(1.06);
        filter: drop-shadow(0 0 40px rgba(0, 229, 255, 0.9)) drop-shadow(0 0 80px rgba(0, 229, 255, 0.4));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 16px rgba(0, 229, 255, 0.5));
    }
}

.radar-shield {
    width: 100% !important;
    height: 100% !important;
    position: relative;
    animation: techBreathe 3s infinite ease-in-out !important;
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 80px;
    background: linear-gradient(to bottom, var(--cyan), transparent);
    transform-origin: top center;
    transform: translate(-50%, -40%) rotate(0deg);
    animation: sweep 2s linear infinite;
    box-shadow: 0 0 8px var(--cyan);
}

@keyframes sweep {
    0%   { transform: translate(-50%, -40%) rotate(0deg); }
    100% { transform: translate(-50%, -40%) rotate(360deg); }
}

.scan-rings {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.scan-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1.5px solid var(--cyan);
    border-radius: 50%;
    opacity: 0;
    animation: ripple 2s ease-out infinite;
    box-shadow: 0 0 6px var(--cyan-glow);
}

.scan-ring:nth-child(2) { animation-delay: 0.65s; }
.scan-ring:nth-child(3) { animation-delay: 1.3s; }

@keyframes ripple {
    0%   { width: 40px;  height: 40px;  opacity: 0.9; }
    100% { width: 180px; height: 180px; opacity: 0; }
}

.scanning-text {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: -0.2px;
}

.progress-bar {
    width: 100%;
    max-width: 280px;
    height: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--violet), var(--cyan));
    border-radius: var(--radius-full);
    animation: progress 3s ease-out forwards;
    box-shadow: 0 0 8px var(--cyan-glow);
}

@keyframes progress {
    0%   { width: 0%; }
    100% { width: 100%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ============================================================
   TARJETA DE RESULTADO
   ============================================================ */
.result-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
    padding: 40px 32px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    text-align: center;
    animation: scaleIn 0.35s ease-out;
}

.result-card.hidden { display: none; }

.result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 700;
}

.result-icon.safe {
    background: var(--success-dim);
    border: 1.5px solid rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 32px rgba(0, 255, 136, 0.3);
    animation: successPop 0.55s ease-out;
}

.result-icon.danger {
    background: var(--danger-dim);
    border: 1.5px solid rgba(255, 59, 85, 0.4);
    box-shadow: var(--glow-danger);
    animation: shake 0.45s ease-out;
}

.result-icon.warning {
    background: var(--warning-dim);
    border: 1.5px solid rgba(255, 184, 0, 0.4);
    box-shadow: 0 0 24px rgba(255, 184, 0, 0.25);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes successPop {
    0%   { transform: scale(0); }
    55%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-10px); }
    40%       { transform: translateX(10px); }
    60%       { transform: translateX(-6px); }
    80%       { transform: translateX(6px); }
}

.result-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: -0.3px;
}

.result-message {
    font-size: 15.5px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.result-details {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 22px;
    text-align: left;
}

/* Colores de texto para contenido simple (análisis local) */
.result-details p { margin-bottom: 8px; font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.result-details p:last-child { margin-bottom: 0; }
.result-details strong { color: var(--text); font-weight: 600; }

.secondary-btn {
    background: transparent;
    color: var(--cyan);
    border: 1.5px solid rgba(0, 229, 255, 0.4);
    border-radius: var(--radius-full);
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.secondary-btn:hover {
    background: var(--cyan-dim);
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
    color: var(--cyan);
}

/* ============================================================
   BOTÓN DE PÁNICO
   ============================================================ */
.panic-section {
    margin-top: 56px;
    text-align: center;
}

.panic-btn {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1.5px solid rgba(255, 59, 85, 0.35);
    border-radius: var(--radius-full);
    padding: 15px 32px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.2px;
    backdrop-filter: blur(12px);
}

.panic-btn:hover {
    background: rgba(255, 59, 85, 0.3);
    border-color: var(--danger);
    transform: translateY(-2px);
    box-shadow: var(--glow-danger);
    color: #fff;
}

/* ============================================================
   MODAL DE EMERGENCIA
   ============================================================ */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal.hidden { display: none; }

.modal-content {
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-xl);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
    position: relative;
    animation: slideUp 0.3s ease-out;
    backdrop-filter: blur(32px);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    font-size: 22px;
    color: var(--text-muted);
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    background: var(--danger-dim);
    border-color: var(--danger);
    color: var(--danger);
    transform: rotate(90deg);
    box-shadow: var(--glow-danger);
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    padding: 30px 28px 8px;
    letter-spacing: -0.3px;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 28px 22px;
    line-height: 1.5;
}

.emergency-list { padding: 0 20px; }

.emergency-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.emergency-item:hover { background: rgba(255,255,255,0.04); }

.emergency-item strong { color: var(--text); font-size: 14px; font-weight: 600; }

.emergency-phone {
    color: var(--cyan);
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    transition: var(--transition);
    background: var(--cyan-dim);
    padding: 5px 13px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 229, 255, 0.25);
}

.emergency-phone:hover {
    background: rgba(0, 229, 255, 0.2);
    box-shadow: var(--glow-cyan);
    color: #fff;
}

.modal-footer {
    background: rgba(255, 184, 0, 0.07);
    border-top: 1px solid rgba(255, 184, 0, 0.2);
    padding: 16px 28px;
    margin-top: 12px;
    border-bottom-left-radius: var(--radius-xl);
    border-bottom-right-radius: var(--radius-xl);
}

.modal-footer p {
    font-size: 13px;
    color: rgba(255, 184, 0, 0.85);
    margin: 0;
    line-height: 1.5;
}

/* Emergency Modal - Versión expandida */
.emergency-modal-content {
    max-width: 720px;
}

/* Barra de búsqueda dentro del modal */
.emergency-search-box {
    position: relative;
    margin: 0 28px 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.search-icon-mini {
    position: absolute;
    left: 14px;
    top: 11px;
    color: var(--text-muted);
    pointer-events: none;
}

.emergency-search-input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.emergency-search-input::placeholder {
    color: var(--text-muted);
}

.emergency-search-input:focus {
    background: rgba(255,255,255,0.06);
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

/* Tabs de categorías */
/* Selector de categorías (dropdown) */
.emergency-category-selector {
    position: relative;
    padding: 0 28px;
    margin-bottom: 20px;
}

.category-dropdown-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-lg);
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.category-dropdown-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}

.category-dropdown-btn:active {
    transform: scale(0.98);
}

.category-icon {
    font-size: 20px;
    line-height: 1;
}

.category-label {
    flex: 1;
    text-align: left;
    letter-spacing: -0.2px;
}

.dropdown-arrow {
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.category-dropdown-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

/* Menú desplegable */
.category-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 28px;
    right: 28px;
    background: rgba(10, 15, 30, 0.98);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 100;
    overflow: hidden;
    animation: dropdownSlideIn 0.25s ease-out;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-dropdown-menu.hidden {
    display: none;
}

.category-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.category-option:last-child {
    border-bottom: none;
}

.category-option:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

.category-option.active {
    background: var(--cyan-dim);
    color: var(--cyan);
}

.option-icon {
    font-size: 18px;
    line-height: 1;
}

.option-label {
    flex: 1;
    text-align: left;
}

.option-check {
    opacity: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--cyan);
    transition: opacity 0.2s ease;
}

.category-option.active .option-check {
    opacity: 1;
}

/* Contenedor de listas */
.emergency-lists-container {
    position: relative;
    min-height: 300px;
    max-height: 50vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.emergency-lists-container::-webkit-scrollbar {
    width: 6px;
}

.emergency-lists-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.emergency-lists-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.emergency-list {
    display: none;
    padding: 0 20px;
    animation: fadeIn 0.3s ease-out;
}

.emergency-list.active {
    display: block;
}

/* Texto no enlazable */
.emergency-phone-text {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    padding: 5px 13px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Ocultar items cuando no coinciden con búsqueda */
.emergency-item.hidden {
    display: none;
}

/* ============================================================
   TOAST DE VOZ
   ============================================================ */
.voice-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 15, 30, 0.92);
    border: 1px solid var(--glass-border-bright);
    color: var(--text);
    padding: 14px 22px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    z-index: 999;
    animation: slideUpToast 0.3s ease-out;
    white-space: nowrap;
    max-width: 90vw;
    backdrop-filter: blur(20px);
}

.voice-toast.hidden { display: none; }

@keyframes slideUpToast {
    from { opacity: 0; transform: translateX(-50%) translateY(14px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.voice-pulse {
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    animation: pulseDot 1.5s ease-in-out infinite;
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--danger);
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.5); opacity: 0.6; }
}

/* ============================================================
   MODAL DE ALERTAS
   ============================================================ */
.threat-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.threat-modal.hidden { display: none; }

.threat-modal-content {
    background: rgba(10, 15, 30, 0.96);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal);
    max-width: 660px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px 26px 28px;
    animation: modalSlideIn 0.3s ease-out;
    backdrop-filter: blur(32px);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.threat-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 36px; height: 36px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.threat-modal-close:hover {
    background: var(--danger-dim);
    border-color: var(--danger);
    color: var(--danger);
    transform: rotate(90deg);
    box-shadow: var(--glow-danger);
}

.threat-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 8px 0;
    text-align: center;
    letter-spacing: -0.4px;
}

.threat-modal-subtitle {
    font-size: 14.5px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 28px 0;
    line-height: 1.5;
}

.tips-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- Modal Tip Cards (noticias) --- */
.tip-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
    backdrop-filter: blur(16px);
    position: relative;
}

.tip-card:hover {
    border-color: rgba(0, 229, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tip-card-destacada {
    border-color: rgba(0, 229, 255, 0.2);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(123, 97, 255, 0.03));
}

.tip-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tip-fuente-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--cyan);
    background: var(--cyan-dim);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(0, 229, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tip-fecha {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.tip-card-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 12px 0;
    letter-spacing: -0.2px;
    line-height: 1.35;
}

.tip-card-resumen {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 16px 0;
}

.tip-card-resumen .noticia-parrafo {
    margin: 0 0 10px 0;
}

.tip-card-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0 0 14px 0;
}

.tip-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--glass-border);
}

.tip-card-source {
    font-size: 12px;
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--cyan-dim);
    border: 1px solid rgba(0, 229, 255, 0.15);
    transition: var(--transition);
}

.tip-card-source:hover {
    background: rgba(0, 229, 255, 0.2);
    color: #fff;
}

.tip-card-leer-mas {
    font-size: 12px;
    color: var(--violet);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--violet-dim);
    border: 1px solid rgba(123, 97, 255, 0.2);
    transition: var(--transition);
}

.tip-card-leer-mas:hover {
    background: rgba(123, 97, 255, 0.25);
    color: #fff;
}

.tip-card-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--whatsapp);
    text-decoration: none;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    transition: var(--transition);
    margin-left: auto;
}

.tip-card-whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
    color: #fff;
}

.tip-card-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 211, 102, 0.15);
    color: var(--whatsapp);
    border: 1px solid rgba(37, 211, 102, 0.3);
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.tip-card-share:hover {
    background: rgba(37, 211, 102, 0.25);
    border-color: var(--whatsapp);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
    color: #fff;
}

.tip-card-share svg { width: 16px; height: 16px; fill: currentColor; }

.badge-urgencia {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.badge-urgencia.alta {
    background: var(--danger-dim);
    color: var(--danger);
    border: 1px solid rgba(255, 59, 85, 0.3);
}

.badge-urgencia.media {
    background: var(--warning-dim);
    color: var(--warning);
    border: 1px solid rgba(255, 184, 0, 0.3);
}

.badge-urgencia.baja {
    background: var(--cyan-dim);
    color: var(--cyan);
    border: 1px solid rgba(0, 229, 255, 0.3);
}

/* Botón Ver Biblioteca dentro del modal */
.tip-ver-biblioteca {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
}

.tip-ver-biblioteca p {
    display: none;
}

.btn-biblioteca {
    display: inline-block;
    background: var(--surface-2);
    border: 1px solid var(--glass-border-bright);
    color: var(--text);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-biblioteca:hover {
    background: var(--cyan-dim);
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

/* ============================================================
   MENÚ HAMBURGUESA
   ============================================================ */
.menu-trigger {
    position: fixed;
    top: 60px;
    left: 16px;
    z-index: 9999;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius);
    width: 44px; height: 44px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    transition: var(--transition-spring);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.menu-trigger:hover {
    transform: scale(1.06);
    border-color: var(--cyan);
    background: rgba(0, 229, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), var(--glow-cyan);
}

.menu-trigger:active { transform: scale(0.95); }

/* Panel Lateral */
.side-menu {
    position: fixed;
    top: 0; left: -320px;
    width: 300px; height: 100%;
    background: rgba(5, 8, 16, 0.97);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-right: 1px solid var(--glass-border-bright);
    z-index: 10000;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.side-menu.open { left: 0; }

/* Header del menú */
.menu-header {
    padding: 22px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.menu-logo { display: flex; align-items: center; }

.close-menu {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.close-menu:hover { color: var(--text); background: rgba(255,255,255,0.1); }

/* Links del menú */
.menu-items {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 13px 14px;
    border-radius: var(--radius);
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid transparent;
}

.menu-link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text);
    transform: translateX(4px);
    border-color: rgba(255,255,255,0.08);
}

.menu-link.active {
    background: var(--cyan-dim);
    color: var(--cyan);
    font-weight: 700;
    border-color: rgba(0, 229, 255, 0.25);
}

.menu-link.highlight {
    background: rgba(255,255,255,0.07);
    color: var(--text);
    font-weight: 600;
    margin-top: 6px;
    border-color: var(--glass-border);
}

.menu-link.highlight:hover { background: rgba(255,255,255,0.12); }

.menu-link.warning {
    background: var(--danger-dim);
    color: var(--danger);
    font-weight: 600;
    border-color: rgba(255, 59, 85, 0.3);
}

.menu-link.warning:hover {
    background: rgba(255, 59, 85, 0.25);
    color: #fff;
    box-shadow: var(--glow-danger);
}

/* Footer */
.menu-footer {
    margin-top: auto;
    padding: 22px 18px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.menu-footer p { color: var(--text-muted); font-size: 12px; margin: 4px 0; }

.contact-email {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    display: block;
    margin-bottom: 12px;
    transition: var(--transition);
}

.contact-email:hover { color: var(--cyan); }

.version { font-size: 11px !important; opacity: 0.3; }

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.menu-overlay.visible { opacity: 1; visibility: visible; }

/* ============================================================
   TOAST "PRÓXIMAMENTE"
   ============================================================ */
.coming-soon-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 15, 30, 0.95);
    border: 1px solid rgba(0, 229, 255, 0.4);
    color: var(--cyan);
    padding: 15px 26px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-card), var(--glow-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 700;
    z-index: 20000;
    animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    white-space: nowrap;
    max-width: 90vw;
    backdrop-filter: blur(24px);
}

.coming-soon-toast.fade-out {
    animation: toastOut 0.3s ease-out forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(18px) scale(0.9); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    to   { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.95); }
}

/* ============================================================
   BIBLIOTECA — COMPONENTES COMPARTIDOS
   ============================================================ */
/* Header de biblioteca */
.lib-header {
    position: relative;
    padding: 72px 24px 80px;
    text-align: center;
    overflow: hidden;
}

.lib-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 80% at 50% -10%, rgba(0, 229, 255, 0.12) 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 80% 100%, rgba(123, 97, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.lib-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cyan-dim);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--cyan);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 20px;
}

.lib-header h1 {
    font-size: 3.2em;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 16px;
    text-shadow: 0 0 60px rgba(0, 229, 255, 0.15);
}

.lib-header p {
    font-size: 17px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.lib-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    background: var(--surface);
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--glass-border-bright);
    transition: var(--transition);
    backdrop-filter: blur(16px);
    position: relative;
    z-index: 1;
}

.lib-back-btn:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-dim);
    box-shadow: var(--glow-cyan);
}

.lib-back-btn svg {
    width: 18px; height: 18px;
    fill: currentColor;
}

/* Grid de tarjetas */
.scam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 22px;
    padding: 0 24px;
    max-width: 1200px;
    margin: -48px auto 60px;
    position: relative;
    z-index: 10;
}

.scam-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 26px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-spring);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.scam-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
}

.scam-card:hover {
    transform: translateY(-6px);
    border-color: var(--glass-border-bright);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}

.tags-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tag {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid currentColor;
}

.tag-sms   { color: var(--danger);  background: var(--danger-dim);  border-color: rgba(255,59,85,0.3); }
.tag-call  { color: var(--cyan);    background: var(--cyan-dim);    border-color: rgba(0,229,255,0.3); }
.tag-email { color: var(--warning); background: var(--warning-dim); border-color: rgba(255,184,0,0.3); }
.tag-crypto { color: var(--success); background: var(--success-dim); border-color: rgba(0,255,136,0.3); }

.scam-date {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scam-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.25em;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.scam-card p {
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 14.5px;
}

.scam-example {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-family: 'Courier New', 'Consolas', monospace;
    font-size: 13px;
    color: var(--text-secondary);
    border-left: 3px solid var(--cyan);
    box-shadow: inset 0 0 20px rgba(0,229,255,0.02);
}

/* ============================================================
   SECCIÓN NOTICIAS DINÁMICAS (biblioteca.html)
   ============================================================ */
.noticias-section {
    max-width: 800px;
    margin: -48px auto 48px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.noticias-section-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.noticias-section-sub {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

/* --- Tarjetas Compactas Accordion (biblioteca) --- */
.noticia-compact {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-left: 3px solid var(--text-muted);
    border-radius: var(--radius);
    margin-bottom: 8px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: var(--transition);
    overflow: hidden;
}

.noticia-compact:hover {
    border-color: var(--glass-border-bright);
    border-left-color: var(--cyan);
    background: var(--surface-hover);
}

.noticia-compact--destacada {
    border-left-color: var(--danger);
    background: linear-gradient(135deg, rgba(255, 59, 85, 0.03), rgba(123, 97, 255, 0.02));
}

.noticia-compact--open {
    border-color: var(--glass-border-bright);
    border-left-color: var(--cyan);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    background: var(--surface-2);
}

/* --- Header (siempre visible) --- */
.noticia-compact__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    gap: 12px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.noticia-compact__header:hover {
    background: var(--surface-hover);
}

.noticia-compact__left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.noticia-compact__icon {
    flex-shrink: 0;
    font-size: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--surface-2);
}

.noticia-compact__icon.urgencia-alta {
    background: var(--danger-dim);
}

.noticia-compact__icon.urgencia-media {
    background: var(--warning-dim);
}

.noticia-compact__icon.urgencia-baja {
    background: var(--cyan-dim);
}

.noticia-compact__info {
    min-width: 0;
    flex: 1;
}

.noticia-compact__titulo {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.2px;
}

.noticia-compact--open .noticia-compact__titulo {
    -webkit-line-clamp: unset;
    color: var(--cyan);
}

.noticia-compact__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.noticia-compact__fuente {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.noticia-compact__dot {
    font-size: 11px;
    color: var(--text-muted);
}

.noticia-compact__fecha {
    font-size: 11px;
    color: var(--text-muted);
}

.noticia-compact__badge-nueva {
    font-size: 9px;
    font-weight: 800;
    color: #fff;
    background: var(--danger);
    padding: 2px 7px;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    animation: pulseBadge 2s ease-in-out infinite;
    margin-left: 4px;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.noticia-compact__right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.noticia-compact__tap-hint {
    font-size: 11px;
    font-weight: 700;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    transition: var(--transition);
}

.noticia-compact:hover .noticia-compact__tap-hint {
    opacity: 1;
}

.noticia-compact--open .noticia-compact__tap-hint {
    display: none;
}

.noticia-compact__dominio {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.noticia-compact__chevron {
    flex-shrink: 0;
    color: var(--cyan);
    opacity: 0.5;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}

.noticia-compact:hover .noticia-compact__chevron {
    opacity: 1;
}

.noticia-compact--open .noticia-compact__chevron {
    transform: rotate(180deg);
    opacity: 1;
}

/* --- Body (expandible) --- */
.noticia-compact__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.noticia-compact--open .noticia-compact__body {
    grid-template-rows: 1fr;
}

.noticia-compact__body-inner {
    overflow: hidden;
}

.noticia-compact__resumen {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding: 0 16px 4px 64px;
}

.noticia-parrafo {
    margin: 0 0 12px 0;
}

.noticia-parrafo:last-child {
    margin-bottom: 0;
}

.noticia-compact__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 16px 16px 64px;
}

/* --- Botones compartidos --- */
.btn-leer-mas {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: var(--cyan-dim);
    border: 1px solid rgba(0, 229, 255, 0.2);
    transition: var(--transition);
}

.btn-leer-mas:hover {
    background: rgba(0, 229, 255, 0.2);
    border-color: var(--cyan);
    color: #fff;
    box-shadow: var(--glow-cyan);
}

.btn-compartir-noticia {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--whatsapp);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.25);
    transition: var(--transition);
    margin-left: auto;
}

.btn-compartir-noticia:hover {
    background: rgba(37, 211, 102, 0.2);
    border-color: var(--whatsapp);
    box-shadow: 0 0 16px rgba(37, 211, 102, 0.3);
}

.btn-escuchar-noticia {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--violet);
    font-weight: 600;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.25);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-escuchar-noticia:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--violet);
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.3);
}

.btn-escuchar-noticia.tts-activo {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--violet);
    animation: ttsPulse 1.5s ease-in-out infinite;
}

@keyframes ttsPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.6); }
}

/* --- Responsive para móvil --- */
@media (max-width: 480px) {
    .noticia-compact__resumen {
        padding-left: 16px;
    }
    .noticia-compact__actions {
        padding-left: 16px;
    }
}

/* Loading skeleton */
.noticias-loading {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-card {
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    height: 160px;
    position: relative;
    overflow: hidden;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.noticias-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 40px 20px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--glass-border);
}

/* Separador visual entre noticias dinámicas y estáticas */
.biblioteca-separator {
    text-align: center;
    padding: 40px 24px 64px;
    max-width: 800px;
    margin: 0 auto;
}

.biblioteca-separator h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.biblioteca-separator p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Footer CTA biblioteca */
.footer-cta {
    text-align: center;
    padding: 60px 24px 80px;
    color: var(--text-secondary);
}

.footer-cta p {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #080C18;
    background: var(--cyan);
    font-weight: 800;
    text-decoration: none;
    border-radius: var(--radius-full);
    padding: 15px 32px;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 4px 24px var(--cyan-glow);
}

.footer-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 40px rgba(0, 229, 255, 0.6);
    background: #1AECFF;
}

/* ============================================================
   MODAL DE REPORTE DE ESTAFA
   ============================================================ */
.report-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.report-overlay.hidden { display: none; }

.report-modal {
    background: rgba(10, 14, 28, 0.98);
    border: 1px solid var(--glass-border-bright);
    border-bottom: none;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 32px 24px 44px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: var(--shadow-modal);
    position: relative;
    animation: reportSlideUp 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes reportSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
}

.report-close-x {
    position: absolute;
    top: 16px; right: 16px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.report-close-x:hover {
    background: var(--danger-dim);
    color: var(--danger);
    border-color: rgba(255,59,85,0.5);
}

.report-modal-icon {
    font-size: 52px;
    text-align: center;
    margin-bottom: 12px;
}

.report-modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    text-align: center;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.report-modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.55;
}

.report-field {
    margin-bottom: 18px;
}

.report-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.report-field .required { color: var(--danger); }

.report-field textarea,
.report-field input[type="text"],
.report-field input[type="date"] {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    padding: 13px 15px;
    outline: none;
    resize: none;
    transition: var(--transition);
    color-scheme: dark;
}

.report-field textarea { min-height: 100px; }

.report-field textarea:focus,
.report-field input[type="text"]:focus,
.report-field input[type="date"]:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-dim);
}

.report-file-drop {
    background: var(--surface);
    border: 1.5px dashed var(--glass-border-bright);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.report-file-drop:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    background: var(--cyan-dim);
}

.report-error {
    background: var(--danger-dim);
    border: 1px solid rgba(255, 59, 85, 0.4);
    color: var(--danger);
    border-radius: var(--radius);
    padding: 11px 14px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}

.report-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #FF3B55 0%, #CC0022 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: var(--transition-spring);
    box-shadow: 0 4px 24px rgba(255, 59, 85, 0.4);
    margin-top: 8px;
}

.report-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 40px rgba(255, 59, 85, 0.65);
}

.report-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.report-success-icon {
    font-size: 68px;
    text-align: center;
    margin: 8px 0 16px;
    animation: successBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successBounce {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* Confetti */
.confetti-piece {
    position: fixed;
    top: -20px;
    border-radius: 3px;
    z-index: 99999;
    pointer-events: none;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0%   { transform: translateY(0) rotate(0deg);    opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 640px) {
    .container { padding: 44px 16px 40px; }

    .main-title { font-size: 40px; letter-spacing: -1.5px; }
    .subtitle   { font-size: 15px; }
    .shield-logo { width: 110px; }

    .search-box    { padding: 15px 18px; border-radius: 16px; }
    .search-input  { font-size: 16px; }

    .action-buttons { gap: 12px; }
    .action-card    { padding: 18px 14px; min-height: 100px; }
    .action-icon    { width: 38px; height: 38px; }
    .action-label   { font-size: 12.5px; }

    .analyze-btn  { font-size: 14px; padding: 16px 24px; }
    .result-card  { padding: 28px 18px; }
    .result-title { font-size: 22px; }

    .modal-content    { border-radius: var(--radius-lg); }
    .modal-title      { font-size: 19px; padding: 22px 20px 8px; }
    .modal-subtitle,
    .emergency-list,
    .modal-footer     { padding-left: 16px; padding-right: 16px; }
    .emergency-item   { flex-direction: column; align-items: flex-start; gap: 6px; }

    .threat-modal { padding: 10px; }
    .threat-modal-content { padding: 36px 16px 20px; }
    .threat-modal-title   { font-size: 20px; }

    .tip-card         { padding: 16px; }
    .tip-card-title   { font-size: 15px; }
    .tip-card-text    { font-size: 13px; }
    .tip-card-resumen { font-size: 13px; }
    .tip-card-actions { gap: 6px; }
    .tip-card-source, .tip-card-leer-mas, .tip-card-whatsapp { font-size: 11px; padding: 5px 10px; }

    .menu-trigger { top: 58px; left: 12px; }


    .lib-header { padding: 60px 16px 72px; }
    .lib-header h1 { font-size: 2.2em; letter-spacing: -1px; }
    .lib-header p  { font-size: 15px; }

    .scam-grid { grid-template-columns: 1fr; gap: 16px; padding: 0 16px; margin-top: -36px; }

    .noticias-section { padding: 0 16px; margin-top: -36px; }
    .noticia-compact__header { padding: 12px 14px; }
    .noticia-compact__titulo { font-size: 13px; }
    .noticia-compact__resumen { font-size: 13px; padding-left: 16px; }
    .noticia-compact__actions { padding-left: 16px; }
    .btn-compartir-noticia { margin-left: 0; }
}

/* ============================================================
   UTILIDAD GLOBAL
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   ALERTA DE RIESGO EN TIEMPO REAL
   ============================================================ */
.live-threat-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    animation: threatSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.live-threat-alert.level-medium {
    background: rgba(255, 184, 0, 0.08);
    border: 1px solid rgba(255, 184, 0, 0.2);
}

.live-threat-alert.level-high {
    background: rgba(255, 59, 85, 0.08);
    border: 1px solid rgba(255, 59, 85, 0.25);
    animation: threatSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), threatAlertPulse 2s ease-in-out infinite 0.3s;
}

.threat-alert-icon {
    font-size: 1.3em;
    flex-shrink: 0;
    line-height: 1;
}

.threat-alert-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.threat-alert-text {
    font-size: 0.78em;
    font-weight: 600;
    line-height: 1.3;
}

.level-medium .threat-alert-text { color: var(--warning); }
.level-high .threat-alert-text   { color: var(--danger); }

.threat-alert-cta {
    font-size: 0.7em;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.threat-alert-cta strong {
    color: var(--cyan);
    letter-spacing: 0.5px;
}

@keyframes threatSlideIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes threatAlertPulse {
    0%, 100% { border-color: rgba(255, 59, 85, 0.25); box-shadow: none; }
    50%      { border-color: rgba(255, 59, 85, 0.5); box-shadow: 0 0 12px rgba(255, 59, 85, 0.15); }
}

/* Search box cambia de color según el nivel de amenaza */
.search-box.threat-medium {
    border-color: var(--warning) !important;
    box-shadow: var(--shadow-card), 0 0 0 2px rgba(255, 184, 0, 0.18), 0 0 24px rgba(255, 184, 0, 0.15) !important;
}

.search-box.threat-high {
    border-color: var(--danger) !important;
    box-shadow: var(--shadow-card), 0 0 0 2px rgba(255, 59, 85, 0.22), 0 0 28px rgba(255, 59, 85, 0.25) !important;
    animation: dangerBoxPulse 1.5s ease-in-out infinite;
}

@keyframes dangerBoxPulse {
    0%, 100% { box-shadow: var(--shadow-card), 0 0 0 2px rgba(255,59,85,0.22), 0 0 22px rgba(255,59,85,0.2); }
    50%       { box-shadow: var(--shadow-card), 0 0 0 3px rgba(255,59,85,0.35), 0 0 40px rgba(255,59,85,0.35); }
}

/* Botón Pegar y Analizar */
.paste-card {
    position: relative;
    overflow: hidden;
}

.paste-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(123, 97, 255, 0.08));
    opacity: 0;
    transition: opacity 0.25s;
}

.paste-card:hover::before {
    opacity: 1;
}

/* ============================================================
   ESCÁNER QR
   ============================================================ */
.qr-scan-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 24, 0.96);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fadeInUp 0.2s ease-out;
}

.qr-scan-box {
    position: relative;
    width: min(400px, 94vw);
    padding: 28px 22px 24px;
    background: var(--surface);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-modal), 0 0 60px rgba(0, 229, 255, 0.08);
    text-align: center;
}

.qr-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    transition: color 0.2s;
}

.qr-close-btn:hover { color: var(--text); }

.qr-title {
    color: var(--text-secondary);
    font-size: 13.5px;
    margin-bottom: 18px;
    font-weight: 500;
}

.qr-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
}

#qrVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qr-frame {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.qr-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--cyan);
    border-style: solid;
    filter: drop-shadow(0 0 4px var(--cyan));
}

.qr-corner.tl { top: 14px;    left: 14px;    border-width: 3px 0 0 3px; }
.qr-corner.tr { top: 14px;    right: 14px;   border-width: 3px 3px 0 0; }
.qr-corner.bl { bottom: 14px; left: 14px;    border-width: 0 0 3px 3px; }
.qr-corner.br { bottom: 14px; right: 14px;   border-width: 0 3px 3px 0; }

.qr-scan-line {
    position: absolute;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan), 0 0 20px var(--cyan-glow);
    animation: qrLineSweep 2.2s ease-in-out infinite;
    top: 18%;
}

@keyframes qrLineSweep {
    0%   { top: 18%; opacity: 0.7; }
    50%  { top: 76%; opacity: 1; }
    100% { top: 18%; opacity: 0.7; }
}

.qr-status {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s;
}

.qr-status.detected {
    color: var(--success);
    font-weight: 700;
}

/* Botón QR con toque especial */
.qr-card:hover {
    border-color: var(--violet) !important;
    background: rgba(123, 97, 255, 0.07) !important;
    box-shadow: 0 0 0 1px var(--violet), 0 0 20px rgba(123, 97, 255, 0.3) !important;
}

.qr-card:hover .action-icon {
    color: var(--violet) !important;
    filter: drop-shadow(0 0 8px rgba(123, 97, 255, 0.6)) !important;
}


*:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 2px;
    border-radius: 4px;
}
