* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;

    background:
        radial-gradient(circle at 70% 20%, #172554 0%, #0b1120 35%, #050816 75%);

    color: white;
}

.topbar {
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 6%;

    border-bottom: 1px solid rgba(255,255,255,0.08);

    background: rgba(5,8,22,0.75);

    backdrop-filter: blur(18px);
}

.logo {
    font-size: 22px;
    font-weight: 800;
}

.topbar-text {
    color: #94a3b8;
    font-size: 14px;
}

.app {
    width: min(1400px, 92%);
    margin: auto;

    padding: 60px 0 80px;
}

.hero {
    display: grid;

    grid-template-columns:
        minmax(320px, 0.85fr)
        minmax(500px, 1.4fr);

    gap: 60px;

    align-items: center;
}

.badge {
    display: inline-block;

    padding: 8px 14px;

    border-radius: 999px;

    background: rgba(59,130,246,0.12);

    border: 1px solid rgba(96,165,250,0.25);

    color: #93c5fd;

    font-size: 13px;
    font-weight: 700;

    margin-bottom: 20px;
}

.hero-text h1 {
    margin: 0;

    font-size: clamp(52px, 6vw, 82px);

    line-height: 0.98;

    letter-spacing: -4px;
}

.hero-text h1 span {
    display: block;

    background: linear-gradient(
        90deg,
        #60a5fa,
        #a78bfa
    );

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    max-width: 540px;

    margin-top: 28px;

    color: #aeb9cc;

    font-size: 18px;

    line-height: 1.7;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-top: 35px;
}

.stat-card {
    padding: 18px;

    border-radius: 18px;

    background: rgba(255,255,255,0.05);

    border: 1px solid rgba(255,255,255,0.08);
}

.stat-card strong {
    display: block;
    font-size: 24px;

    margin-bottom: 5px;
}

.stat-card span {
    color: #8492a8;
    font-size: 12px;
}

.globe-card {
    position: relative;

    height: 620px;

    overflow: hidden;

    border-radius: 32px;

    background:
        radial-gradient(circle at center, #0b1224, #02030a);

    border: 1px solid rgba(255,255,255,0.09);

    box-shadow:
        0 30px 90px rgba(0,0,0,0.5);
}

.globe-title {
    position: absolute;

    left: 0;
    right: 0;
    top: 0;

    z-index: 10;

    height: 64px;

    padding: 0 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background:
        linear-gradient(
            to bottom,
            rgba(5,8,22,0.9),
            transparent
        );

    font-size: 13px;
}

.online-dot {
    width: 9px;
    height: 9px;

    display: inline-block;

    margin-right: 8px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow: 0 0 12px #22c55e;
}

#globeViz {
    width: 100%;
    height: 100%;
}

.legend {
    position: absolute;

    z-index: 10;

    left: 50%;
    bottom: 20px;

    transform: translateX(-50%);

    display: flex;
    gap: 18px;

    padding: 12px 18px;

    border-radius: 999px;

    background: rgba(5,8,22,0.78);

    border: 1px solid rgba(255,255,255,0.08);

    font-size: 13px;
}

.legend div {
    display: flex;
    align-items: center;

    gap: 7px;

    color: #cbd5e1;
}

.dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;
}

.yellow {
    background: #facc15;
}

.blue {
    background: #38bdf8;
}

.red {
    background: #fb5b4b;
}

.emotion-panel {
    margin-top: 70px;

    padding: 45px;

    display: grid;

    grid-template-columns:
        0.8fr
        1.2fr;

    gap: 50px;

    align-items: center;

    border-radius: 28px;

    border: 1px solid rgba(255,255,255,0.08);

    background: rgba(255,255,255,0.04);
}

.small-label {
    color: #60a5fa;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 1.5px;
}

.emotion-panel h2 {
    font-size: 34px;
    margin: 10px 0;
}

.emotion-panel p {
    color: #8997ac;
    line-height: 1.6;
}

.emotion-buttons {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 14px;
}

.emotion {
    display: flex;

    align-items: center;

    gap: 13px;

    min-height: 90px;

    padding: 16px;

    text-align: left;

    border-radius: 20px;

    border: 1px solid rgba(255,255,255,0.09);

    background: rgba(255,255,255,0.05);

    color: white;

    cursor: pointer;

    transition: 0.2s;
}

.emotion:hover {
    transform: translateY(-4px);

    background: rgba(255,255,255,0.09);
}

.emoji {
    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 14px;

    font-size: 25px;
}

.happy .emoji {
    background: rgba(250,204,21,0.16);
}

.sad .emoji {
    background: rgba(56,189,248,0.16);
}

.angry .emoji {
    background: rgba(251,91,75,0.16);
}

.emotion strong {
    display: block;
}

.emotion small {
    display: block;

    margin-top: 4px;

    color: #8592a6;
}

@media (max-width: 900px) {

    .hero {
        grid-template-columns: 1fr;
    }

    .emotion-panel {
        grid-template-columns: 1fr;
    }

    .emotion-buttons {
        grid-template-columns: 1fr;
    }

    .topbar-text {
        display: none;
    }
}
/* ==========================================
   EMOCIÓN SELECCIONADA
   ========================================== */

.emotion.seleccionada {
    transform: translateY(-5px) scale(1.03);

    border-color: rgba(255,255,255,0.45);

    background: rgba(255,255,255,0.13);

    box-shadow:
        0 12px 35px rgba(0,0,0,0.25);
}


/* FELIZ SELECCIONADO */

.happy.seleccionada {
    border-color: rgba(250,204,21,0.7);

    box-shadow:
        0 0 30px rgba(250,204,21,0.18);
}


/* TRISTE SELECCIONADO */

.sad.seleccionada {
    border-color: rgba(56,189,248,0.7);

    box-shadow:
        0 0 30px rgba(56,189,248,0.18);
}


/* ENOJADO SELECCIONADO */

.angry.seleccionada {
    border-color: rgba(251,91,75,0.7);

    box-shadow:
        0 0 30px rgba(251,91,75,0.18);
}
/* ==========================================
   FORMULARIO DE REGISTRO
   ========================================== */

.registro-section {
    margin-top: 70px;
    padding: 42px;

    border-radius: 28px;

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(16px);
}

.registro-intro {
    margin-bottom: 30px;
}

.registro-intro h2 {
    margin: 10px 0 10px;

    font-size: 34px;

    letter-spacing: -1px;
}

.registro-intro p {
    color: #94a3b8;

    line-height: 1.6;
}


/* CAMPOS */

.registro-form {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;

    margin-bottom: 35px;
}

.campo {
    display: flex;

    flex-direction: column;

    gap: 9px;
}

.campo label {
    color: #e2e8f0;

    font-size: 14px;

    font-weight: 700;
}

.campo label span {
    color: #64748b;

    font-weight: 400;
}

.campo input,
.campo select {
    width: 100%;

    height: 52px;

    padding: 0 15px;

    border-radius: 14px;

    border:
        1px solid rgba(255,255,255,0.10);

    background:
        rgba(15,23,42,0.9);

    color: white;

    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.campo input::placeholder {
    color: #64748b;
}

.campo input:focus,
.campo select:focus {
    border-color: #60a5fa;

    box-shadow:
        0 0 0 3px rgba(96,165,250,0.12);
}


/* EMOCIONES */

.seleccion-emocion {
    margin-top: 10px;
}

.seleccion-emocion h3 {
    margin-bottom: 18px;

    font-size: 23px;
}


/* CELULAR */

@media (max-width: 900px) {

    .registro-form {
        grid-template-columns: 1fr;
    }

    .registro-section {
        padding: 28px;
    }
}
/* BOTÓN ENVIAR EMOCIÓN */

.enviar-emocion-box {
    margin-top: 28px;
}

.enviar-emocion {
    width: 100%;
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 12px;

    padding: 16px 24px;

    border: none;
    border-radius: 17px;

    background: linear-gradient(
        90deg,
        #3b82f6,
        #7c3aed
    );

    color: white;

    font-size: 16px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 14px 35px rgba(59,130,246,0.18);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.enviar-emocion:hover {
    transform: translateY(-2px);

    box-shadow:
        0 18px 45px rgba(59,130,246,0.28);
}

.enviar-emocion span {
    font-size: 21px;
}

.mensaje-formulario {
    min-height: 20px;
    margin-bottom: 10px;

    color: #fca5a5;

    font-size: 14px;
}
/* ==========================================
   TARJETA DE REGISTRO EXITOSO
   ========================================== */

.registro-exitoso {
    margin-top: 18px;

    display: flex;
    align-items: center;

    gap: 18px;

    padding: 22px;

    border-radius: 22px;

    background: linear-gradient(
        135deg,
        rgba(34,197,94,0.10),
        rgba(15,23,42,0.92)
    );

    border: 1px solid rgba(74,222,128,0.25);

    box-shadow:
        0 20px 60px rgba(0,0,0,0.25);
}

.registro-check {
    flex-shrink: 0;

    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(34,197,94,0.15);

    border: 1px solid rgba(74,222,128,0.30);

    color: #4ade80;

    font-size: 28px;
    font-weight: 800;
}

.registro-exitoso-texto span {
    color: #4ade80;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.registro-exitoso-texto h3 {
    margin: 5px 0;

    color: white;

    font-size: 20px;
}

.registro-exitoso-texto p {
    margin: 0;

    color: #94a3b8;

    font-size: 14px;
}

.oculto {
    display: none !important;
}
/* FOOTER */

.footer {
    margin-top: 70px;
    padding: 30px 20px;

    text-align: center;

    border-top: 1px solid rgba(255,255,255,0.08);

    color: #64748b;

    font-size: 14px;
}

.footer strong {
    color: #cbd5e1;
}
/* MOTIVOS */

.motivos-box {
    margin-top: 24px;
    padding: 22px;

    border-radius: 20px;

    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.08);
}

.motivos-box h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.motivos-box p {
    margin: 0 0 16px;
    color: #94a3b8;
    font-size: 14px;
}

.motivos-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.motivo-btn {
    padding: 10px 14px;

    border-radius: 999px;

    border: 1px solid rgba(255,255,255,0.10);

    background: rgba(255,255,255,0.05);

    color: #cbd5e1;

    cursor: pointer;
}

.motivo-btn.seleccionado {
    background: rgba(59,130,246,0.16);
    border-color: #60a5fa;
    color: white;
}
/* ACTIVIDAD EN VIVO */

.actividad-section {
    margin-top: 50px;
    padding: 30px;

    border-radius: 24px;

    background: rgba(255,255,255,0.04);

    border: 1px solid rgba(255,255,255,0.08);
}

.actividad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 22px;
}

#contadorActividad {
    color: #64748b;
    font-size: 13px;
}

.actividad-item {
    display: flex;
    align-items: center;

    gap: 14px;

    padding: 16px 0;

    border-bottom:
        1px solid rgba(255,255,255,0.07);
}

.actividad-item:last-child {
    border-bottom: none;
}

.actividad-emoji {
    font-size: 26px;
}

.actividad-item strong {
    display: block;

    color: white;

    margin-bottom: 4px;
}

.actividad-item span {
    color: #94a3b8;

    font-size: 14px;
}

.actividad-vacia {
    color: #64748b;
}
/* ==========================================
   NOTIFICACIÓN EN VIVO SOBRE EL PLANETA
   ========================================== */

.notificacion-en-vivo {
    position: absolute;

    top: 55px;
    left: 50%;

    transform: translateX(-50%);

    z-index: 50;

    width: calc(100% - 60px);
    max-width: 330px;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px 12px;

    border-radius: 16px;

    background: rgba(25, 30, 45, 0.78);

    border: 1px solid rgba(255, 255, 255, 0.12);

    backdrop-filter: blur(20px);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.28);

    opacity: 1;

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}
.notificacion-en-vivo.desapareciendo {
    opacity: 0;

    transform:
        translateX(-50%)
        translateY(-8px);
}

.notificacion-emoji {
    flex-shrink: 0;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: rgba(255,255,255,0.08);

    font-size: 20px;
}


.notificacion-contenido {
    min-width: 0;
    flex: 1;
}


.notificacion-superior {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 4px;
}


.notificacion-superior strong {
    color: white;

    font-size: 13px;
}


.notificacion-superior span {
    color: #94a3b8;

    font-size: 11px;
}


.notificacion-contenido p {
    margin: 0;

    color: #e2e8f0;

    font-size: 14px;

    line-height: 1.4;
}


@keyframes aparecerNotificacion {

    from {
        opacity: 0;

        transform:
            translateX(-50%)
            translateY(-12px);

    }

    to {
        opacity: 1;

        transform:
            translateX(-50%)
            translateY(0);

    }

}
.notificacion-en-vivo.desapareciendo {
    opacity: 0;

    transform:
        translateX(-50%)
        translateY(-8px);
}
/* ==========================================
   AUTOCOMPLETADO DE CIUDAD
   ========================================== */

.ciudad-autocomplete {
    position: relative;
    width: 100%;
}


.sugerencias-ciudad {
    position: absolute;

    top: calc(100% + 8px);
    left: 0;
    right: 0;

    z-index: 100;

    max-height: 260px;
    overflow-y: auto;

    border-radius: 16px;

    background: rgba(16, 22, 36, 0.96);

    border: 1px solid rgba(255, 255, 255, 0.10);

    backdrop-filter: blur(20px);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35);

    padding: 6px;
}


.sugerencia-ciudad {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 3px;

    padding: 11px 12px;

    border: none;
    border-radius: 12px;

    background: transparent;

    color: #ffffff;

    text-align: left;

    cursor: pointer;
}


.sugerencia-ciudad:hover {
    background: rgba(255, 255, 255, 0.07);
}


.sugerencia-ciudad strong {
    font-size: 14px;
    font-weight: 700;
}


.sugerencia-ciudad span {
    font-size: 12px;
    color: #94a3b8;
}


.estado-ciudad {
    min-height: 18px;

    margin: 6px 0 0;

    font-size: 12px;

    color: #94a3b8;
}


.estado-ciudad.ok {
    color: #86efac;
}


.estado-ciudad.error {
    color: #fca5a5;
}
/* ==========================================
   ESTADÍSTICAS DE PAÍSES
   ========================================== */

.stats {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 14px;
}


.stat-ranking {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: flex-start;

    gap: 5px;
}


.stat-ranking small {
    font-size: 10px;

    letter-spacing: 0.08em;

    color: #94a3b8;
}


.stat-ranking strong {
    font-size: 18px;

    line-height: 1.2;
}


.stat-ranking > span:last-child {
    font-size: 14px;

    font-weight: 700;
}


.ranking-icon {
    font-size: 20px;

    margin-bottom: 3px;
}


/* ==========================================
   PANEL DEL PAÍS SOBRE EL PLANETA
   ========================================== */

.panel-pais {
    position: absolute;

    right: 20px;
    bottom: 70px;

    z-index: 45;

    width: 280px;

    padding: 16px;

    border-radius: 18px;

    background:
        rgba(
            15,
            20,
            34,
            0.88
        );

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            0.12
        );

    backdrop-filter:
        blur(22px);

    box-shadow:
        0 18px 45px
        rgba(
            0,
            0,
            0,
            0.35
        );
}


.panel-pais-header {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 12px;

    margin-bottom: 14px;
}


.panel-pais-header h3 {
    margin: 4px 0 0;

    color: white;

    font-size: 20px;
}


.cerrar-panel-pais {
    width: 32px;
    height: 32px;

    border: none;

    border-radius: 10px;

    background:
        rgba(
            255,
            255,
            255,
            0.08
        );

    color: white;

    font-size: 22px;

    cursor: pointer;
}


.cerrar-panel-pais:hover {
    background:
        rgba(
            255,
            255,
            255,
            0.14
        );
}


.panel-pais-total {
    margin-bottom: 15px;

    padding-bottom: 13px;

    border-bottom:
        1px solid
        rgba(
            255,
            255,
            255,
            0.08
        );
}


.panel-pais-total strong {
    display: block;

    color: white;

    font-size: 22px;
}


.panel-pais-total span {
    color: #94a3b8;

    font-size: 11px;
}


.panel-emocion {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 7px 0;

    color: #e2e8f0;

    font-size: 13px;
}


.panel-emocion strong {
    color: white;

    font-size: 14px;
}


/* ==========================================
   MÓVIL
   ========================================== */

@media (max-width: 700px) {

    .stats {
        grid-template-columns:
            1fr;
    }


    .panel-pais {
        left: 12px;
        right: 12px;

        bottom: 65px;

        width: auto;
    }

}