/* --- 1. VARIABLES Y BASE --- */
:root {
    --verde-rescate: #22C55E;
    --verde-oscuro: #166534;
    --amarillo-sorpresa: #FACC15;
    --blanco-hueso: #F9FAF7;
    --gris-texto: #1F2937;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background: var(--blanco-hueso); color: var(--gris-texto); line-height: 1.6; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* --- 2. HEADER Y NAVEGACIÓN (Estructura de 3 columnas) --- */
.main-header { 
    background: var(--verde-oscuro); 
    color: white; 
    padding: 0.7rem 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    gap: 20px;
}

/* Columna 1: Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.4rem;
    white-space: nowrap;
}

/* Columna 2: Menú Central (Descubrir, Explorar, Ayuda) */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-grow: 1;
    justify-content: center; /* Centra los links en el espacio sobrante */
}

.nav-menu a { 
    color: white; 
    text-decoration: none; 
    font-size: 0.9rem; 
    font-weight: 500;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-menu a i { color: var(--amarillo-sorpresa); font-size: 1rem; }
.nav-menu a:hover { color: var(--amarillo-sorpresa); }

/* Columna 3: Botones / Usuario */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: fit-content;
}

/* --- 3. BOTONES Y ELEMENTOS DE ACCIÓN --- */
.btn-secondary { 
    background: transparent; 
    border: 1px solid white; 
    color: white; 
    padding: 8px 18px; 
    border-radius: 12px; 
    cursor: pointer; 
    font-weight: bold; 
    font-size: 0.85rem;
    transition: 0.3s;
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); }

.btn-login { 
    background: var(--verde-rescate); 
    border: none; 
    padding: 9px 18px; 
    border-radius: 12px; 
    color: white; 
    font-weight: bold; 
    font-size: 0.85rem;
    cursor: pointer; 
    transition: 0.3s;
}

.btn-login:hover { background: #1ba94c; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- 4. DROPDOWN DE USUARIO (Submenú) --- */
.user-dropdown {
    position: relative;
    padding-bottom: 5px; /* Puente para el hover */
}

.dropbtn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    transition: 0.3s;
}

.dropbtn:hover { background: rgba(255, 255, 255, 0.25); }

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 220px;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.15);
    border-radius: 15px;
    z-index: 1000;
    border: 1px solid #eee;

    max-height: 65vh;        /* 🔥 límite de altura */
    overflow-y: auto;        /* 🔥 scroll vertical */
    overflow-x: hidden;      /* evita scroll lateral */
}

.dropdown-content::-webkit-scrollbar {
    width: 6px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: transparent;
}

/* Área invisible para que el mouse no pierda el hover al bajar */
.user-dropdown::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 15px;
}

.user-dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInSlide 0.2s ease-out;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: var(--gris-texto) !important;
    padding: 12px 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-content a i { color: var(--verde-rescate); width: 18px; }
.dropdown-content a:hover { background-color: #f0fdf4; color: var(--verde-oscuro) !important; }

.highlight-store {
    background-color: var(--amarillo-sorpresa) !important;
    font-weight: bold;
    color: var(--verde-oscuro) !important;
}

/* --- 5. HERO Y SECCIONES --- */
.hero { background: white; padding: 60px 0; border-radius: 0 0 50px 50px; }
.flex-hero { display: flex; align-items: center; flex-wrap: wrap; gap: 40px; }
.hero-text { flex: 1; min-width: 300px; }
.hero-text h1 { font-size: 3.2rem; line-height: 1.1; margin: 20px 0; }
.highlight { color: var(--verde-rescate); }
.badge-promo { background: #DCFCE7; color: #166534; padding: 8px 16px; border-radius: 50px; font-size: 0.8rem; font-weight: bold; }

.btn-cta-primary { 
    background: var(--amarillo-sorpresa); 
    color: var(--verde-oscuro); 
    padding: 18px 36px; 
    border-radius: 15px; 
    text-decoration: none; 
    font-weight: bold; 
    display: inline-block; 
    font-size: 1.1rem; 
    box-shadow: 0 10px 20px rgba(250, 204, 21, 0.4); 
    transition: 0.3s;
}
.btn-cta-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(250, 204, 21, 0.5); }

/* --- 6. IMPACTO Y FAQ --- */
.impact-calculator { padding: 80px 0; text-align: center; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 50px; }
.stat-card { background: white; padding: 40px; border-radius: 30px; box-shadow: var(--shadow); }
.stat-card i { font-size: 2.5rem; color: var(--verde-rescate); margin-bottom: 15px; }
.stat-card h3 { font-size: 2.5rem; color: var(--verde-oscuro); }

.faq-section { padding: 80px 0; background: #fff; }
.faq-container { max-width: 800px; margin: 0 auto; }
details { background: var(--blanco-hueso); margin-bottom: 15px; padding: 20px; border-radius: 15px; cursor: pointer; }
summary { font-weight: bold; display: flex; justify-content: space-between; align-items: center; list-style: none; }
summary::after { content: '+'; color: var(--verde-rescate); font-size: 1.5rem; }

/* --- ESCALA DE NIVELES --- */
.levels-showcase {
    margin-top: 60px;
    background: #fff;
    padding: 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: var(--shadow);
}

.levels-flex {
    display: flex;
    justify-content: center; 
    align-items: flex-start;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: nowrap;
}

.level-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 150px;
}

.level-item.current {
    opacity: 1;
    transform: scale(1.1);
    color: var(--verde-oscuro);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    background: var(--blanco-hueso);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.level-item span {
    font-weight: 700;
    font-size: 1rem;
    display: block;
}

.level-item small {
    color: #6B7280;
    font-size: 0.8rem;
    display: block;
}

/*level pasado*/

/* Estilos para la evolución de niveles */
.levels-flex {
    display: flex;
    align-items: center; /* Centra todo verticalmente (huevos y flechas) */
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
}

/* --- BASE PARA LOS ICONOS CIRCULARES (1, 2 y 3) --- */
.badge-icon-custom, .badge-icon-custom-mascot {
    width: 110px;
    height: 110px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid #f0f0f0;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto 15px auto;
    position: relative;
    padding: 0 !important;
}

/* Ajuste específico para el Nivel 3 (Héroe Eco) */
.badge-icon-custom-mascot {
    border-color: #22c55e !important; /* Verde vibrante */
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.3);
    transform: scale(1.05);
}

/* Imagen para niveles 1 y 2 */
.badge-icon-custom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* --- ANIMACIÓN DE LA RULETA DE MASCOTAS (NIVEL 3) --- */
.mascot-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Para que la mascota se vea completa */
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    animation: loopMascotas 12s infinite;
}

@keyframes loopMascotas {
    0%, 16.66% { opacity: 1; z-index: 10; }
    16.67%, 100% { opacity: 0; z-index: 1; }
}

/* Retrasos para las 6 mascotas */
.m1 { animation-delay: 0s; }
.m2 { animation-delay: 2s; }
.m3 { animation-delay: 4s; }
.m4 { animation-delay: 6s; }
.m5 { animation-delay: 8s; }
.m6 { animation-delay: 10s; }

/* --- ETIQUETAS Y TEXTO --- */
.level-tag {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    margin: 8px 0;
    text-transform: uppercase;
    display: inline-block;
}

.level-tag.mascot {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}

/* --- CONECTOR (FLECHAS) --- */
.level-connector {
    display: flex;
    align-items: center;      /* Centra verticalmente el icono dentro de la caja */
    justify-content: center;   /* Centra horizontalmente */
    color: #cbd5e1;
    font-size: 1.5rem;
    
    /* Esto es la clave: ajusta el margen superior para que baje a la altura */
    /* de los círculos (badge-icon-custom) que miden 110px aprox. */
    height: 110px;            /* Misma altura que tus badges para que el centro coincida */
    align-self: flex-start;    /* Evita que se estire si el contenedor padre es muy alto */
}

/* --- SOLUCIÓN A LA OPACIDAD (Héroe Eco) --- */
.level-item {
    opacity: 1 !important; /* Forzamos que todos sean visibles */
    text-align: center;
    filter: none !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .levels-flex {
        flex-direction: column;
    }
    .level-connector {
        transform: rotate(90deg);
        height: 40px;
        margin: 10px 0;
    }
}

/*FIN imagen de niveles*/

/* --- MEJORA DE FORMULARIOS --- */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--verde-oscuro);
    margin-left: 5px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    font-family: inherit;
    transition: 0.3s;
    background: #fcfcfc;
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--verde-rescate);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.form-group input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
    color: #6b7280;
}

/* --- EXCLUSIVO PERFIL (Añadido para organizar sin dañar) --- */
.profile-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.profile-sidebar {
    flex: 0 0 300px;
}

.profile-content {
    flex: 1;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Avatar circular del perfil */
.profile-avatar-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
}

.profile-avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--verde-rescate);
    padding: 3px;
}

.btn-upload-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--verde-oscuro);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid white;
    transition: 0.3s;
}

.btn-upload-icon:hover { background: var(--verde-rescate); }

/* --- 7. MODALES Y ERRORES --- */
/* Modales generales para que sean consistentes */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px); 
    overflow-y: auto; /* Permite scroll si el formulario es largo */
    align-items: center; /* Centrado vertical si usas flex */
    justify-content: center; /* Centrado horizontal si usas flex */
}

.modal-content {
    background: white; 
    margin: 2% auto; /* Espacio arriba para que no pegue al techo */
    padding: 30px; 
    border-radius: 25px; /* Bordes redondeados modernos */
    width: 90%; 
    max-width: 450px; /* Tamaño ideal para login/registro */
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    border: none;
}

/* Estilo para los inputs dentro del modal de index */
.modal-content input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-sizing: border-box; /* Evita que el input se salga del borde */
}

/* 3. ANIMACIÓN MODAL */
    @keyframes fadeInScale {
        from { opacity: 0; transform: scale(0.9); }
        to { opacity: 1; transform: scale(1); }
    }
    .modal-content { animation: fadeInScale 0.3s ease-out; }

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}
.error-banner {
    background-color: #fee2e2; color: #b91c1c; padding: 12px;
    border-radius: 10px; margin-bottom: 15px; font-size: 0.85rem; border: 1px solid #fecaca;
}

/* --- 8. FOOTER --- */
/* Esto es vital para que el navegador sepa cuánto mide la pantalla */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

/* Este es el contenedor que 'empuja' al footer hacia abajo */
main, .container, .content-wrapper {
    flex: 1 0 auto;
}

/* TUS ESTILOS ORIGINALES (No los toques, solo asegúrate de que existan) */
.main-footer { 
    background: #1F2937; 
    color: white; 
    padding: 80px 0 20px; 
    flex-shrink: 0; /* Obligatorio para que no se aplaste */
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 40px; 
}

.footer-links a { 
    display: block; 
    color: #9CA3AF; 
    text-decoration: none; 
    margin-bottom: 10px; 
    font-size: 0.9rem; 
}

.footer-links a:hover { color: white; }

.payment-icons { 
    font-size: 2rem; 
    display: flex; 
    gap: 15px; 
    color: #9CA3AF; 
    margin-top: 15px; 
}

.social-linkss a {
    color: #ffffff;
    font-size: 1.5rem; /* Tamaño de los iconos */
    margin-right: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.social-linkss a:hover {
    color: #10b981; /* Cambia a verde Sorpify al pasar el ratón */
    transform: scale(1.2); /* Crece un poquito */
}

/*fin footer*/

/* --- 9. RESPONSIVE --- */
@media (max-width: 992px) {
    .nav-menu { gap: 15px; }
    .hero-text h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {

    .mobile-menu-btn {
        display: block;
    }

    /* MENÚ MÓVIL CON SCROLL PRO */
    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--verde-oscuro);
        padding: 25px;
        gap: 20px;

        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
    }

    .nav-menu.active {
        display: flex;
    }

    /* Botones debajo del menú */
    .auth-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
        margin-top: 15px;
    }

    .auth-buttons button {
        width: 100%;
    }
    .auth-buttons {
    margin-left: auto; /* empuja todo a la derecha */
}

    .profile-layout { flex-direction: column; }
    .profile-sidebar { width: 100%; flex: none; }
    .form-grid { grid-template-columns: 1fr; }
}

.nav-menu::-webkit-scrollbar {
    width: 6px;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.no-scroll {
    overflow: hidden;
}
    .user-dropdown.active-click .dropdown-content {
        display: block;
        position: static;
        width: 100%;
        box-shadow: none;
        background: rgba(255,255,255,0.05);
    }
}


/* --- SECCIÓN FAVORITOS --- */
.favorites-container {
    padding: 20px;
}

.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.store-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: 0.3s;
    border: 1px solid #f0f0f0;
}

.store-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.store-image {
    position: relative;
    height: 160px;
}

.store-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-fav-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #ef4444;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.remove-fav-btn:hover {
    transform: scale(1.1);
    background: #ef4444;
    color: white;
}

.store-info {
    padding: 20px;
}

.store-info h3 {
    color: var(--verde-oscuro);
    font-size: 1.2rem;
    margin: 10px 0 5px;
}

.store-info p {
    color: #6B7280;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: white;
    border-radius: 30px;
    color: #9CA3AF;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #E5E7EB;
}

/* --- SECCIÓN FAVORITOS --- */

/* --- SUSTITUYE O AÑADE ESTO EN LAS SECCIONES CORRESPONDIENTES --- */

/* Ajuste para que el botón Ver como Cliente use el color correcto */
.view-as-client {
    color: var(--amarillo-sorpresa) !important;
    font-weight: bold;
    border: 1px solid var(--amarillo-sorpresa);
    border-radius: 8px;
    padding: 5px 12px !important;
    margin-left: 10px;
}

/* Modificaciones Responsive para el Submenú */
/* --- RESPONSIVE HEADER PRO --- */
@media (max-width: 768px) {

    .mobile-menu-btn {
        display: block;
        z-index: 1100;
    }

    /* Ocultamos menú normal */
    .nav-menu {
        display: none;
    }

    /* Cuando está activo */
    .nav-menu.active {
        display: flex;
        flex-direction: column;

        position: fixed;
        top: 70px; /* altura real del header */
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);

        background: var(--verde-oscuro);
        padding: 30px 25px;
        gap: 25px;

        overflow-y: auto;
        -webkit-overflow-scrolling: touch;

        z-index: 1050;
    }

    /* Links dentro del menú */
    .nav-menu a {
        font-size: 1rem;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Botones debajo del menú */
   .auth-buttons {
    flex-direction: row;      /* 🔥 mantener en fila */
    align-items: center;
    gap: 12px;
    width: auto;              /* 🔥 quitar 100% */
    margin-top: 0;            /* 🔥 quitar separación */
}

    .auth-buttons button {
        width: 100%;
    }

    /* Perfil responsive */
    .profile-layout { flex-direction: column; }
    .profile-sidebar { width: 100%; flex: none; }
    .form-grid { grid-template-columns: 1fr; }

}

/* Scroll personalizado */
.nav-menu.active::-webkit-scrollbar {
    width: 6px;
}

.nav-menu.active::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
}

.nav-menu.active::-webkit-scrollbar-track {
    background: transparent;
}

/* Bloquear scroll del body cuando menú abierto */
.no-scroll {
    overflow: hidden;
}
/* Estilo para resaltar Admin en el menú */


.highlight-admin {
    background-color: #1e293b !important;
    color: white !important;
}
.highlight-admin i { color: #94a3b8 !important; }

/*insignias */
/* Colores de Rangos */
.rank-bronze { --rank-color: #cd7f32; --rank-bg: #fff5eb; }
.rank-silver { --rank-color: #22C55E; --rank-bg: #f0fdf4; } /* Verde Sorpify */
.rank-gold { --rank-color: #FACC15; --rank-bg: #fefce8; }

.badge-display {
    background: var(--rank-bg);
    border-radius: 40px;
    padding: 40px 20px;
    text-align: center;
    position: relative;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.badge-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.main-badge {
    width: 100px; 
    height: 100px; 
    background: #ffffff;
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    position: absolute; 
    top: 10px; 
    left: 10px; 
    z-index: 2;
    overflow: hidden; /* Corta los bordes de la imagen para que sea circular */
    border: 3px solid #f0f0f0; /* Un pequeño borde para que resalte */
}

/* Mantenemos tus animaciones pero aplicadas a la imagen */
.huevo-cerrado img { animation: sway 3s infinite ease-in-out; }
.huevo-rompiendo img { animation: shake 0.5s infinite; }
.mascota-libre img { animation: jump 2s infinite; }.main-badge {
    width: 100px;
    height: 100px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: absolute;
    top: 10px; left: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 2;
}

.badge-emoji {
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
    animation: float 3s ease-in-out infinite;
}

/* Barra de progreso estilo App */
.app-progress-bar {
    height: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 20px;
    margin: 20px auto 10px;
    max-width: 250px;
    overflow: hidden;
}

.app-progress-bar .fill {
    height: 100%;
    background: var(--rank-color);
    box-shadow: 0 0 15px var(--rank-color);
    transition: width 1.5s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

/* Toast de nivel subido */
.level-up-toast {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--verde-oscuro);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: slideInDown 0.5s forwards, fadeOut 0.5s 4s forwards;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translate(-50%, -100px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Contenedor de Mascota */
.pet-card {
    background: white;
    border-radius: 25px;
    padding: 30px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: var(--shadow);
    border: 1px solid #f0f0f0;
}

.pet-visual {
    position: relative;
    font-size: 4.5rem;
    min-width: 100px;
    text-align: center;
}

/* Animaciones de estado */
.huevo-cerrado .pet-emoji { animation: heartbeat 2s infinite ease-in-out; display: inline-block; }
.huevo-rompiendo .pet-emoji { animation: shakePet 0.4s infinite; display: inline-block; }
.mascota-libre .pet-emoji { animation: bouncePet 2s infinite; display: inline-block; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1)); }

@keyframes heartbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shakePet { 0% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes bouncePet { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-15px); } }

/* Barra de progreso personalizada */
.badge-level {
    background: var(--verde-oscuro);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}

.custom-progress-container {
    background: #f3f4f6;
    height: 10px;
    border-radius: 10px;
    margin: 15px 0 5px;
    overflow: hidden;
}

.custom-progress-bar {
    background: linear-gradient(90deg, var(--verde-rescate), #FACC15);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.progress-text { font-size: 0.85rem; color: #6b7280; }

/* Responsive */
@media (max-width: 600px) {
    .pet-card { flex-direction: column; text-align: center; }
}
/*insignias */

/* Banner de Bienvenida Post-Registro */
.welcome-banner {
    position: fixed; /* Cambiado a fixed para flotar sobre el contenido */
    top: 20px;       /* Distancia desde arriba */
    left: 50%;       /* Punto de anclaje al centro */
    transform: translateX(-50%); /* Lo centra exactamente */
    width: 90%;
    max-width: 700px;
    background: var(--verde-oscuro);
    color: white;
    padding: 15px 25px;
    border-radius: 20px; /* Bordes redondeados para estilo "floating card" */
    border: 2px solid var(--verde-rescate);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    z-index: 2000;
    
    /* Esta es la clave: la animación debe mantener el centrado */
    animation: dropCentrado 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.welcome-content-card {
    background: var(--verde-oscuro);
    color: white;
    padding: 15px 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 2px solid var(--verde-rescate);
}
/* Animación que nace centrada y baja */
@keyframes dropCentrado {
    from {
        opacity: 0;
        transform: translate(-50%, -100px); /* Empieza centrado pero más arriba */
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);     /* Termina en su sitio centrado */
    }
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.welcome-text {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    text-align: left;
}

.welcome-text i {
    font-size: 1.5rem;
    color: var(--amarillo-sorpresa);
}

.close-banner {
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
    font-size: 1.2rem;
}

.close-banner:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Ajuste para móviles */
@media (max-width: 768px) {
    .welcome-banner {
        top: 10px;
        padding: 12px 15px;
    }
    .welcome-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    .welcome-text {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}
/* fin Banner de Bienvenida Post-Registro */
/* cookies */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    z-index: 9999;
    padding: 25px;
    border: 1px solid #f1f5f9;
    display: none; /* Se activa por JS */
    opacity: 0;
    transition: opacity 0.5s ease; /* Para que aparezca suavemente */
}

.cookie-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.cookie-header i { color: #fb923c; font-size: 1.5rem; }
.cookie-header h3 { margin: 0; font-size: 1.1rem; color: #1e293b; }
.cookie-banner p { font-size: 0.9rem; color: #64748b; line-height: 1.5; margin-bottom: 20px; }

.cookie-options { margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #f1f5f9; padding-top: 15px; }
.cookie-options label { font-size: 0.85rem; color: #475569; display: flex; gap: 10px; cursor: pointer; }

.cookie-buttons { display: flex; gap: 10px; align-items: center; }
.btn-cookie-all { background: #22c55e; color: white; border: none; padding: 10px 20px; border-radius: 12px; font-weight: 600; cursor: pointer; flex: 1; }
.btn-cookie-link { background: transparent; color: #64748b; border: none; font-size: 0.85rem; text-decoration: underline; cursor: pointer; }
.btn-cookie-save { background: #1e293b; color: white; border: none; padding: 10px 20px; border-radius: 12px; cursor: pointer; }
/* fin cookies */
/*logo*/
.logo-container {
    width: 100%;
    max-width: 200px; /* Ajusta este valor al tamaño que quieras en PC */
    margin: 0 auto;   /* Centra el logo si el contenedor es más ancho */
}

.logo-container img {
    width: 100%;      /* Hace que la imagen ocupe el ancho del div padre */
    height: auto;     /* Mantiene la proporción original (no se estira) */
    display: block;   /* Elimina espacios en blanco extra debajo de la imagen */
    object-fit: contain;
}

/* Ajuste opcional para pantallas muy pequeñas (móviles) */
@media (max-width: 480px) {
    .logo-container {
        max-width: 150px; /* Un poco más pequeño en móviles */
    }
}
/*logo*/