:root {
    --primary-blue: #365ca8;
    --primary-cyan: #0ea5e9;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.92);
    --border-color: rgba(255, 255, 255, 0.8);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    min-height: 100vh;
    font-family: var(--font-body);
    background: radial-gradient(circle at 50% 25%, #f0f9ff 0%, #e0f2fe 55%, #f8fafc 100%);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Rejilla sutil médica */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(14, 165, 233, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(14, 165, 233, 0.04) 1px, transparent 1px);
    z-index: 0;
    pointer-events: none;
}

/* Resplandores ambientales */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
    animation: floatGlow 12s infinite alternate ease-in-out;
}

.bg-glow-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #0ea5e9 0%, rgba(14, 165, 233, 0) 70%);
    top: -100px;
    right: -80px;
}

.bg-glow-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #365ca8 0%, rgba(54, 92, 168, 0) 70%);
    bottom: -100px;
    left: -80px;
    animation-delay: -6s;
}

@keyframes floatGlow {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-30px) scale(1.08); }
}

/* ==========================================================================
   Efecto Electrocardiograma (ECG)
   ========================================================================== */
.ecg-container {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    height: 180px;
    transform: translateY(-50%);
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.75;
}

.ecg-svg {
    width: 200%;
    height: 100%;
    animation: moveECG 8s linear infinite;
}

/* Línea base estática del ECG */
.ecg-track {
    fill: none;
    stroke: rgba(14, 165, 233, 0.18);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Línea de pulso brillante con efecto de barrido */
.ecg-pulse {
    fill: none;
    stroke: url(#ecgGradient, #0ea5e9);
    stroke: #0ea5e9;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.8));
    stroke-dasharray: 200 400;
    animation: pulseTravel 4s ease-in-out infinite alternate;
}

@keyframes moveECG {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes pulseTravel {
    0% { stroke-dashoffset: 0; opacity: 0.4; }
    50% { opacity: 0.9; }
    100% { stroke-dashoffset: 600; opacity: 0.4; }
}

/* ==========================================================================
   Contenedor y Tarjeta Glassmorphism
   ========================================================================== */
.container {
    width: 100%;
    max-width: 580px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 26px;
    padding: 3.5rem 2.75rem 2.2rem;
    box-shadow: 
        0 20px 50px -15px rgba(30, 58, 138, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo */
.logo-wrapper {
    width: 100%;
    max-width: 380px;
    display: flex;
    justify-content: center;
}

.logo-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(14, 165, 233, 0.08));
}

.divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #365ca8);
    border-radius: 2px;
    margin: 2.2rem 0 1.8rem;
}

/* Contenido */
.message-content {
    margin-bottom: 2rem;
}

.badge-wrapper {
    margin-bottom: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: #0284c7;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #0ea5e9;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
    animation: heartDot 1.6s infinite;
}

@keyframes heartDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.title {
    font-family: var(--font-heading);
    font-size: 2.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.description {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 440px;
}

/* Footer */
.footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 1.4rem;
    width: 100%;
}

.footer p {
    font-size: 0.82rem;
    color: #94a3b8;
}

@media (max-width: 480px) {
    .card {
        padding: 2.5rem 1.5rem 1.8rem;
    }

    .title {
        font-size: 1.7rem;
    }

    .description {
        font-size: 0.95rem;
    }

    .ecg-container {
        height: 120px;
    }
}
