/* --- START OF FILE clima.css --- */

/* Canvas del chart responsivo */
#chartContainer {
    /* Mantenemos solo estilos específicos si los hubiera, 
       la sombra ya está en main_even, pero el ID es útil para JS */
}

#iotChart {
    width: 100%;
    height: 600px;
    /* Altura específica para el gráfico del clima */
}

/* === Layout Específico Clima === */
#info-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    /* Ajustado para convivir con el robot */
}

/* Estilos de los bloques de métricas específicos de clima */
.info-row .info-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.info-row .info-block h1 {
    font-size: 1.6em;
    color: #fff;
    margin: 0;
}

.info-row .info-block h2 {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.info-row .info-block h3 {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.info-row h1 .unit {
    font-size: 0.6em;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
    margin-left: 0.15em;
}


/* =================================================================== */
/* Estilos de Alerta para Métricas (Específico Clima)                  */
/* =================================================================== */

.text-danger {
    color: #ff3e4d !important;
}

.text-info {
    color: #3498db !important;
}

.alert-high {
    border-radius: 12px;
    padding: 0.5em 1em;
    border: 2px solid #ff3e4d;
    background-color: rgba(255, 62, 77, 0.1);
    transition: all 0.3s ease-in-out;
}

.alert-low {
    border-radius: 12px;
    padding: 0.5em 1em;
    border: 2px solid #3498db;
    background-color: rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease-in-out;
}

/* Métrica Destacada (Efecto Resplandor) */
.info-block.featured-metric {
    transform: scale(1.1);
}

.info-block.featured-metric h1 {
    text-shadow: 0 0 6px rgba(28, 180, 149, 0.5);
}

.info-block.featured-metric h2 {
    color: #ffffff;
    font-weight: 700;
}

/* Sub-bloques de Métricas */
.metrics-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.metrics-container>.metric-sub-block:first-child {
    grid-column: 1 / -1;
}

.metrics-container>.metric-sub-block:nth-child(2):last-child {
    grid-column: 1 / -1;
}

.metric-sub-block {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-sub-block h3 {
    text-align: center;
    color: #f5c842;
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sub-block-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
}

@media (max-width: 768px) {
    .metrics-container {
        grid-template-columns: 1fr;
    }
}


/* =================================================================== */
/* FONDO ANIMADO KEN BURNS                                             */
/* =================================================================== */
#bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: #0c0c0c;
}

#bg div {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1);
    z-index: 1;
    transition: opacity 1.5s ease-in-out;
    will-change: transform, opacity;
}

#bg div.visible {
    opacity: 1;
    z-index: 2;
    animation: kenburns 12s linear forwards;
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.18);
    }
}

#bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 3;
    pointer-events: none;
}


/* =================================================================== */
/* TARJETA IA (MeteoBot)                                               */
/* =================================================================== */
#ai-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.info-row.ai-card {
    width: 96%;
    max-width: 1200px;
    border-left: 4px solid #f5c842;
    background: rgba(12, 12, 12, 0.85);
    padding: 0.8rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-height: auto;
    margin-left: auto;
    margin-right: auto;
}

.ai-content {
    width: 100%;
}

.ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(245, 200, 66, 0.3);
    padding-bottom: 0.4rem;
    margin-bottom: 0.6rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: #f5c842;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.ai-icon {
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.ai-time {
    font-size: 0.75rem;
    opacity: 0.7;
    color: #fff;
}

.ai-body p {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e0e0e0;
    margin: 0;
}

.fade-in-down {
    animation: fadeInDown 0.8s ease-out forwards;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-body p::after {
    content: '▋';
    display: inline-block;
    vertical-align: bottom;
    animation: blink 1s step-end infinite;
    color: #f5c842;
    margin-left: 4px;
    font-size: 0.9em;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@media (max-width: 600px) {
    .info-row.ai-card {
        width: 94%;
        padding: 1rem;
    }

    .ai-body p {
        font-size: 0.9rem;
    }
}


/* =================================================================== */
/* ROBOT AVATAR (CSS Puro)                                             */
/* =================================================================== */
.ai-layout {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.bot-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #1a1a1a;
    border: 2px solid #f5c842;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 0 8px rgba(245, 200, 66, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 2px;
    transition: all 0.3s ease;
}

.bot-avatar::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 4px;
    background: #f5c842;
}

.bot-avatar::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #f5c842;
    border-radius: 50%;
    animation: pulseAntenna 2s infinite;
}

.bot-eyes {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
}

.eye {
    width: 6px;
    height: 6px;
    background: #f5c842;
    border-radius: 1px;
    box-shadow: 0 0 4px #f5c842;
    animation: blink 4s infinite;
}

.bot-mouth {
    width: 14px;
    height: 3px;
    background: #f5c842;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Moods Robot */
.bot-avatar.mode-sleep {
    border-color: #555;
    box-shadow: none;
}

.bot-avatar.mode-sleep .eye {
    height: 2px;
    background: #555;
    box-shadow: none;
    animation: none;
    margin-top: 2px;
}

.bot-avatar.mode-sleep .bot-mouth {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #555;
    margin-left: 6px;
}

.bot-avatar.mode-sleep::after {
    animation: none;
    background: #555;
}

.bot-avatar.mode-danger {
    border-color: #ff3e4d;
    box-shadow: 0 0 10px rgba(255, 62, 77, 0.4);
}

.bot-avatar.mode-danger .eye {
    background: #ff3e4d;
    box-shadow: 0 0 4px #ff3e4d;
    height: 3px;
    width: 8px;
    transform: rotate(15deg);
}

.bot-avatar.mode-danger .eye:last-child {
    transform: rotate(-15deg);
}

.bot-avatar.mode-danger .bot-mouth {
    width: 20px;
    height: 8px;
    background: repeating-linear-gradient(90deg, #ff3e4d, #ff3e4d 2px, #000 2px, #000 4px);
    border-radius: 3px;
}

.bot-avatar.mode-danger::after {
    background: #ff3e4d;
    animation: pulseFast 0.5s infinite;
}

.bot-avatar.mode-sad .eye {
    transform: rotate(-10deg);
}

.bot-avatar.mode-sad .eye:last-child {
    transform: rotate(10deg);
}

.bot-avatar.mode-sad .bot-mouth {
    width: 10px;
    height: 3px;
    transform: translateY(1px);
}

/* Crash Mode */
.bot-avatar.mode-crash {
    border-color: #00a8ff !important;
    background: #000044 !important;
    box-shadow: 0 0 15px #00a8ff !important;
    transform: scale(0.95);
}

.bot-avatar.mode-crash .eye {
    background: transparent;
    box-shadow: none;
    width: 8px;
    height: 8px;
    border-radius: 0;
    transform: rotate(0deg);
    animation: none;
}

.bot-avatar.mode-crash .eye::before,
.bot-avatar.mode-crash .eye::after {
    content: '';
    position: absolute;
    background: #00a8ff;
    border-radius: 1px;
}

.bot-avatar.mode-crash .eye::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(45deg);
}

.bot-avatar.mode-crash .eye::after {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%) rotate(-45deg);
}

.bot-avatar.mode-crash .bot-mouth {
    background: #00a8ff;
    width: 18px;
    height: 2px;
    border-radius: 0;
    margin-top: 2px;
}

.bot-avatar.mode-crash::after {
    background: #00a8ff;
    animation: none;
    box-shadow: none;
}

@keyframes pulseAntenna {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 0px #f5c842;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 6px #f5c842;
    }

    100% {
        opacity: 0.5;
        box-shadow: 0 0 0px #f5c842;
    }
}

@keyframes pulseFast {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes blink {

    0%,
    96%,
    98% {
        transform: scaleY(1);
    }

    97%,
    99% {
        transform: scaleY(0.1);
    }
}

@keyframes spinBot {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.bot-spin {
    animation: spinBot 0.5s ease-in-out;
}

@media (max-width: 600px) {
    .ai-layout {
        gap: 0.8rem;
    }
}


/* =================================================================== */
/* GLOSARIO / AYUDA (Botón + Ventana Modal)                            */
/* =================================================================== */
#btnOpenGlossary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    max-width: fit-content;
    height: 34px;
    padding: 0 16px;
    margin: 0 auto 1.5rem auto;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

#btnOpenGlossary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
}

#btnOpenGlossary i {
    font-size: 1.1em;
    margin: 0;
}

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #1b1b1b;
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid #444;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #e0e0e0;
}

.modal-content h2 {
    color: #f5c842;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: left;
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #fff;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    text-align: left;
}

.glossary-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glossary-item h3 {
    color: #1cb495;
    font-size: 1.1em;
    margin: 0 0 0.5rem 0;
    font-weight: bold;
}

.glossary-item span.unit {
    font-size: 0.8em;
    color: #888;
    font-weight: normal;
}

.glossary-item p {
    font-size: 0.9em;
    line-height: 1.4;
    color: #ccc;
    margin: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .modal-content {
        margin: 15% auto;
        width: 95%;
        padding: 1.5rem;
    }

    .glossary-grid {
        grid-template-columns: 1fr;
    }
}


/* =================================================================== */
/* BANNER GEOGRÁFICO (Exclusivo Clima)                                 */
/* =================================================================== */
.geo-capsule {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid #1cb495;
    border-radius: 50px;
    padding: 8px 25px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.geo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: 'Roboto', sans-serif;
}

.geo-item i {
    color: #f5c842;
    font-size: 1em;
}

.geo-divider {
    width: 1px;
    height: 16px;
    background-color: rgba(255, 255, 255, 0.2);
}

.geo-item.coords {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    opacity: 0.8;
}

@media (max-width: 700px) {
    .geo-capsule {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 12px;
        border-radius: 20px;
        width: 95%;
        height: auto;
    }

    .geo-divider {
        display: none;
    }

    .geo-item {
        font-size: 0.85rem;
        justify-content: center;
        text-align: center;
    }

    .geo-item.coords {
        grid-column: 1 / -1;
        font-size: 0.8rem;
        margin-top: 5px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 8px;
        opacity: 0.7;
    }
}


/* =================================================================== */
/* ALERTAS AEMET (Estilo Sci-Fi Warning)                               */
/* =================================================================== */

.aemet-alert-card {
    width: 96%;
    max-width: 900px;
    background: rgba(12, 12, 12, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideInAlert 0.6s ease-out;
}

@keyframes slideInAlert {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Niveles de Riesgo (Bordes y Sombras) */
.aemet-level-amarillo {
    border-left: 4px solid #f1c40f;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.15) inset;
}

.aemet-level-naranja {
    border-left: 4px solid #e67e22;
    box-shadow: 0 0 15px rgba(230, 126, 34, 0.15) inset;
    animation: pulseBorderOrange 3s infinite;
}

.aemet-level-rojo {
    border-left: 4px solid #ff3e4d;
    background: rgba(255, 62, 77, 0.05);
    box-shadow: 0 0 20px rgba(255, 62, 77, 0.2) inset;
    animation: pulseBorderRed 2s infinite;
}

@keyframes pulseBorderOrange {
    0% {
        border-left-color: #e67e22;
    }

    50% {
        border-left-color: #d35400;
    }

    100% {
        border-left-color: #e67e22;
    }
}

@keyframes pulseBorderRed {
    0% {
        border-left-color: #ff3e4d;
        box-shadow: 0 0 20px rgba(255, 62, 77, 0.2) inset;
    }

    50% {
        border-left-color: #c0392b;
        box-shadow: 0 0 30px rgba(255, 62, 77, 0.4) inset;
    }

    100% {
        border-left-color: #ff3e4d;
        box-shadow: 0 0 20px rgba(255, 62, 77, 0.2) inset;
    }
}

/* Header de la Alerta */
.aemet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 0.2rem;
}

.aemet-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aemet-level-amarillo .aemet-title {
    color: #f1c40f;
}

.aemet-level-naranja .aemet-title {
    color: #e67e22;
}

.aemet-level-rojo .aemet-title {
    color: #ff3e4d;
}

/* Cuerpo de la Alerta */
.aemet-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #e0e0e0;
    align-items: center;
}

.aemet-time {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Badges de Zonas */
.aemet-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.3rem;
}

.zone-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Estado Sin Alertas (Clean) */
.aemet-clean {
    background: rgba(28, 180, 149, 0.1);
    border: 1px solid #1cb495;
    border-radius: 50px;
    padding: 6px 20px;
    color: #1cb495;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(28, 180, 149, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 1s ease-in;
}

@media (max-width: 600px) {
    .aemet-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .aemet-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* =================================================================== */
/* JUGUETES INTERACTIVOS V2 (Minijuego Culi-Destroyer)                 */
/* =================================================================== */

/* Contenedor del cohete (Igual que antes, pero aseguramos z-index alto) */
#toy-container {
    position: fixed;
    bottom: 50px;
    right: 30px;
    width: 60px;
    height: 100px;
    z-index: 10000;
    /* Muy por encima */
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.interactive-toy {
    font-size: 2rem;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.3s ease;
    /* Solo transform, no all */
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    z-index: 10001;
}

/* El Cohete */
.toy-rocket {
    color: #e0e0e0;
    transform: rotate(-45deg);
    animation: engineIdle 0.2s infinite alternate;
}

.toy-rocket:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.toy-rocket::after {
    content: '\f06d';
    /* Fuego */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    bottom: -18px;
    left: 4px;
    font-size: 0.6em;
    color: #ff3e4d;
    transform: rotate(45deg);
    opacity: 0.8;
    animation: flameFlicker 0.1s infinite alternate;
    z-index: -1;
}

/* --- OBJETIVOS (CULIS) --- */
.culi-target {
    position: absolute;
    width: 30px;
    /* Tamaño pequeño */
    height: auto;
    z-index: 9998;
    cursor: default;
    /* Animación de entrada suave */
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    /* Para que no interfieran con otros clicks */
}

/* Efecto Explosión */
.culi-explosion {
    position: absolute;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #ffeb3b 0%, #ff9800 40%, transparent 70%);
    border-radius: 50%;
    transform: scale(0);
    z-index: 9999;
    animation: boom 0.4s ease-out forwards;
    pointer-events: none;
}

/* --- ANIMACIONES --- */
@keyframes popIn {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(10deg);
        opacity: 1;
    }
}

@keyframes boom {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Mantenemos las del motor del cohete */
@keyframes engineIdle {
    0% {
        transform: rotate(-45deg) translateY(0px);
    }

    100% {
        transform: rotate(-45deg) translateY(1px);
    }
}

@keyframes flameFlicker {
    0% {
        opacity: 0.6;
        transform: rotate(45deg) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: rotate(45deg) scale(1.1);
    }
}

/* =================================================================== */
/* ROBOT LÁSER (Extensión de Interactive Toys)                         */
/* =================================================================== */

.laser-beam {
    position: absolute;
    height: 4px;
    /* Grosor del rayo */
    background: #ff3e4d;
    /* Color del núcleo (Rojo neón) */
    box-shadow:
        0 0 5px #ff3e4d,
        0 0 10px #ff3e4d,
        0 0 20px #fff;
    /* Brillo exterior */
    transform-origin: 0 50%;
    /* Rotar desde el inicio (el robot) */
    z-index: 9997;
    /* Debajo de la explosión, encima del fondo */
    opacity: 1;
    pointer-events: none;
    animation: laserFlash 0.3s ease-out forwards;
}

@keyframes laserFlash {
    0% {
        opacity: 1;
        width: 0;
    }

    /* Nace del robot */
    20% {
        width: 100%;
        opacity: 1;
    }

    /* Llega al objetivo */
    100% {
        opacity: 0;
        width: 100%;
    }

    /* Se desvanece */
}

/* =================================================================== */
/* CULI DORADO (RAREZA)                                                */
/* =================================================================== */

.culi-target.golden {
    width: 45px !important;
    /* Un poco más grande */
    filter:
        sepia(100%) saturate(1000%) hue-rotate(360deg) brightness(1.2) drop-shadow(0 0 10px #ffd700);
    /* Brillo dorado neón */
    z-index: 9999;
    /* Sobrescribimos la animación para que gire a lo loco */
    animation: popIn 0.3s ease-out, spinCrazy 2s linear infinite !important;
}

@keyframes spinCrazy {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =================================================================== */
/* CULI ANTIMATERIA & AGUJERO NEGRO                                    */
/* =================================================================== */

/* El Culi Malvado/Oscuro */
.culi-target.dark {
    width: 35px !important;
    filter: invert(1) hue-rotate(180deg) drop-shadow(0 0 8px #9c27b0);
    /* Violeta tóxico */
    z-index: 9999;
    animation: popIn 0.3s ease-out, glitchShake 0.2s infinite !important;
}

@keyframes glitchShake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    25% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    50% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    75% {
        transform: translate(3px, 2px) rotate(-1deg);
    }

    100% {
        transform: translate(1px, -1px) rotate(0deg);
    }
}

/* El Agujero Negro (Evento) */
#black-hole {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, #000 0%, #1a0033 40%, #9c27b0 70%, transparent 72%);
    box-shadow: 0 0 50px #9c27b0;
    z-index: 20000;
    /* Encima de TODO */
    pointer-events: none;
    transition: width 0.5s ease-out, height 0.5s ease-out;
}

#black-hole.active {
    width: 100vmax;
    /* Cubre toda la pantalla al expandirse */
    height: 100vmax;
    animation: holeSpin 4s linear infinite;
    opacity: 0.9;
}

@keyframes holeSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Animación de ser absorbido */
.sucked-in {
    transition: all 0.8s cubic-bezier(0.55, 0.055, 0.675, 0.19) !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0) rotate(720deg) !important;
    opacity: 0;
}

/* =================================================================== */
/* SELLO DE EVENTO / BADGE (Esq. Superior Izquierda)                   */
/* =================================================================== */

#eventBadge {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 990;
    /* Por debajo del login (1000) pero encima del resto */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: default;
    transition: all 0.3s ease;
    animation: badgeFadeIn 1s ease-out;

    /* Efecto cristal sutil opcional detrás */
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    border-radius: 12px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#eventBadge:hover {
    transform: scale(1.05);
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.badge-icon i {
    font-size: 2.2rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
    transition: all 0.3s ease;
}

.badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.badge-text span {
    font-family: 'Roboto', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* --- MODO LUTO (Robe / Homenajes) --- */
/* Como el fondo es negro, usamos gris plata/blanco para el lazo */
.event-badge.mode-mourning .badge-icon i {
    color: #d1d1d1;
    /* Gris plata */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.event-badge.mode-mourning .badge-text span {
    color: #e0e0e0;
}

/* --- MODO FIESTA / ANUNCIO (Para el futuro) --- */
.event-badge.mode-party .badge-icon i {
    color: #f5c842;
    /* Dorado CULIverse */
    animation: pulseBadge 2s infinite;
}

.event-badge.mode-party .badge-text span {
    color: #f5c842;
}

/* --- Animaciones --- */
@keyframes badgeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseBadge {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(245, 200, 66, 0.4);
    }

    50% {
        transform: scale(1.1);
        text-shadow: 0 0 15px rgba(245, 200, 66, 0.8);
    }

    100% {
        transform: scale(1);
        text-shadow: 0 0 0 rgba(245, 200, 66, 0.4);
    }
}

/* Ajuste Móvil: Hacerlo más pequeño para no tapar el título */
@media (max-width: 600px) {
    #eventBadge {
        top: 10px;
        left: 10px;
        padding: 6px 10px;
    }

    .badge-icon i {
        font-size: 1.5rem;
    }

    .badge-text span {
        font-size: 0.6rem;
    }
}

/* Animación cuando la música está sonando */
.event-badge.playing {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.event-badge.playing .badge-icon i {
    animation: musicPulse 1.5s infinite ease-in-out;
    color: #fff;
    /* Se ilumina más */
}

@keyframes musicPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

/* =================================================================== */
/* ESTILOS ESPECÍFICOS PARA EL BOTÓN DE RUTAS (En el Login Container)  */
/* =================================================================== */

#btnRutas {
    text-decoration: none;
    /* Quita el subrayado de enlace */
    border: none;
    /* Asegura que no tenga borde extra */
    margin-right: 15px;
    /* Separación con el resto de elementos */
    display: inline-flex;
    /* Asegura alineación correcta */
    align-items: center;
}

/* Pequeño margen entre el icono de la bici y el texto */
#btnRutas span {
    margin-left: 6px;
}

/* Ajustes para móvil: Ocultar el texto para ahorrar espacio */
@media (max-width: 600px) {
    #btnRutas span {
        display: none;
    }

    #btnRutas {
        margin-right: 8px;
        /* Reducir margen en pantallas pequeñas */
    }
}