html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0f18;
    --bg-card: rgba(16, 25, 40, 0.6);
    --primary: #cba85a; /* Premium Gold */
    --primary-hover: #e0c279;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #2563eb;
    --glass-border: rgba(203, 168, 90, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 0 !important; /* Asegurar que nada empuje el contenido hacia abajo */
    margin-top: 0 !important;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(184, 151, 88, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography */
h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 600;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Glassmorphism Utilities */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(10, 15, 24, 0.8) 0%, rgba(10, 15, 24, 0) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    box-sizing: border-box;
    transition: background 0.3s ease;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(203, 168, 90, 0.4);
}

/* Navigation */
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    height: auto;
}

@media (max-width: 768px) {
    .glass-nav {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 1000 !important;
    }
    
    .nav-content {
        padding: 0 !important;
        margin: 0 !important;
    }
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Zona derecha del header: siempre visible en desktop Y móvil */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto; /* Empuja todo a la derecha */
    position: relative;
    z-index: 101;
}

.nav-logo-img {
    height: 80px; 
    width: auto;
    max-width: 90%; 
    transition: transform 0.3s ease;
    object-fit: contain;
    padding: 0; /* Eliminado el padding para reducir espacio */
}

.footer-logo-img {
    height: 240px; /* Un tercio del tamaño masivo solicitado */
    width: auto;
    object-fit: contain;
    margin-bottom: 2rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap; /* Permitir que bajen de línea si no hay espacio */
    justify-content: center;
}

.desktop-nav {
    display: flex;
    gap: 2.5rem;
}

.desktop-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--primary);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--bg-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 20px rgba(203, 168, 90, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--primary);
}

/* Hero Section - Unified & Robust */
.hero {
    min-height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #0a0f18;
    background-image: url('hero-banner.png?v=4.8');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay para legibilidad - Separado para mejor compatibilidad móvil */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 15, 24, 0.9) 0%, rgba(10, 15, 24, 0.5) 50%, rgba(10, 15, 24, 0.1) 100%);
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
}

.hero-content {
    max-width: 650px;
    padding-top: 60px;
}

@media (max-width: 768px) {
    .hero {
        background-position: 85% center; 
        background-attachment: scroll;
        align-items: flex-end !important; /* Forzar el texto abajo */
        padding-top: 0 !important;
        margin-top: 0 !important;
        padding-bottom: 2rem !important; 
        min-height: 100vh;
        display: flex !important;
    }
    
    .hero::before {
        background: linear-gradient(to bottom, rgba(10, 15, 24, 0) 0%, rgba(10, 15, 24, 0.4) 30%, rgba(10, 15, 24, 0.95) 100%) !important;
    }
    
    .hero-content {
        text-align: center;
        margin: 0 auto;
        padding: 0 1.5rem 1rem 1.5rem !important;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}


/* Services */
.services {
    padding: 6rem 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1rem;
    margin-bottom: 0;
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(203, 168, 90, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.icon-wrapper svg {
    width: 24px;
    height: 24px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards ease-out;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards ease-out 0.5s;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Responsive Global */
@media (max-width: 768px) {
    .desktop-nav { display: none; }
    h1 { font-size: 2.8rem; }
    .hero-buttons { justify-content: center; }
}

/* ===========================
   Modal de Autenticación
   =========================== */
.auth-modal-box {
    background: linear-gradient(160deg, rgba(12,20,36,0.98) 0%, rgba(8,14,26,0.98) 100%);
    border: 1px solid rgba(203, 168, 90, 0.25);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
    animation: modalSlideIn 0.25s ease;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.auth-close-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--text-main);
}

.auth-modal-title {
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    -webkit-text-fill-color: unset; /* Evitar conflicto con el gradiente global de h1 */
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    margin-bottom: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.auth-input:focus {
    border-color: rgba(203, 168, 90, 0.5);
    box-shadow: 0 0 0 3px rgba(203, 168, 90, 0.1);
}

.auth-submit-btn {
    width: 100%;
    padding: 11px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, box-shadow 0.2s;
    margin-bottom: 0.5rem;
}

.auth-submit-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 16px rgba(203,168,90,0.35);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================
   CUSTOMIZACIÓN DEL WIDGET GEN APP BUILDER
   ========================================= */
.ai-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

/* Forzando estilos dentro del shadow DOM del widget (si es posible) o wrappers */
gen-search-widget {
    --gen-search-widget-theme-color: var(--primary);
    --gen-search-widget-header-bg-color: var(--bg-dark);
    --gen-search-widget-header-text-color: var(--text-main);
    --gen-search-widget-button-bg: var(--primary);
    --gen-search-widget-button-color: var(--bg-dark);
}
/* Mobile Adjustments */
.mobile-header-btn {
    display: none;
}

@media (max-width: 768px) {
    .glass-nav {
        position: relative !important; /* El encabezado ya no flota, evitando choques con el contenido */
        background: var(--bg-dark);
        border: none;
    }

    .nav-content {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 1rem;
        padding: 0.5rem 1rem !important;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-header-btn {
        display: flex !important;
        flex-grow: 1; /* Se estira hacia la izquierda/derecha para llenar el espacio disponible */
        justify-content: center;
        padding: 0.8rem 0.5rem !important;
        font-size: 1rem !important;
        white-space: nowrap;
        margin: 0;
    }

    .desktop-nav {
        display: none !important; /* Ocultar menú de texto en móvil para dar espacio */
    }

    .nav-logo-img {
        height: 180px !important; /* Logo mantenido en 180px */
        width: auto;
        margin: 0 !important;
    }

    .btn-primary:not(.mobile-header-btn) {
        width: 80% !important;
        max-width: none;
        margin: 0 auto;
        justify-content: center;
        padding: 0.8rem 1rem !important;
        font-size: 1rem !important;
    }

    .hero {
        padding-top: 2rem !important; /* Espacio mínimo ya que el nav ya no es fijo */
        min-height: auto;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .hero-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-content h1, 
    .hero-content p {
        text-align: center !important;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        display: none;
    }

    .footer-content {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 2rem;
    }

    .footer-links {
        justify-content: center !important;
        gap: 2rem !important;
    }

    body {
        overflow-x: hidden;
        width: 100%;
    }
}

/* Landscape Mode Adjustments (Modo Horizontal) */
@media (max-width: 992px) and (orientation: landscape) {
    .glass-nav {
        position: relative !important;
        background: var(--bg-dark);
    }

    .nav-content {
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 0.5rem 1rem !important; /* Reducido para evitar desborde */
        height: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .container {
        padding: 0 1rem !important; /* Margen de seguridad más pequeño */
    }

    .desktop-nav {
        display: flex !important;
        gap: 0.8rem !important; /* Menos espacio entre links para que quepan */
        font-size: 0.9rem;
    }

    .nav-logo-img {
        height: 80px !important; /* Logo compacto para liberar espacio vertical */
        width: auto;
    }


    .btn-primary {
        width: auto !important;
        padding: 0.5rem 1rem !important;
    }

    .hero {
        padding-top: 1rem !important;
    }
}

/* Clase para ocultar con fuerza las secciones de venta */
.hide-access {
    display: none !important;
}

/* Modo Premium: Fondo personalizado */
body.premium-mode {
    background-image: url('ia-bg-web.png?v=1.1');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    overflow-y: auto;
}

@media (max-width: 768px) {
    body.premium-mode {
        background-image: url('ia-bg-mobile.jpg?v=1.1');
    }
}

/* Transparencia del header en modo Premium */
body.premium-mode .glass-nav {
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Diseño de Historial y Layout IA */
.ai-layout {
    display: flex;
    width: 100%;
    min-height: 85vh;
    gap: 0;
}

.ai-sidebar {
    width: 300px;
    background: rgba(10, 15, 28, 0.6);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(203, 168, 90, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.history-item:hover {
    background: rgba(203, 168, 90, 0.1);
    border-color: var(--primary);
    color: var(--text-main);
    transform: translateX(5px);
}

.history-item .query-text {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.history-item .query-date {
    font-size: 0.75rem;
    opacity: 0.5;
}

.ai-main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.mobile-only-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .ai-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }
    
    .ai-sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-only-btn {
        display: block;
    }
}

.ai-section {
    display: none; 
    width: 100%;
    margin: 0 auto;
    padding: 0;
    transition: all 0.5s ease;
}

/* En móvil bajamos el buscador para que quede bajo el texto "IA" del fondo */
@media (max-width: 768px) {
    .ai-section {
        margin-top: 42vh; 
        padding: 0 1.5rem;
    }
}

/* En desktop bajamos la sección para el header */
@media (min-width: 769px) {
    .ai-section {
        margin-top: 80px; 
    }
}

.ai-section-inner {
    background: transparent;
    border: none;
    padding: 1rem 2rem;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.ai-input-zone {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

gen-search-widget {
    width: 100% !important;
    min-height: 600px;
    margin-top: 1rem;
}

#searchWidgetTrigger {
    width: 100%;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(203, 168, 90, 0.3);
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    font-size: 1rem;
    outline: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

body.premium-mode .ai-section-header {
    display: none !important;
}

.ai-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ai-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(203,168,90,0.2), rgba(203,168,90,0.05));
    border: 1px solid rgba(203,168,90,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.ai-input-zone {
    text-align: center;
    color: #000000; /* Forzar herencia de texto negro para el widget */
}

/* Reset para el widget de Google Vertex AI */
gen-search-widget {
    --text-color: #000000 !important;
    --input-text-color: #000000 !important;
    color: #000000 !important;
}

/* Ocultar citas y fuentes del widget de Google (Shadow DOM) */
gen-search-widget::part(citations),
gen-search-widget::part(grounding-citations),
gen-search-widget::part(source-links),
gen-search-widget::part(citations-list),
gen-search-widget::part(footer) {
    display: none !important;
}

/* Fallback para elementos que no usan parts */
.citation, 
.grounding-citation, 
.source-link,
.citations-list {
    display: none !important;
}

/* Intentar alcanzar el input interno del widget (Shadow DOM) */
gen-search-widget::part(input),
gen-search-widget::part(search-input) {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

gen-search-widget input,
[part="input"] {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* User Avatar & Dropdown Styles — Google Style */

/* En móvil: el avatar aparece en la barra superior del nav móvil */
@media (max-width: 768px) {
    /* Mostrar el avatar dentro del user-controls en el nav móvil */
    #user-controls {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    /* El dropdown se abre hacia la derecha del centro */
    .avatar-dropdown {
        right: 0 !important;
        left: auto !important;
        min-width: 240px !important;
    }

    /* Activación por tap en móvil (toggle con JS) */
    .avatar-dropdown.open {
        display: block !important;
    }
}

.avatar-container {
    cursor: pointer;
    position: relative;
    /* Puente invisible para que el hover no se pierda al pasar al dropdown */
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    /* Azul Google */
    background: linear-gradient(135deg, #4285F4 0%, #1a73e8 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    border: 2.5px solid rgba(66, 133, 244, 0.5);
    box-shadow: 0 2px 10px rgba(66, 133, 244, 0.4);
    background-size: cover;
    background-position: center;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.avatar-container:hover .avatar-circle {
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.6);
    transform: scale(1.05);
}

.avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 14px);
    right: 0;
    background: rgba(10, 15, 28, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(66, 133, 244, 0.25);
    border-radius: 16px;
    padding: 0;
    min-width: 260px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05);
    z-index: 200;
    overflow: hidden;
    animation: dropdownFade 0.18s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.avatar-container:hover .avatar-dropdown {
    display: block;
}

.dropdown-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(66, 133, 244, 0.06);
}

.dropdown-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285F4 0%, #1a73e8 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.8rem;
    text-transform: uppercase;
    border: 3px solid rgba(66, 133, 244, 0.4);
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.35);
    background-size: cover;
    background-position: center;
    margin-bottom: 0.25rem;
}

.dropdown-user-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
}

.dropdown-user-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

.dropdown-user-role {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4285F4;
    background: rgba(66, 133, 244, 0.12);
    border: 1px solid rgba(66, 133, 244, 0.25);
    border-radius: 20px;
    padding: 0.2rem 0.7rem;
    margin-top: 0.1rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dropdown-body {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease, color 0.15s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.dropdown-item.danger {
    color: #ef4444;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 0.25rem;
    padding-top: 0.75rem;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.8;
}

#logout-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: #4285F4;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s ease, color 0.15s ease;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 0.25rem;
    width: 100%;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    cursor: pointer;
    font-family: inherit;
}

#logout-btn svg {
    stroke: #4285F4;
    transition: stroke 0.15s ease;
}

#logout-btn:hover {
    background: rgba(66, 133, 244, 0.08);
    color: #7baaf7;
}

#logout-btn:hover svg {
    stroke: #7baaf7;
}

/* ==========================================================================
   Responsive Premium Mode Mobile - Fixed Layout
   ========================================================================== */
@media (max-width: 768px) {
    body.premium-mode {
        height: 100dvh !important;
        height: 100vh !important;
        width: 100vw !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0;
        left: 0;
    }

    body.premium-mode .glass-nav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 60px !important;
        background: var(--bg-dark) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        display: flex !important;
        align-items: center !important;
        z-index: 1000 !important;
    }

    body.premium-mode .nav-content {
        display: flex !important;
        width: 100% !important;
        height: 100% !important;
        padding: 0 16px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    body.premium-mode .nav-logo-img {
        height: 40px !important;
        width: auto !important;
        margin: 0 !important;
    }

    body.premium-mode #mobile-subscribe-btn {
        display: none !important;
    }

    body.premium-mode .header-right {
        margin-left: auto !important;
    }

    body.premium-mode #ai-chat-section {
        display: block !important;
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: calc(100dvh - 60px) !important;
        height: calc(100vh - 60px) !important;
        margin-top: 0 !important;
        padding: 0 !important;
        z-index: 999 !important;
    }

    body.premium-mode .ai-layout {
        height: 100% !important;
        width: 100% !important;
        min-height: unset !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.premium-mode .ai-main-content {
        height: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.premium-mode .ai-sidebar {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        height: 100% !important;
        transform: translateX(-100%) !important;
        z-index: 2000 !important;
        box-shadow: 20px 0 30px rgba(0,0,0,0.5) !important;
        background: rgba(10, 15, 28, 0.98) !important;
    }
    
    body.premium-mode .ai-sidebar.active {
        transform: translateX(0) !important;
    }

    body.premium-mode .ai-section-inner {
        height: 100% !important;
        width: 100% !important;
        min-height: unset !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.premium-mode .ai-input-zone {
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        text-align: left !important;
    }

    body.premium-mode #gro-chat-container {
        flex-grow: 1 !important;
        height: 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        padding: 12px 14px 12px 14px !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        background: #ffffff !important;
        box-shadow: none !important;
    }

    body.premium-mode #gro-chat-messages {
        flex-grow: 1 !important;
        height: 0 !important;
        overflow-y: auto !important;
        padding: 8px 0 !important;
        margin-bottom: 8px !important;
        gap: 14px !important;
    }

    body.premium-mode #gro-chat-header-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 8px !important;
        padding-bottom: 10px !important;
        border-bottom: 1px solid #f1f5f9 !important;
        width: 100% !important;
        margin-bottom: 4px !important;
    }

    body.premium-mode #gro-chat-header-actions::-webkit-scrollbar {
        display: none !important;
    }

    body.premium-mode .chat-header-btn {
        flex-shrink: 0 !important;
        font-size: 0.78rem !important;
        padding: 6px 12px !important;
    }

    body.premium-mode .chat-header-exports {
        display: flex !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
    }

    body.premium-mode #gro-chat-input-row {
        gap: 8px !important;
        margin-top: 4px !important;
        padding-bottom: env(safe-area-inset-bottom, 8px) !important;
    }

    body.premium-mode #gro-chat-input {
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
    }

    body.premium-mode #gro-chat-attach-btn,
    body.premium-mode #gro-chat-send {
        width: 40px !important;
        height: 40px !important;
    }

    body.premium-mode .gro-msg-body-wrapper {
        max-width: 85% !important;
    }

    body.premium-mode .gro-msg-bubble {
        padding: 10px 14px !important;
        font-size: 0.88rem !important;
        line-height: 1.5 !important;
        border-radius: 14px !important;
    }

    body.premium-mode .gro-msg.user .gro-msg-bubble {
        border-bottom-right-radius: 4px !important;
    }

    body.premium-mode .gro-msg.bot .gro-msg-bubble {
        border-bottom-left-radius: 4px !important;
    }

    body.premium-mode .gro-msg-avatar {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.7rem !important;
    }

    body.premium-mode .gro-msg-disclaimer {
        font-size: 0.7rem !important;
        line-height: 1.3 !important;
    }

    body.premium-mode .gro-msg-actions {
        gap: 6px !important;
    }

    body.premium-mode .msg-action-btn {
        padding: 4px 8px !important;
        font-size: 0.68rem !important;
    }

    body.premium-mode .msg-rating-label {
        font-size: 0.68rem !important;
    }

    body.premium-mode .msg-rate-btn {
        font-size: 0.9rem !important;
        padding: 2px 4px !important;
    }
}

/* =========================================
   ESTILOS DE ACCESO DIRECTO Y PWA MODAL
   ========================================= */
.btn-shortcut {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Outfit', sans-serif;
}

.btn-shortcut:hover {
    background: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(203, 168, 90, 0.4);
    transform: translateY(-1px);
}

.btn-shortcut:active {
    transform: translateY(1px);
}

.btn-shortcut svg {
    stroke: currentColor;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.btn-shortcut:hover svg {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .btn-shortcut {
        padding: 0;
        border-radius: 50%;
        width: 42px;
        height: 42px;
        justify-content: center;
        flex-shrink: 0;
    }
    .btn-shortcut .btn-text {
        display: none;
    }
}

/* Modal Overlay with Glassmorphism */
.shortcut-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 10, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    box-sizing: border-box;
    animation: shortcutFadeIn 0.3s ease;
}

/* Modal Box */
.shortcut-modal-box {
    background: linear-gradient(160deg, rgba(12, 20, 36, 0.98) 0%, rgba(8, 14, 26, 0.98) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 460px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: shortcutSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-sizing: border-box;
}

.shortcut-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.shortcut-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    transform: rotate(90deg);
}

.shortcut-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.shortcut-modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: rgba(203, 168, 90, 0.08);
    border: 1px solid rgba(203, 168, 90, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
    color: var(--primary);
    box-shadow: 0 8px 20px rgba(203, 168, 90, 0.1);
    animation: shortcutPulse 2s infinite;
}

.shortcut-modal-header h3 {
    color: var(--text-main);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.shortcut-modal-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Instructions List */
.shortcut-instructions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.shortcut-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    transition: border-color 0.2s ease;
}

.shortcut-step:hover {
    border-color: rgba(203, 168, 90, 0.15);
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(203, 168, 90, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.shortcut-step p {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    flex-grow: 1;
}

.shortcut-step strong {
    color: var(--primary);
    font-weight: 600;
}

.instruction-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 3px;
    margin: 0 2px;
}

.shortcut-kbd {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid rgba(255, 255, 255, 0.25);
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.shortcut-pwa-compatible {
    text-align: center;
    padding: 1rem 0;
}

.install-prompt-text {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.shortcut-install-btn {
    box-shadow: 0 4px 20px rgba(203, 168, 90, 0.25);
    animation: shortcutButtonPulse 2s infinite;
}

/* Animations */
@keyframes shortcutFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shortcutSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shortcutPulse {
    0% { box-shadow: 0 0 0 0 rgba(203, 168, 90, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(203, 168, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(203, 168, 90, 0); }
}

@keyframes shortcutButtonPulse {
    0% { box-shadow: 0 4px 20px rgba(203, 168, 90, 0.25); }
    50% { box-shadow: 0 4px 25px rgba(203, 168, 90, 0.5); }
    100% { box-shadow: 0 4px 20px rgba(203, 168, 90, 0.25); }
}

