/* ARCHIVO PERTENECIENTE A VERSION: Beta1 (FUNCIONALIDAD OK) */
:root {
    --primary-orange: #FF4D00;
    --dark-bg: #0B0B0C;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-main: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.6);
    --business-blue: #0052D4;
    --transition-fluid: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
button, img, ion-icon { user-select: none; }
body { background: var(--dark-bg); color: var(--text-main); overflow: auto; min-height: 100vh; width: 100vw; }
#app-container { height: 100vh; width: 100vw; position: relative; overflow-x: hidden; }

.hidden { display: none !important; }
#deferred-auth-modal { display: none !important; }
.auth-locked-out { display: none !important; pointer-events: none; }
.disabled { opacity: 0.4; filter: grayscale(1); pointer-events: none !important; }
.view { width: 100%; height: 100%; position: absolute; top:0; left:0; transition: filter 0.8s ease; overflow-y: auto; background: #fff; }
#workspace, #results-view { background: #000 !important; color: #fff; }
.blurred { filter: blur(20px) grayscale(0.5); pointer-events: none; }

/* Dashboard Styling (Background) */
#dashboard-view { background: var(--dark-bg); color: var(--text-main); overflow-y: auto; }
.dashboard-header { padding: 30px 25px; display: flex; justify-content: space-between; align-items: center; background: #1a1a1a; border-bottom: 1px solid #222; }
.logo-bold { font-weight: 800; font-size: 1.4rem; letter-spacing: -0.02em; color: #fff; }
.logo-accent { color: var(--primary-orange); }
.branding-signature { 
    display: block; font-size: 0.55rem; font-weight: 800; 
    letter-spacing: 3px; color: #888; text-transform: uppercase; 
    margin-top: 2px;
}

.plans-section { padding: 25px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 15px; transition: opacity 0.3s ease; }
.plans-grid.hidden { display: none !important; }
.plan-btn { background: white; border: 2px solid #eee; border-radius: 15px; padding: 15px 5px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.plan-btn.active { border-color: var(--business-blue); background: rgba(0, 82, 212, 0.05); }
.plan-price { font-weight: 900; font-size: 0.9rem; }
.plan-name { font-size: 0.5rem; font-weight: 800; color: #666; }

.upgrade-plan-btn { 
    width: 100%; padding: 12px; border-radius: 12px; background: var(--business-blue); 
    color: white; border: none; font-weight: 800; font-size: 0.8rem; margin-bottom: 15px;
    cursor: pointer; box-shadow: 0 4px 12px rgba(0, 82, 212, 0.2);
}

.premium-new-btn {
    background: #1a1a1a; border: 1.5px solid var(--primary-orange); padding: 25px 40px; border-radius: 20px;
    display: flex; flex-direction: row; align-items: center; gap: 20px;
    box-shadow: 0 15px 40px rgba(255, 77, 0, 0.12); margin: 20px auto 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-new-btn:active { transform: scale(0.96); box-shadow: 0 5px 20px rgba(255, 77, 0, 0.2); }
.premium-new-btn span { font-weight: 900; letter-spacing: 2px; color: #fff; font-size: 1rem; }
.btn-icon-circle { width: 50px; height: 50px; border-radius: 15px; background: var(--primary-orange); display: flex; align-items: center; justify-content: center; color: white; font-size: 1.8rem; flex-shrink: 0; box-shadow: 0 8px 15px rgba(255, 77, 0, 0.3); }


/* Art Gallery Dashboard (Premium Refactor v2.0) */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 5px;
    border-left: 4px solid var(--primary-orange); /* Línea de acento ArchiTech */
    margin-left: 25px; /* Alineado con el layout general */
}

.section-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #FFFFFF;
    margin: 0;
    padding-left: 12px;
    text-align: left; /* Alineación técnica profesional */
    text-transform: uppercase;
}

.view-all-link {
    background: transparent;
    border: 1px solid var(--primary-orange);
    color: var(--primary-orange);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.view-all-link:active { background: var(--primary-orange); color: white; }

.projects-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 10px 0; }
.project-card { 
    aspect-ratio: 0.8; background: var(--glass-bg); border-radius: 16px;
    border: 1px solid var(--glass-border); box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    overflow: hidden; transition: var(--transition-fluid);
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 150px;
    backdrop-filter: blur(20px);
}
.project-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 77, 0, 0.1), 0 10px 40px rgba(0,0,0,0.8);
    border-color: rgba(255, 77, 0, 0.3);
}
.project-card img { width: 100%; height: 100%; object-fit: cover; background-color: #1a1a1a; }
.empty-history-msg { grid-column: span 2; text-align: center; padding: 40px 20px; color: #999; font-weight: 600; font-size: 0.9rem; }

.project-card.skeleton { background: linear-gradient(110deg, #f0f0f0 8%, #f8f8f8 18%, #f0f0f0 33%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* Auth Modal Overlay */
#auth-modal-overlay { 
    background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 5000; display: flex; align-items: center; justify-content: center;
}
.auth-modal-card {
    background: #121212; width: 85%; max-width: 380px; border-radius: 40px;
    padding: 40px 30px; text-align: center; color: #fff;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    border: 1px solid #222;
    animation: modal-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modal-pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.auth-content-box h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: 10px; color: #fff; }
.auth-content-box p { color: #aaa; font-size: 0.85rem; margin-bottom: 30px; }

/* Custom Checkbox */
.legal-box-popup { margin-bottom: 25px; text-align: left; }
.custom-checkbox-container { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; position: relative; }
.custom-checkbox-container input { opacity: 0; position: absolute; }
.checkmark { height: 22px; width: 22px; background: #1a1a1a; border-radius: 6px; flex-shrink: 0; position: relative; border: 2px solid #333; transition: 0.3s; }
.custom-checkbox-container:hover .checkmark { background: #222; }
.custom-checkbox-container input:checked ~ .checkmark { background: var(--primary-orange); border-color: var(--primary-orange); }
.checkmark:after { content: ""; position: absolute; display: none; left: 7px; top: 3px; width: 5px; height: 10px; border: solid white; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.custom-checkbox-container input:checked ~ .checkmark:after { display: block; }
.legal-text { font-size: 0.75rem; color: #aaa; line-height: 1.4; }

/* Native Google Button */
.google-btn-native {
    width: 100%; background: #1a1a1a; color: #fff; border: 1.5px solid #222;
    padding: 16px; border-radius: 20px; font-weight: 800; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; gap: 15px;
    cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.google-btn-native img { width: 24px; height: 24px; filter: drop-shadow(0 0 2px rgba(255,255,255,0.2)); }
.google-btn-native.disabled { opacity: 0.4; filter: grayscale(1); pointer-events: none; }
.google-btn-native:active { transform: scale(0.96); opacity: 0.8; }

#btn-google-login-clean:active { transform: scale(0.96) !important; opacity: 0.8 !important; }

.admin-bypass-btn {
    width: 100%; background: #1a1a1a; color: #888; border: 1px dashed #333;
    padding: 12px; border-radius: 15px; font-weight: 700; font-size: 0.75rem;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 15px; cursor: pointer; transition: all 0.2s;
}
.admin-bypass-btn ion-icon { font-size: 1.1rem; color: var(--primary-orange); }
.admin-bypass-btn:hover { background: #222; border-color: #444; color: #fff; }

/* General Components (Workspace, etc) */
.modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 3000; display: flex; align-items: center; justify-content: center; }
/* Glass Effects & Pipeline Optimization (v1.1) */
.glass-effect {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* Fallback para dispositivos con problemas de Shader/Pipeline */
.low-power-mode .glass-effect {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10, 10, 10, 0.95);
}

.floating-glass-panel {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    border-radius: 20px;
    padding: 10px 15px 5px;
    z-index: 500;
}

.btn-primary-glow { width: 100%; background: var(--primary-orange); color: white; border: none; padding: 15px; border-radius: 20px; font-weight: 800; box-shadow: 0 10px 30px rgba(255, 77, 0, 0.4); cursor: pointer; }

/* #bottom-nav eliminado — componente de navegación Android no aplicable en web */

/* Workspace Top Bar */
.top-bar { position: absolute; top:0; width: 100%; padding: 5px 25px 0; height: 50px; display: flex; justify-content: center; align-items: center; z-index: 10; background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent); }
.top-bar .icon-btn { display: none; }

#camera-viewfinder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    pointer-events: none;
    z-index: 20;
    background:
        linear-gradient(to right, #FF4D00 20px, transparent 20px) 0 0,
        linear-gradient(to bottom, #FF4D00 20px, transparent 20px) 0 0,
        linear-gradient(to left, #FF4D00 20px, transparent 20px) 100% 0,
        linear-gradient(to bottom, #FF4D00 20px, transparent 20px) 100% 0,
        linear-gradient(to right, #FF4D00 20px, transparent 20px) 0 100%,
        linear-gradient(to top, #FF4D00 20px, transparent 20px) 0 100%,
        linear-gradient(to left, #FF4D00 20px, transparent 20px) 100% 100%,
        linear-gradient(to top, #FF4D00 20px, transparent 20px) 100% 100%;
    background-repeat: no-repeat;
    background-size: 20px 2px, 2px 20px;
    display: none;
}

#workspace #camera-viewfinder {
    display: block;
}

#camera-feed { width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0; z-index: 1; }
.context-pill { position: absolute; top: 90px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; background: rgba(0,0,0,0.6); padding: 5px; border-radius: 30px; z-index: 15; backdrop-filter: blur(10px); }
.context-btn { background: transparent; border: none; color: white; padding: 8px 15px; border-radius: 25px; font-size: 0.7rem; font-weight: 700; }
.context-btn.active { background: rgba(255,255,255,0.2); }

/* Área Catalog Grid (Premium Text Mode v2.0) */
.area-catalog-grid {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
    align-items: center;
}
.area-catalog-grid::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
    .area-catalog-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow-x: visible;
        flex-wrap: unset;
        gap: 8px;
        padding: 4px 0;
    }
}

.area-text-btn {
    flex: 1 1 auto;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    background: #1A1A1A; /* Estado Inactivo */
    color: #A0A0A0; /* Texto Gris Claro */
    border: none;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    scroll-snap-align: start;
}

.area-text-btn.active {
    background: #FF5722; /* Naranja ArchiTech */
    color: #FFFFFF; /* Texto Blanco Negrita */
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4); /* Glow */
    transform: scale(1.05);
}

.area-text-btn:active { transform: scale(0.95); }

.direct-actions-box { display: flex; gap: 15px; }
.action-btn-large { 
    width: 60px; height: 60px; /* 20% larger than standard 50px */
    border-radius: 18px; border: none; color: white; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.8rem; cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.action-btn-large:active { transform: scale(0.9); }

/* SIDE DRAWER STYLING */
.drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    z-index: 9000; opacity: 0; transition: opacity 0.3s ease;
}
.drawer-overlay:not(.hidden) { opacity: 1; }

.drawer-content {
    position: absolute; top: 0; right: -280px; width: 280px; height: 100%;
    background: #121212; color: #fff;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    border-left: 1px solid #222;
}
.drawer-overlay:not(.hidden) .drawer-content { right: 0; }

.drawer-header {
    padding: 40px 25px 25px; background: #1a1a1a; border-bottom: 1px solid #222;
    position: relative;
}
.drawer-close-btn {
    position: absolute; top: 15px; right: 15px;
    background: #222; border: none; color: #fff;
    width: 40px; height: 40px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s, opacity 0.2s;
}
.drawer-close-btn:active { transform: scale(0.95); opacity: 0.8; }
.drawer-user-info { display: flex; align-items: center; gap: 15px; }
.drawer-avatar-circle { width: 50px; height: 50px; color: var(--primary-orange); font-size: 3rem; display: flex; align-items: center; justify-content: center; }
.drawer-user-details { display: flex; flex-direction: column; gap: 4px; }
.user-name-text { font-weight: 800; font-size: 1.1rem; color: #fff; }
.admin-badge { background: var(--primary-orange); color: white; font-size: 0.6rem; font-weight: 900; padding: 2px 8px; border-radius: 5px; width: fit-content; }

.drawer-body { flex: 1; padding: 20px 0; }
.drawer-menu-list { list-style: none; }
.drawer-menu-item { 
    display: flex; align-items: center; gap: 15px; padding: 18px 25px; 
    font-weight: 600; font-size: 0.95rem; color: #aaa; cursor: pointer;
    transition: background 0.2s;
}
.drawer-menu-item:active { background: #1a1a1a; color: #fff; }
.drawer-menu-item ion-icon { font-size: 1.4rem; color: #888; }
.drawer-divider { border: none; border-top: 1px solid #222; margin: 10px 0; }

.logout-item { color: #ff4444; }
.logout-item ion-icon { color: #ff4444; }

.drawer-footer { padding: 20px 25px; border-top: 1px solid #222; text-align: center; }
.app-version { font-size: 0.7rem; color: #666; font-weight: 700; letter-spacing: 1px; }

/* Workspace Repair - Missing Styles */
.controls-action-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 15px; }

.btn-unified-image { 
    width: 50px; height: 50px; border-radius: 15px; background: #1a1a1a; border: 1px solid #222;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    cursor: pointer; flex-shrink: 0;
}
.split-icons { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #fff; font-size: 1.2rem; }
.icon-divider { width: 15px; height: 1px; background: #333; }

.mode-toggle-pill { 
    flex: 1; display: flex; background: rgba(255,255,255,0.1); padding: 4px; border-radius: 15px; 
    height: 45px; align-items: center;
}
.toggle-btn { 
    flex: 1; height: 100%; border: none; background: transparent; color: #888; 
    font-weight: 800; font-size: 0.7rem; border-radius: 12px; transition: 0.3s;
}
.toggle-btn.active { background: #fff; color: var(--primary-orange); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

/* ── Carrusel de estilos — mobile: scroll horizontal, desktop: grid ── */
.horizontal-carousel {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 4px;
    margin-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}
.horizontal-carousel::-webkit-scrollbar { display: none; }

/* En desktop: grid de 4 columnas, thumbs más grandes */
@media (min-width: 768px) {
    .horizontal-carousel {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow-x: visible;
        gap: 10px;
        padding: 4px 0;
        max-height: 280px;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(255,77,0,0.3) transparent;
    }
    .horizontal-carousel::-webkit-scrollbar {
        display: block;
        width: 4px;
    }
    .horizontal-carousel::-webkit-scrollbar-thumb {
        background: rgba(255,77,0,0.3);
        border-radius: 4px;
    }
}

.style-item {
    flex: 0 0 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
    cursor: pointer;
    border-radius: 12px;
    padding: 6px 4px;
    border: 1px solid transparent;
}
.style-item:hover { background: rgba(255,255,255,0.04); }
.style-item.active { background: rgba(255,77,0,0.08); border-color: rgba(255,77,0,0.3); }
.style-item.active .style-thumb { border: 2px solid var(--primary-orange); transform: scale(1.04); }
.style-item.active span { color: var(--primary-orange); font-weight: 800; }

.style-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    transition: 0.25s;
}

/* Desktop: thumbs más grandes en el grid */
@media (min-width: 768px) {
    .style-item { flex: unset; width: 100%; padding: 8px 6px; border-radius: 14px; }
    .style-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; }
}

.style-item span { font-size: 0.6rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.5px; text-align: center; }

/* Action Sheet Styling */
.action-sheet-overlay {
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    display: flex; align-items: flex-end; justify-content: center;
}
.action-sheet-content {
    width: 100%; background: #121212; border-radius: 35px 35px 0 0; padding: 20px 25px 40px;
    border-top: 1px solid #222;
    animation: sheet-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sheet-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Desktop: convertir bottom-sheet en modal centrado */
@media (min-width: 768px) {
    .action-sheet-overlay {
        align-items: center;
        justify-content: center;
    }
    .action-sheet-content {
        width: auto;
        min-width: 380px;
        max-width: 460px;
        border-radius: 24px;
        animation: modal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
}

.handle-bar {
    width: 40px; height: 5px; background: #333; border-radius: 3px; margin: 0 auto 25px;
}
/* En desktop ocultar el handle (solo es para swipe móvil) */
@media (min-width: 768px) {
    .handle-bar { display: none; }
}
.action-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
.action-card { 
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 24px; padding: 40px 20px;
    display: flex; flex-direction: column; align-items: center; gap: 20px; cursor: pointer;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8); transition: var(--transition-fluid);
    backdrop-filter: blur(20px);
}
.action-card:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 40px rgba(255, 77, 0, 0.1), 0 10px 40px rgba(0,0,0,0.8); border-color: rgba(255, 77, 0, 0.3); }
.action-card:active { transform: translateY(-1px) scale(0.98); }
.action-card span { font-weight: 900; font-size: 0.75rem; color: #fff; letter-spacing: 1px; }
.card-icon-box { 
    width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: white;
}
.orange-glow { background: var(--primary-orange); box-shadow: 0 8px 20px rgba(255, 77, 0, 0.3); }
.grey-glow { background: #333; box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

/* Color Swatches Restoration */
.color-item { 
    flex: 0 0 65px; display: flex; flex-direction: column; align-items: center; gap: 5px;
    transition: transform 0.2s; cursor: pointer;
}
.color-circle { 
    width: 45px; height: 45px; border-radius: 50%; border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); transition: 0.3s;
}
.color-item.active .color-circle { border: 3px solid var(--primary-orange); transform: scale(1.1); }
.color-item.active span { color: var(--primary-orange); font-weight: 800; }
.color-item span { font-size: 0.55rem; font-weight: 600; color: #999; text-transform: uppercase; text-align: center; }
.quota-pill-discrete { background: rgba(255,255,255,0.05); padding: 5px 12px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
#quota-text { color: #888; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; }

/* Image Preview Fixing */
#image-preview { 
    width: 90%; /* Ajuste para mayor visibilidad */
    height: auto;
    max-height: 65vh; /* Ocupar la mayor parte del área libre */
    object-fit: contain;
    position: absolute;
    top: 48%; /* Ajustado para centrar entre top-bar y panel bajo */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5; border-radius: 20px; 
    border: 3px solid var(--accent); 
    box-shadow: 0 0 30px var(--accent-glow);
}

/* RESULTS VIEW INTERACTIVE SLIDER (v45.0) */
.results-slider-container {
    width: 100%;
    height: 65vh;
    padding: 100px 20px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* Desktop: aprovechar el ancho, slider más grande y layout horizontal */
@media (min-width: 900px) {
    #results-view {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .results-slider-container {
        height: 75vh;
        max-width: 1100px;
        width: 100%;
        padding: 80px 40px 20px;
        margin: 0 auto;
    }
    .ba-slider {
        max-width: 900px;
        margin: 0 auto;
    }
    .results-actions {
        display: flex;
        flex-direction: row;
        gap: 12px;
        max-width: 900px;
        width: 100%;
        padding: 0 40px 30px;
    }
    .results-actions button {
        flex: 1;
        margin-bottom: 0 !important;
    }
}

.ba-slider {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.ba-img-original, .ba-img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: center;
}

.ba-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    border-right: 2px solid rgba(255,255,255,0.8);
}

.ba-img-after {
    width: auto;
    min-width: 100%;
    max-width: none;
}

.ba-handle {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 4px;
    background: transparent;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ba-handle-line {
    flex: 1;
    width: 2px;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.ba-handle-circle {
    width: 45px;
    height: 45px;
    background: var(--primary-orange);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(255, 77, 0, 0.5);
    margin: 10px 0;
}

.ba-handle-circle ion-icon {
    margin: 0 -2px;
}

.ba-label {
    position: absolute;
    bottom: 20px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: white;
    z-index: 5;
    transition: opacity 0.5s ease;
}

.ba-label-before { left: 20px; }
.ba-label-after { right: 20px; }
.ba-labels-hidden .ba-label { opacity: 0; }

/* LOADING ADVICE VIEW (v55.0) */
#generating-modal {
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 9999;
    flex-direction: column;
    text-align: center;
    color: white;
    padding: 40px;
}

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

.spinner-box ion-icon {
    font-size: 4.5rem;
    color: var(--primary-orange);
    animation: rotate 2.5s linear infinite;
    margin-bottom: 25px;
}

.generating-main-title {
    font-weight: 900;
    margin-bottom: 15px;
    letter-spacing: 3px;
    font-size: 1.2rem;
    color: white;
}

.progress-bar-container-new {
    width: 220px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    margin: 10px auto 40px;
    overflow: hidden;
}

.progress-fill {
    width: 10%;
    height: 100%;
    background: var(--primary-orange);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--primary-orange);
}

#loading-advice-container {
    max-width: 300px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.advice-title {
    color: #FF6D00;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.advice-text {
    color: #E0E0E0;
    font-weight: 500;
    font-size: 0.9rem; /* Approx 14sp */
    line-height: 1.5;
    text-align: center;
    transition: opacity 1000ms ease-in-out;
}

@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }


/* FULL GALLERY STYLING (v41.3) */
#full-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 15px;
}

.project-card-mini {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #333;
    min-height: 150px;
}

.project-card-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Lightbox Styling (v60.0 - ViewPager2 Style) */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.98);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.close-lightbox {
    position: absolute;
    top: 50px; right: 25px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    width: 50px; height: 50px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    z-index: 12000;
    transition: all 0.2s ease;
}
.close-lightbox:active { transform: scale(0.9); background: rgba(0,0,0,0.6); }

.lightbox-main-container {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.05);
    border: none;
    color: white;
    width: 50px;
    height: 80px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11005;
    border-radius: 12px;
}
.nav-arrow.left { left: 10px; }
.nav-arrow.right { right: 10px; }
.nav-arrow:active { background: rgba(255,255,255,0.2); }

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    transition: transform 0.3s ease-out;
}

.pinch-zoom {
    touch-action: none;
    user-select: none;
}

.lightbox-footer {
    width: 100%;
    padding: 30px 0 50px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.lightbox-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.action-btn-circle {
    width: 60px; /* 60px is approx 48dp+ on mobile */
    height: 60px;
    border-radius: 50%;
    border: none; background: #333;
    color: white; font-size: 1.6rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    transition: transform 0.2s;
}
.action-btn-circle:active { transform: scale(0.9); }

.action-btn-circle.orange-brand {
    background: var(--primary-orange);
    box-shadow: 0 10px 30px rgba(255, 77, 0, 0.4);
}

.action-btn-circle.danger { background: #cc4e2c; }

/* SUBSCRIPTION VIEW (v1.0 - Responsive & Antigravity) */
#subscription-modal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(10px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
}
#subscription-modal.hidden { display: none !important; }

.subscription-card-container {
    width: 95%; max-width: 400px; max-height: 85vh; overflow-y: auto;
    background: rgba(20, 20, 20, 0.95); backdrop-filter: blur(20px);
    border-radius: 30px; padding: 25px 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    display: flex; flex-direction: column; align-items: center;
}

.sub-title { font-weight: 900; font-size: 1.4rem; color: #fff; margin-bottom: 5px; }
.sub-tagline { font-size: 0.8rem; color: #aaa; margin-bottom: 20px; text-align: center; }

.plans-stack { width: 100%; display: flex; flex-direction: column; gap: 12px; }

.plan-item-vip {
    width: 100%; background: #1a1a1a; border-radius: 20px;
    padding: 15px; display: flex; justify-content: space-between; align-items: center;
    border: 1px solid #333; position: relative;
    transition: all 0.3s ease;
}

.plan-item-vip.is-active-plan {
    border: 2px solid #FFD700;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
    transform: scale(1.02);
}

.plan-item-vip.is-active-plan::after {
    content: "PLAN ACTUAL";
    position: absolute;
    top: -10px;
    right: 20px;
    background: #FFD700;
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
}

.plan-tier { font-weight: 800; font-size: 0.8rem; color: #fff; }
.plan-cost { font-weight: 900; font-size: 1.1rem; color: #fff; }
.plan-cost small { font-size: 0.6rem; color: #888; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.plan-features li { font-size: 0.65rem; color: #999; display: flex; align-items: center; gap: 5px; }

.plan-select-btn {
    background: #333; color: #fff; border: none; padding: 8px 15px;
    border-radius: 12px; font-weight: 800; font-size: 0.7rem; cursor: pointer;
}
.plan-select-btn.orange { background: var(--primary-orange); }

.close-modal-btn {
    position: sticky; top: 0; align-self: flex-end;
    background: #333; border: none; color: white;
    width: 35px; height: 35px; border-radius: 50%;
    font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
    margin-bottom: 15px;
}

/* USER GUIDE MODAL STYLING */
.guide-card-container {
    width: 90%;
    max-width: 400px;
    background: #1a1a1a;
    border-radius: 30px;
    padding: 30px 25px;
    border: 1px solid #333;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.guide-header { text-align: center; margin-bottom: 25px; }
.guide-title { font-weight: 900; font-size: 1.4rem; letter-spacing: 2px; color: #fff; margin-bottom: 5px; }
.guide-subtitle { font-size: 0.75rem; color: #888; font-weight: 600; }

.guide-steps-scroll {
    overflow-y: auto;
    flex: 1;
    padding-right: 5px;
    margin-bottom: 10px;
}
.guide-steps-scroll::-webkit-scrollbar { width: 4px; }
.guide-steps-scroll::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }

.guide-step-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #222;
}
.guide-step-item:last-child { border-bottom: none; margin-bottom: 0; }

.guide-step-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 1.5rem;
    flex-shrink: 0;
}
.guide-step-icon.orange-bright { background: var(--primary-orange); color: #fff; box-shadow: 0 0 15px rgba(255, 77, 0, 0.3); }

.guide-step-content h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 4px;
}
.guide-step-content p {
    color: #aaa;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* WELCOME ONBOARDING MODAL (v1.0) */
#welcome-onboarding-modal {
    z-index: 20000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.welcome-card {
    width: 90%;
    max-width: 350px;
    background: #1a1a1a;
    border-radius: 35px;
    padding: 35px 25px;
    text-align: center;
    border: 1px solid #333;
    box-shadow: 0 25px 60px rgba(0,0,0,0.7);
    animation: welcome-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes welcome-pop {
    from { transform: scale(0.8) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.welcome-icon-box {
    width: 70px;
    height: 70px;
    background: var(--primary-orange);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2.5rem;
    box-shadow: 0 10px 25px rgba(255, 77, 0, 0.3);
}

.welcome-title {
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 15px;
}

.welcome-text {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.5;
    margin-bottom: 25px;
}

.welcome-gift-box {
    background: rgba(255, 77, 0, 0.1);
    border: 1px dashed var(--primary-orange);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gift-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--primary-orange);
    letter-spacing: 2px;
}

.gift-value {
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
}

.welcome-features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 30px;
    padding-left: 10px;
}

.welcome-features-list li {
    font-size: 0.8rem;
    color: #eee;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-features-list li ion-icon {
    color: var(--primary-orange);
    font-size: 1.2rem;
}

/* Toast System */
.toast-container {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    z-index: 10000; pointer-events: none; transition: all 0.5s ease;
}
.toast-content { 
    background: rgba(0,0,0,0.85); color: white; padding: 12px 25px; 
    border-radius: 30px; font-size: 0.8rem; font-weight: 600; 
    backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

/* -- Selector de Idiomas -- */
.lang-selector { display: flex; gap: 8px; align-items: center; margin-left: 20px; border-left: 1px solid rgba(255,255,255,0.1); padding-left: 20px; }
.lang-flag { width: 22px; height: 16px; border-radius: 3px; cursor: pointer; opacity: 0.5; transition: all 0.2s; border: 1px solid rgba(255,255,255,0.2); }
.lang-flag:hover { opacity: 0.8; transform: scale(1.1); }
.lang-flag.active { opacity: 1; border: 1px solid #FF4D00; transform: scale(1.1); box-shadow: 0 0 8px rgba(255,77,0,0.5); }
