/* ==================================================
   1. BASE Y RESET GENERAL
================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #0D1117 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0px 1000px #0D1117 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ==================================================
   2. LOGIN Y PANTALLA PRINCIPAL (Glassmorphism)
================================================== */
.pantalla-principal, .pantalla-bienvenida {
    position: relative;
    min-height: 100dvh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    background-color: #0D1117 !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.contenedor-logo {
    position: absolute;
    top: 30px;
    left: 40px;
    z-index: 10;
}

.texto-logo {
    background: linear-gradient(135deg, #fff, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 3.5rem;
    margin: 0;
    filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.3));
}

.seccion-central {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 2;
    padding: 20px;
}

.caja-login, .caja-bienvenida {
    width: 90%;
    max-width: 450px;
    text-align: center;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.titulo-ingresar, .titulo-bienvenida {
    color: white;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.subtitulo {
    color: #9ca3af;
    margin-bottom: 30px;
    font-size: 1rem;
}

.input-redondeado {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    position: relative;
}

    .input-redondeado:focus-within {
        border-color: #a855f7;
        box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
        transform: translateY(-2px);
        background: rgba(0, 0, 0, 0.6);
    }

.campo-texto {
    background: transparent !important;
    border: none !important;
    color: white !important;
    outline: none !important;
    width: 100%;
    padding-left: 15px;
    font-size: 1.05rem;
}

.icono-input {
    color: #a855f7;
    font-size: 1.2rem;
}

.boton-morado-principal {
    background: linear-gradient(135deg, #8b5cf6, #6200ee);
    color: white !important;
    font-weight: bold;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    padding: 14px 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(98, 0, 238, 0.3);
    width: 100%;
    margin-top: 10px;
}

    .boton-morado-principal:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(98, 0, 238, 0.5);
    }

.enlaces-secundarios {
    margin-top: 20px;
}

    .enlaces-secundarios a {
        color: #c084fc;
        text-decoration: none;
        font-size: 0.95rem;
        font-weight: 500;
        transition: color 0.2s;
    }

        .enlaces-secundarios a:hover {
            color: white;
            text-decoration: underline;
        }

.error-validacion {
    color: #f87171;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 15px;
    display: block;
}

.grid-fotos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.opcion-foto {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    overflow: hidden;
    opacity: 0.6;
}

    .opcion-foto img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .opcion-foto:hover {
        opacity: 0.9;
        transform: scale(1.05);
    }

    .opcion-foto.seleccionada {
        border-color: #A855F7;
        opacity: 1;
        transform: scale(1.15);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
    }

.pie-pagina {
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0 40px;
    pointer-events: none;
    z-index: 1;
}

.info-izquierda {
    display: flex;
    align-items: center;
    padding-bottom: 30px;
    pointer-events: auto;
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(5px);
    padding: 15px 25px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 30px;
}

.simbolo-pregunta {
    font-size: 3rem;
    color: #6200ee;
    font-weight: 900;
    margin-right: 15px;
    text-shadow: 0 0 10px rgba(98,0,238,0.5);
}

.separador-barra {
    font-size: 2.5rem;
    color: rgba(255,255,255,0.3);
    margin-right: 15px;
    font-weight: 100;
}

.texto-descripcion {
    color: #d1d5db;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.imagen-gato {
    display: block;
    width: 280px;
    margin-bottom: -5px;
    pointer-events: auto;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
    transition: 0.3s;
}

    .imagen-gato:hover {
        transform: scale(1.05) rotate(-2deg);
    }

/* ==================================================
   3. NAVBAR / MENÚ LATERAL (Sidebar Premium)
================================================== */
.nav-contenedor {
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 280px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 5px 0 25px rgba(0,0,0,0.3);
}

.perfil-usuario {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.02);
}

.avatar-circular {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: 2px solid #a855f7;
    overflow: hidden;
}

.info-perfil {
    display: flex;
    flex-direction: column;
}

.nombre-usuario {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
}

.estrellas {
    color: #ffcc00;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    text-shadow: 0 0 8px rgba(255,204,0,0.4);
}

.menu-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.enlace-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #9ca3af !important;
    text-decoration: none !important;
    padding: 14px 20px;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

    .enlace-nav i {
        font-size: 1.3rem;
        width: 25px;
        text-align: center;
        transition: color 0.3s;
    }

    .enlace-nav:hover:not(.active) {
        background: rgba(255, 255, 255, 0.05);
        color: white !important;
        transform: translateX(5px);
    }

    .enlace-nav.active {
        background: linear-gradient(90deg, rgba(168, 85, 247, 0.15), transparent);
        border-left: 4px solid #a855f7;
        color: white !important;
        border-radius: 0 12px 12px 0;
    }

        .enlace-nav.active i {
            color: #a855f7;
            text-shadow: 0 0 10px rgba(168,85,247,0.5);
        }

.boton-logout {
    width: 100%;
    border: none;
    cursor: pointer;
    text-align: left;
    background: transparent;
}

    .boton-logout .enlace-nav:hover {
        background: rgba(239, 68, 68, 0.1);
        color: #f87171 !important;
    }

        .boton-logout .enlace-nav:hover i {
            color: #ef4444;
        }

.separador-menu {
    border-color: rgba(255,255,255,0.05);
    margin: 15px 0;
}

.top-row.navbar {
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex !important;
    z-index: 1050;
}

.navbar-toggler {
    background: rgba(168, 85, 247, 0.1) !important;
    border: 1px solid #A855F7 !important;
    border-radius: 12px !important;
    color: white;
}

/* ==================================================
   4. SCROLLBAR PERSONALIZADO
================================================== */
* {
    scrollbar-width: thin;
    scrollbar-color: #a855f7 rgba(17, 24, 39, 0.5);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #6200ee;
    border-radius: 10px;
    border: 2px solid #111827;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #a855f7;
    }

/* ==================================================
   5. NOTIFICACIONES PREMIUM
================================================== */
#contenedor-notificaciones {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
}

.noti-moderna {
    position: relative;
    min-width: 300px;
    max-width: 380px;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.noti-cuerpo {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 15px;
}

.noti-textos {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.noti-titulo {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.noti-mensaje {
    font-size: 0.9rem;
    color: #9ca3af;
    line-height: 1.4;
}

.text-muted2, p, .help-block, .description {
    color: rgba(255, 255, 255, 0.7) !important;
    line-height: 1.6;
}

h3, h4, h5 {
    color: #ffffff !important;
}

.noti-icono-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    flex-shrink: 0;
    font-size: 1.5rem;
}

.noti-barra-contenedor {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.noti-barra-progreso {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: encogerBarra 5s linear forwards;
}

.noti-success .noti-icono-box {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.noti-success .noti-barra-progreso {
    background: #34d399;
}

.noti-error .noti-icono-box {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.noti-error .noti-barra-progreso {
    background: #f87171;
}

.noti-info .noti-icono-box {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.noti-info .noti-barra-progreso {
    background: #a78bfa;
}

.noti-warning .noti-icono-box {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.noti-warning .noti-barra-progreso {
    background: #fbbf24;
}

.noti-racha-ganada {
    border: 1px solid rgba(255, 152, 0, 0.3);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.2);
}

    .noti-racha-ganada .noti-titulo {
        color: #ff9800;
        text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
    }

    .noti-racha-ganada .noti-icono-box {
        background: linear-gradient(135deg, #ff9800, #ff5722);
        color: white;
    }

    .noti-racha-ganada .noti-barra-progreso {
        background: linear-gradient(90deg, #ff9800, #ff5722);
    }

    .noti-racha-ganada .icono-animado {
        animation: fuegoLatido 1s infinite alternate ease-in-out;
    }

.noti-racha-perdida {
    border: 1px solid rgba(129, 212, 250, 0.3);
}

    .noti-racha-perdida .noti-titulo {
        color: #81d4fa;
    }

    .noti-racha-perdida .noti-icono-box {
        background: rgba(129, 212, 250, 0.2);
        color: #81d4fa;
    }

    .noti-racha-perdida .noti-barra-progreso {
        background: #81d4fa;
    }

    .noti-racha-perdida.noti-moderna {
        animation: slideInBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, temblorFrio 0.4s ease-in-out 0.6s;
    }

@keyframes slideInBounce {
    0% {
        transform: translateX(120%) scale(0.8);
        opacity: 0;
    }

    70% {
        transform: translateX(-10px) scale(1.02);
        opacity: 1;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.noti-moderna.saliendo {
    animation: slideOut 0.4s ease-in forwards !important;
}

@keyframes slideOut {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
}

@keyframes encogerBarra {
    0% {
        transform: scaleX(1);
    }

    100% {
        transform: scaleX(0);
    }
}

@keyframes fuegoLatido {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px rgba(255,255,255,0.8));
    }

    100% {
        transform: scale(1.25);
        filter: drop-shadow(0 0 8px rgba(255,255,255,1));
    }
}

@keyframes temblorFrio {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px) rotate(-2deg);
    }

    50% {
        transform: translateX(6px) rotate(2deg);
    }

    75% {
        transform: translateX(-6px) rotate(-2deg);
    }
}

/* ==================================================
   6. MODAL GLOBAL DE CONFIRMACIÓN
================================================== */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.confirm-caja {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.4);
    padding: 35px;
    border-radius: 24px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.6);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confirm-titulo {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 30px;
    font-weight: 600;
    line-height: 1.4;
}

.confirm-botones {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-confirm {
    padding: 12px 35px;
    border-radius: 30px;
    border: none;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-si {
    background: linear-gradient(135deg, #8b5cf6, #6200ee);
    color: white;
    box-shadow: 0 5px 15px rgba(98, 0, 238, 0.3);
}

    .btn-si:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(98, 0, 238, 0.5);
    }

.btn-no {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}

    .btn-no:hover {
        background: rgba(255,255,255,0.1);
        border-color: white;
        transform: translateY(-2px);
    }

@keyframes zoomIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ==================================================
   7. GLOBALES VARIOS
================================================== */
.titulo-principal {
    color: #A855F7;
    font-weight: bold;
}

.subtitulo-principal {
    color: #9ca3af;
    font-weight: 350;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #9ca3af;
    margin: 25px 0;
}

    .divider::before, .divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .divider span {
        padding: 0 15px;
        font-size: 0.9rem;
    }

.btn-google-login {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-google-login:hover {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.3);
        transform: translateY(-2px);
    }

.icono-ojito {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

    .icono-ojito:hover {
        color: #A855F7;
    }

.loading-screen, .error-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    height: 60vh;
}

/* ==================================================
   8. MEDIA QUERIES (Centrado y Responsividad)
================================================== */
@media (min-width: 851px) {
    .nav-contenedor {
        display: flex !important;
    }

    .navbar-toggler {
        display: none !important;
    }
}

@media (max-width: 850px) {
    .nav-contenedor.collapse {
        display: none;
    }

    .nav-contenedor {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1000;
        box-shadow: 5px 0 25px rgba(0,0,0,0.6);
    }

        .nav-contenedor:not(.collapse) {
            padding-top: 80px;
        }

    .navbar-toggler {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        top: 15px !important;
        left: 15px !important;
        z-index: 2000 !important;
        width: 45px;
        height: 45px;
    }

    .navbar-toggler-icon {
        display: block !important;
        filter: invert(1) brightness(2);
    }

    .main, main, article {
        margin-left: 0 !important;
        padding-left: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .pantalla-principal, .pantalla-bienvenida {
        height: auto;
        min-height: 100dvh;
        overflow-y: auto;
        padding: 20px 15px;
    }

    .contenedor-logo {
        position: absolute;
        top: 25px;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 0;
    }

    .texto-logo {
        font-size: 2.5rem;
    }

    .seccion-central {
        margin-top: 80px;
        padding-bottom: 120px;
        flex: none;
    }

    .caja-login, .caja-bienvenida {
        width: 100%;
        padding: 30px 20px;
        margin: 0 auto;
    }

    .info-izquierda {
        display: none;
    }

    .pie-pagina {
        justify-content: center;
        padding: 0 20px;
    }

    .imagen-gato {
        width: 180px;
        z-index: 0;
        pointer-events: none;
    }
}

@media (max-height: 650px) {
    .info-izquierda {
        display: none;
    }

    .pie-pagina {
        justify-content: right;
    }

    .imagen-gato {
        width: 150px;
        pointer-events: none;
    }
}
