/* Modern Dark Theme Design System for AeroStitch 360 */
:root {
    --bg-dark: #090a0f;
    --bg-panel: #11141d;
    --bg-subpanel: #171c28;
    --primary: #8a2be2;      /* Electric Purple */
    --secondary: #00d2ff;    /* Cyan/Blue Neon */
    --accent: #ff007f;       /* Pink/Magenta Accent */
    --text-main: #f0f3fa;
    --text-muted: #8b9bb4;
    --border-color: #283046;
    --success: #00e676;
    --warning: #ffb300;
    --danger: #ff1744;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-header: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

h1 {
    font-family: var(--font-header);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* App Container Layout */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Sidebar Styling */
aside {
    width: 380px;
    background-color: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 5;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

aside::-webkit-scrollbar {
    width: 6px;
}

aside::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.sidebar-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section h3 {
    font-family: var(--font-header);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Upload Area */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.3s ease;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--secondary);
    background-color: rgba(0, 210, 255, 0.05);
}

.upload-zone svg {
    width: 40px;
    height: 40px;
    stroke: var(--text-muted);
    margin-bottom: 10px;
    transition: stroke 0.3s ease;
}

.upload-zone:hover svg {
    stroke: var(--secondary);
}

.upload-zone p {
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.upload-zone span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Dropdown/Select and Slider styles */
.control-group {
    margin-bottom: 14px;
}

.control-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.control-label span.value-bubble {
    font-family: monospace;
    color: var(--secondary);
    background: rgba(0, 210, 255, 0.1);
    padding: 1px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

select {
    width: 100%;
    background-color: var(--bg-subpanel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

select:focus {
    border-color: var(--primary);
}

/* Sliders */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: var(--bg-subpanel);
    border-radius: 3px;
    border: 1px solid var(--border-color);
}

input[type="range"]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
    transition: background 0.1s, transform 0.1s;
}

input[type="range"]:active::-webkit-slider-thumb {
    background: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(138, 43, 226, 0.6);
}

/* Accordions for Lens Control */
.accordion {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-main);
    padding: 16px 20px;
    font-family: var(--font-header);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.accordion-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(0, 0, 0, 0.1);
}

.accordion-inner {
    padding: 0 20px 20px 20px;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-subpanel);
    border: 1px solid var(--border-color);
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: rgba(0, 210, 255, 0.2);
    border-color: var(--secondary);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: var(--secondary);
    box-shadow: 0 0 8px rgba(0, 210, 255, 0.5);
}

/* Batch File List (Sidebar) */
.batch-list-container {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    /* overflow visible: el aside padre ya tiene overflow-y: auto */
}

.batch-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.batch-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Sin overflow ni flex-grow: fluye naturalmente en el aside scrollable */
}

.batch-item {
    background-color: var(--bg-subpanel);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.batch-item:hover {
    border-color: var(--border-color);
    background-color: rgba(255, 255, 255, 0.02);
}

.batch-item.active {
    border-color: var(--secondary);
    background-color: rgba(0, 210, 255, 0.03);
}

.batch-item-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
    margin-right: 8px;
}

.batch-item-name {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    color: var(--text-main);
}

.batch-item-status {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-muted);
    display: inline-block;
}

.status-dot.pending { background-color: var(--warning); }
.status-dot.processing { background-color: var(--secondary); animation: pulse 1s infinite alternate; }
.status-dot.done { background-color: var(--success); }
.status-dot.error { background-color: var(--danger); }

.batch-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

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

.icon-btn.remove-btn:hover {
    color: var(--danger);
    background-color: rgba(255, 23, 68, 0.1);
}

/* Primary buttons */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6f11cf);
    color: white;
    box-shadow: 0 4px 14px rgba(138, 43, 226, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #00b6dd);
    color: #050508;
    box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

.btn-disabled {
    background-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.btn-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

/* Main Content Area */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

/* Main Tab Bar */
.tab-bar {
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: flex-end;
    height: 48px;
    gap: 8px;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    padding: 12px 16px;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Viewport Area */
.viewport-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewport-tab {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Reducir altura del tab cuando los controles de video están visibles para evitar superposición */
.viewport-container.has-video-controls .viewport-tab {
    height: calc(100% - 50px);
}

.viewport-tab.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2D Canvas Container */
.canvas-wrapper {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: radial-gradient(circle, #202533 0%, #0d0f14 100%);
}

#glCanvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Overlay 2D calibration canvas */
#overlayCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Let clicks pass through to container if needed */
}

/* Helper Info Overlay */
.viewport-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(17, 20, 29, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: bottom 0.2s ease;
}

/* Subir la información si la barra de controles de video global está visible */
.viewport-container.has-video-controls .viewport-info {
    bottom: 68px; /* 20px default + 48px alto de controles */
}
}

.viewport-info span strong {
    color: var(--text-main);
}

/* Grid layout for batch manager tab */
.batch-manager-tab {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    height: 100%;
}

.batch-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-card .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 1.8rem;
    font-family: var(--font-header);
    font-weight: 700;
    color: var(--text-main);
}

.stat-card.accented .value {
    color: var(--secondary);
}

.batch-progress-section {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--bg-subpanel);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.batch-grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.grid-item {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
}

.grid-item:hover {
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.grid-item-thumb-wrapper {
    aspect-ratio: 2/1;
    background-color: var(--bg-subpanel);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.grid-item-status-overlay {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-size: 0.65rem;
    color: white;
}

.grid-item-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grid-item-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-item-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Modals & Loaders */
.loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 10, 15, 0.85);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.loader-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 210, 255, 0.1);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.loader-text {
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
}

.loader-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

/* Drag overlay */
.app-drag-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(138, 43, 226, 0.2);
    border: 4px dashed var(--primary);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.app-drag-overlay.active {
    display: flex;
}

.app-drag-overlay-content {
    background-color: var(--bg-panel);
    padding: 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
}

/* Video Controls */
.video-controls {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    padding: 12px;
    background: rgba(17, 20, 29, 0.95);
    border-top: 1px solid var(--border-color);
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    z-index: 20; /* Asegurar visibilidad sobre pestañas absolutas */
}

.video-controls span {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.video-controls input[type="range"] {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background-color: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.video-controls input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
    border: none;
}

.video-controls input[type="range"]::-webkit-slider-thumb {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: var(--secondary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -4px;
    box-shadow: 0 0 6px rgba(0, 210, 255, 0.4);
}

/* Responsive UI tweaks */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    aside {
        width: 100%;
        height: 350px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* ================= ESTILOS DE MODALES Y FORMULARIOS ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.modal-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    padding: 10px;
    cursor: pointer;
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.modal-tab.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    background-color: var(--bg-subpanel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    color: white;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--secondary);
}

/* Métodos de Pago */
.pricing-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.payment-method-card {
    background-color: var(--bg-subpanel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.payment-method-card a {
    text-decoration: none;
}

/* Tabla de Administración */
.admin-table {
    margin-top: 10px;
}

.admin-table th, .admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background-color: rgba(255,255,255,0.02);
}

/* Píldoras de Estado en Cabecera */
#userStatusPill.active {
    background-color: rgba(0, 230, 118, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

#userStatusPill.pending {
    background-color: rgba(255, 179, 0, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* Landing Page Premium Styling */
.landing-container {
    height: calc(100vh - 60px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}
.landing-container::-webkit-scrollbar {
    width: 6px;
}
.landing-container::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

.feature-card, .price-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary) !important;
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.1);
}

.price-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary) !important;
    box-shadow: 0 10px 30px rgba(138, 43, 226, 0.15);
}

.demo-banner {
    box-shadow: 0 4px 15px rgba(255, 0, 127, 0.2);
}

/* Permitir scroll nativo y fluido en la landing page */
body.landing-active {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
}

body.landing-active .landing-container {
    height: auto !important;
    overflow: visible !important;
}

/* ============================================================
   LANDING PAGE PREMIUM V2 — AeroStitch 360
   ============================================================ */

.landing-container {
    max-width: 1100px !important;
    padding: 40px 24px 60px !important;
    gap: 0 !important;
}

/* ---- HERO V2 (2-col) ---- */
.lp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 40px 0 60px;
    position: relative;
}
.lp-hero::after {
    content: '';
    position: absolute;
    inset: -80px -200px;
    background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(138,43,226,.12) 0%, transparent 70%),
                radial-gradient(ellipse 40% 40% at 30% 50%, rgba(0,210,255,.06) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
.lp-hero-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; }
.lp-hero-visual { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; min-height: 320px; }

.lp-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(138,43,226,.15);
    border: 1px solid rgba(138,43,226,.4);
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    width: fit-content;
}
.lp-brand-badge::before { content: '●'; color: var(--success); font-size: .55rem; }

.lp-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.lp-trust span { display: flex; align-items: center; gap: 5px; }
.lp-trust span::before { content: '✓'; color: var(--success); font-weight: 700; }

/* Camera visual */
.lp-camera-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lp-camera-glow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(138,43,226,.35) 0%, rgba(0,210,255,.15) 50%, transparent 70%);
    animation: glowPulse 3s ease-in-out infinite;
}
.lp-camera-glow::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px solid rgba(138,43,226,.2);
    animation: glowRing 3s ease-in-out infinite;
}
.lp-camera-glow::after {
    content: '';
    position: absolute;
    inset: -44px;
    border-radius: 50%;
    border: 1px solid rgba(0,210,255,.12);
    animation: glowRing 3s ease-in-out .5s infinite;
}
.lp-camera-img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    animation: floatCamera 3.5s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(138,43,226,.5)) drop-shadow(0 0 15px rgba(0,210,255,.3));
}

/* Floating badges */
.lp-float-badge {
    position: absolute;
    background: rgba(17,20,29,.9);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-main);
    backdrop-filter: blur(8px);
    white-space: nowrap;
    z-index: 3;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    animation: floatBadge 4s ease-in-out infinite;
}
.lp-float-badge span { color: var(--secondary); font-size: .85em; }
.lp-float-badge-1 { top: 20px; right: -10px; animation-delay: 0s; }
.lp-float-badge-2 { bottom: 40px; right: -20px; animation-delay: .8s; }
.lp-float-badge-3 { bottom: 0; left: 0; animation-delay: 1.6s; }

@keyframes floatCamera {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50%       { transform: translateY(-14px) rotate(2deg); }
}
@keyframes glowPulse {
    0%, 100% { opacity: .7; transform: scale(1); }
    50%       { opacity: 1;  transform: scale(1.08); }
}
@keyframes glowRing {
    0%, 100% { opacity: .3; transform: scale(1); }
    50%       { opacity: .8; transform: scale(1.06); }
}
@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

/* ---- STATS STRIP ---- */
.lp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 70px;
}
.lp-stat {
    background: var(--bg-panel);
    padding: 22px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.lp-stat strong {
    font-family: var(--font-header);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 30%, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.lp-stat small {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ---- SECTION HEADER ---- */
.lp-section-header {
    text-align: center;
    margin-bottom: 36px;
}
.lp-section-header h3 {
    font-family: var(--font-header);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}
.lp-section-header p { color: var(--text-muted); font-size: 0.9rem; }

/* ---- COMPATIBLE CAMERAS ---- */
.lp-devices { margin-bottom: 70px; }
.lp-devices-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.lp-device-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transition: border-color .2s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}
.lp-device-card:hover {
    border-color: rgba(138,43,226,.5);
    box-shadow: 0 8px 32px rgba(138,43,226,.15);
}
.lp-device-card--featured {
    border-color: rgba(138,43,226,.4);
    background: linear-gradient(145deg, var(--bg-panel), rgba(138,43,226,.06));
}
.lp-device-card--featured::before {
    content: '★ RECOMENDADO';
    position: absolute;
    top: 14px;
    right: -28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 4px 36px;
    transform: rotate(35deg);
    letter-spacing: .1em;
}
.lp-device-img {
    width: 160px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(138,43,226,.3));
    transition: transform .3s;
}
.lp-device-card:hover .lp-device-img { transform: scale(1.06); }
.lp-device-info { text-align: center; width: 100%; }
.lp-device-info h4 {
    font-family: var(--font-header);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.lp-device-info h4 span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lp-device-info .lp-device-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.lp-device-specs {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: left;
    padding: 0 10px;
}
.lp-device-specs li::before { content: '›  '; color: var(--secondary); font-weight: 700; }
.lp-preset-tag {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: rgba(139,155,180,.1);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.lp-preset-tag--primary {
    background: rgba(138,43,226,.15);
    border-color: rgba(138,43,226,.4);
    color: var(--secondary);
}

/* ---- HOW IT WORKS ---- */
.lp-steps { margin-bottom: 70px; }
.lp-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.lp-step {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.lp-step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 1rem;
    color: white;
    margin-bottom: 6px;
    flex-shrink: 0;
}
.lp-step h4 {
    font-family: var(--font-header);
    font-size: 1rem;
    font-weight: 700;
}
.lp-step p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ---- FEATURES (override) ---- */
.landing-features { margin-bottom: 70px !important; }
.feature-card {
    transition: border-color .2s, transform .2s, box-shadow .2s !important;
}
.feature-card:hover {
    border-color: rgba(0,210,255,.3) !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 36px rgba(0,0,0,.3) !important;
}

/* ---- PRICE CARD (override) ---- */
.price-dual-currency {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 4px 0;
}
.price-usd {
    font-family: var(--font-header);
    font-size: 3.2rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: flex-start;
    gap: 2px;
    line-height: 1;
}
.price-usd sup { font-size: 1.2rem; font-weight: 600; margin-top: 6px; }
.price-usd sub { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); align-self: flex-end; margin-bottom: 4px; }
.price-pen {
    font-size: 0.82rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 10px;
}
.price-pen strong { color: var(--secondary); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .lp-hero { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .lp-hero-text { align-items: center; }
    .lp-trust { justify-content: center; }
    .lp-stats { grid-template-columns: repeat(2, 1fr); }
    .lp-devices-grid { grid-template-columns: 1fr; }
    .lp-steps-grid { grid-template-columns: 1fr; }
    .lp-camera-wrap { width: 220px; height: 220px; }
    .lp-camera-img { width: 170px; height: 170px; }
    .hero-title { font-size: 2rem !important; }
    .lp-float-badge-1, .lp-float-badge-3 { display: none; }
}



