﻿/**
 * @file css/pro-ui.css
 * @description Studio Motion Pro UI Enhancements
 * 
 * MEJORAS:
 * - Glassmorphism avanzado con mÃºltiples capas
 * - Micro-animaciones tÃ¡ctiles
 * - Feedback visual mejorado
 * - Transiciones suaves
 * - Dark mode premium
 */

/* ============================================================================
   VARIABLES EXTENDIDAS
   ============================================================================ */

:root {
    /* Colores refinados */
    --bg-deep: #050506;
    --bg-elevated: #0c0c0e;
    --panel-bg-solid: rgba(18, 18, 21, 0.98);
    --panel-bg-glass: rgba(24, 24, 27, 0.75);
    --panel-bg-subtle: rgba(30, 30, 35, 0.6);

    /* Bordes con gradiente sutil */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(139, 92, 246, 0.3);

    /* Sombras profesionales */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);

    /* Gradientes premium */
    --gradient-panel: linear-gradient(135deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.01) 50%,
            rgba(0, 0, 0, 0.02) 100%);
    --gradient-border: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.08) 100%);

    /* Timing functions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================================
   GLASSMORPHISM AVANZADO
   ============================================================================ */

/* Panel flotante base mejorado */
.tool-panel {
    background: var(--panel-bg-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-medium);
    box-shadow:
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
}

/* Capa de gradiente interno */
.tool-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-panel);
    pointer-events: none;
    z-index: 0;
}

.tool-panel>* {
    position: relative;
    z-index: 1;
}

/* Header del panel con efecto sutil */
.panel-header {
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.03) 0%,
            transparent 100%);
    border-bottom: 1px solid var(--border-subtle);
}

/* Controles flotantes centrales */
.floating-controls .center-actions {
    background: var(--panel-bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 100px;
    gap: 14px;
}

/* ============================================================================
   BOTONES CON MICRO-ANIMACIONES
   ============================================================================ */

/* Reset de transiciones para botones */
.icon-btn,
.btn-float-action,
.btn-play,
.btn-eraser,
.btn-fx,
.tab-item,
.btn-save,
.btn-primary,
.btn-secondary {
    transition: none !important;
    will-change: auto;
}

/* Estado hover - elevaciÃ³n sutil */
.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    /* Ensure visibility */
    background: rgba(255, 255, 255, 0.08);
    /* Base fallback */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.icon-btn:hover,
.btn-float-action:hover:not(:disabled),
.btn-eraser:hover,
.btn-fx:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Estado activo - press feedback */
.icon-btn:active,
.btn-float-action:active:not(:disabled),
.btn-eraser:active,
.btn-fx:active,
.tab-item:active {
    transform: scale(0.94) translateY(0);
    transition-duration: 0.1s;
}

/* BotÃ³n Play especial */
.btn-play {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    border: none;
}

.btn-play:hover {
    transform: scale(1.05);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.btn-play:active {
    transform: scale(0.95);
    transition-duration: 0.08s;
}

.btn-play.playing {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow:
        0 4px 20px var(--accent-glow),
        0 2px 4px rgba(0, 0, 0, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.15);
}

/* BotÃ³n Save premium */
.btn-save {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.08) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-sm);

    /* Restored structural styles */
    padding: 8px 20px;
    border-radius: 99px;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    cursor: pointer;
}

.btn-save:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.18) 0%,
            rgba(255, 255, 255, 0.12) 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-save:active {
    transform: scale(0.97) translateY(0);
}

/* ============================================================================
   TABS MEJORADOS
   ============================================================================ */

.tab-item {
    position: relative;
    background: transparent;
    border-radius: 14px;
    overflow: hidden;
}

/* Efecto de fondo al hacer hover */
.tab-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: inherit;
}

.tab-item:hover::before {
    opacity: 1;
}

/* Estado activo del tab */
.tab-item.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent);
}

.tab-item.active::before {
    background: linear-gradient(135deg,
            rgba(139, 92, 246, 0.1) 0%,
            transparent 100%);
    opacity: 1;
}

/* Ripple effect en mobile */
@media (hover: none) {
    .tab-item::after {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at center,
                rgba(255, 255, 255, 0.2) 0%,
                transparent 70%);
        opacity: 0;
        transform: scale(0);
        transition:
            transform 0.4s var(--ease-out-expo),
            opacity 0.3s ease;
    }

    .tab-item:active::after {
        opacity: 1;
        transform: scale(2);
        transition-duration: 0s;
    }
}

/* ============================================================================
   SLIDER PREMIUM
   ============================================================================ */

.slider-track {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    height: 8px;
    position: relative;
    overflow: visible;
}

/* Efecto de brillo en el track */
.slider-track::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.slider-fill {
    background: linear-gradient(90deg,
            var(--accent) 0%,
            #a78bfa 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.slider-thumb {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    border-radius: 50%;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition:
        transform 0.15s var(--ease-out-expo),
        box-shadow 0.15s ease;
}

.slider-track:hover .slider-thumb,
.slider-track:active .slider-thumb {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 3px var(--accent-glow),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ============================================================================
   MODALES PREMIUM
   ============================================================================ */

.modal-overlay {
    transition:
        opacity 0.3s var(--ease-out-expo),
        visibility 0.3s;
}

.modal-content {
    background: var(--panel-bg-solid);
    border: 1px solid var(--border-medium);
    box-shadow:
        var(--shadow-lg),
        0 0 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: transform 0.4s var(--ease-out-expo);
}

/* Tabs de exportaciÃ³n */
.export-tabs {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 14px;
    padding: 5px;
}

.export-tab {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.2s var(--ease-out-expo);
}

.export-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

.export-tab.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    box-shadow: 0 2px 10px var(--accent-glow);
}

/* Botones de aspect ratio */
.aspect-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s var(--ease-out-expo);
}

.aspect-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-medium);
    transform: translateY(-2px);
}

.aspect-btn.active {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

/* BotÃ³n de render */
.btn-render {
    background: linear-gradient(135deg, #ffffff 0%, #e4e4e7 100%);
    color: #09090b;
    font-weight: 700;
    box-shadow:
        0 4px 15px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: all 0.2s var(--ease-out-expo);
}

.btn-render:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-render:active {
    transform: scale(0.98) translateY(0);
}

/* ============================================================================
   TOAST MEJORADO
   ============================================================================ */

.toast {
    background: var(--panel-bg-solid);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* ============================================================================
   CURSOR DE PINCEL MEJORADO
   ============================================================================ */

.brush-cursor {
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(139, 92, 246, 0.1);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.5),
        inset 0 0 10px rgba(139, 92, 246, 0.2);
    transition:
        width 0.1s var(--ease-out-expo),
        height 0.1s var(--ease-out-expo),
        opacity 0.15s ease;
}

/* ============================================================================
   EMPTY STATE PREMIUM
   ============================================================================ */

.empty-state {
    background: linear-gradient(135deg, #09090b 0%, #0c0c0e 100%);
}

.upload-card {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.12);
    transition: all 0.3s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo en hover */
.upload-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg,
            transparent 30%,
            rgba(139, 92, 246, 0.1) 50%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.upload-card:hover {
    background: rgba(139, 92, 246, 0.05);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.upload-card:hover::before {
    opacity: 1;
}

/* Pills de caracterÃ­sticas */
.pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.upload-card:hover .pill {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
}

/* Step cards */
.step-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s var(--ease-out-expo);
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.step-icon {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent);
    transition: all 0.2s ease;
}

.step-card:hover .step-icon {
    background: rgba(139, 92, 246, 0.2);
    transform: scale(1.05);
}

/* ============================================================================
   ANIMACIONES DE ENTRADA
   ============================================================================ */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Aplicar animaciones */
.tool-panel:not(.hidden) {
    animation: none;
}

.floating-controls:not(.hidden) {
    animation: none;
}

/* ============================================================================
   MOBILE OPTIMIZATIONS
   ============================================================================ */

@media (max-width: 768px) {

    /* Paneles mÃ¡s compactos en mÃ³vil */
    .tool-panel {
        backdrop-filter: blur(20px) saturate(150%);
        -webkit-backdrop-filter: blur(20px) saturate(150%);
    }

    /* Botones mÃ¡s grandes para touch */
    .tab-item {
        min-width: 52px;
        min-height: 52px;
        border-radius: 16px;
    }

    /* Feedback tÃ¡ctil mÃ¡s pronunciado */
    .tab-item:active,
    .icon-btn:active,
    .btn-float-action:active {
        transform: scale(0.92);
        opacity: 0.9;
    }

    /* Slider thumb mÃ¡s grande para dedos */
    .slider-thumb {
        width: 30px;
        height: 30px;
    }

    /* Controles flotantes ajustados */
    .floating-controls .center-actions {
        padding: 8px 16px;
        gap: 10px;
    }
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================================
   FOCUS VISIBLE (ACCESIBILIDAD)
   ============================================================================ */

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Ocultar outline en mouse pero mostrar en teclado */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================================
   MOBILE OPTIMIZATIONS (Specific Requests)
   ============================================================================ */

@media (max-width: 768px) {

    /* Ocultar tabs especÃ­ficos y controles de luz */
    .tab-item[data-tab="lighting"],
    .tab-item[id="btnGenerate3D"],
    .lighting-controls {
        display: none !important;
    }

    /* Ocultar botÃ³n Home en header */
    .header .log-out {
        display: none !important;
    }

    /* Arreglar Upload Card aplastada */
    .upload-card {
        padding: 40px 20px !important;
        min-height: 280px;
        justify-content: center;
        margin-bottom: 24px !important;
    }

    .studio-hero {
        margin-bottom: 24px !important;
    }

    .studio-desc {
        font-size: 14px !important;
    }
}

/* ============================================================================
   MOBILE TOGGLE HANDLE
   ============================================================================ */

.panel-toggle-mobile {
    display: none;
}

@media (max-width: 768px) {
    .panel-toggle-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: -24px;
        left: 50%;
        transform: translateX(-50%);
        width: 48px;
        height: 24px;
        background: var(--panel-bg-glass);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid var(--border-medium);
        border-bottom: none;
        border-radius: 12px 12px 0 0;
        cursor: pointer;
        z-index: 10;
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
        padding: 0;
        transition: background 0.2s;
    }

    .panel-toggle-mobile:active {
        background: var(--panel-bg-solid);
    }

    .handle-bar {
        width: 24px;
        height: 4px;
        background: rgba(255, 255, 255, 0.3);
        border-radius: 2px;
    }

    /* TransformaciÃ³n para ocultar/mostrar panel */
    .tool-panel {
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
    }

    .tool-panel.mobile-collapsed {
        transform: translateY(100%);
    }
}

/* ============================================================================
   DESKTOP TOOL PANEL REORGANIZATION
   ============================================================================ */

@media (min-width: 769px) {
    .bottom-tabs {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding-top: 10px;
    }

    .desktop-tool-group {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        padding: 12px;
    }

    .group-label {
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #71717a;
        margin-bottom: 8px;
        font-weight: 600;
        padding-left: 4px;
    }

    .group-items {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .tab-item {
        width: 100%;
        height: 48px;
        justify-content: flex-start;
        padding-left: 12px;
        border-radius: 8px;
        background: transparent;
        border: 1px solid transparent;
    }

    .tab-item:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .tab-item.active {
        background: rgba(139, 92, 246, 0.15);
        border-color: rgba(139, 92, 246, 0.3);
        color: #a78bfa;
    }

    .tab-item i {
        margin-right: 10px;
    }

    .tab-item span {
        font-size: 13px;
        font-weight: 500;
        display: inline-block;
    }
}

@media (max-width: 768px) {

    /* Mobile: Wrapper should be invisible to keep flex row */
    .desktop-tool-group {
        display: contents;
    }

    .group-label {
        display: none;
    }

    .group-items {
        display: contents;
    }
}

/* Spinner base (Desktop/Shared) - Restoring lost styles */
.spinner-sm {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: pro-spin 0.6s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 8px;
    filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.3));
}


/* ============================================================================
   DESKTOP REFINEMENTS (Scroll & Spacing)
   ============================================================================ */
@media (min-width: 769px) {
    .panel-body {
        display: block !important;
        max-height: calc(100vh - 160px) !important;
        /* Force constraint */
        overflow-y: auto !important;
        /* Force scroll */
        padding-right: 8px;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    }

    .panel-body::-webkit-scrollbar {
        width: 6px;
    }

    .panel-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .panel-body::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

    /* More breathing room for sliders */
    .slider-section {
        margin-bottom: 24px !important;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Force spacing between lighting controls */
    .lighting-controls>div {
        margin-bottom: 24px !important;
    }

    .lighting-controls {
        padding-top: 8px !important;
    }
}

.spinner-sm.hidden {
    display: none !important;
}

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•

/* ═══════════════════════════════════════════════════════════════════════════
   PRODUCTION LOADING UI
   ═══════════════════════════════════════════════════════════════════════════ */

/* Transiciones SOLO cuando está activa la generación de IA */
.canvas-container.generating-blur {
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.canvas-container.generating-blur img,
.canvas-container.generating-blur canvas {
    transition: filter 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.canvas-container.generating-blur #baseImage,
.canvas-container.generating-blur #threeCanvas,
.canvas-container.generating-blur #overlayCanvas {
    filter: blur(24px) brightness(0.6) saturate(1.2) !important;
    transform: scale(1.05);
    opacity: 0.8;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 80%);
    border-radius: 12px;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Advanced Pro Spinner (Auto-IA Style Elevated) */
.pro-spinner-container {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
}

.pro-spinner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    border-bottom-color: rgba(139, 92, 246, 0.1);
    animation: pro-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

.pro-spinner::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-left-color: #a78bfa;
    border-right-color: rgba(167, 139, 250, 0.05);
    animation: pro-spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite reverse;
}

.pro-spinner-inner {
    position: absolute;
    inset: 18px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.15;
    animation: pro-pulse 2s ease-in-out infinite;
}

.loading-text {
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    animation: pro-text-pulse 2s ease-in-out infinite;
    margin-top: 10px;
    opacity: 0.8;
}

@keyframes pro-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes pro-pulse {

    0%,
    100% {
        transform: scale(0.8);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.25;
    }
}

@keyframes pro-text-pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: translateY(0);
    }

    50% {
        opacity: 0.9;
        transform: translateY(-2px);
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS UI (INTEGRATED)
   ═══════════════════════════════════════════════════════════════════════════ */

.pro-progress-percent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
    opacity: 0.9;
    letter-spacing: -0.01em;
    pointer-events: none;
}

/* Literal Horizontal Bar (Strong Visibility) */
.pro-bar-container {
    width: 200px;
    margin-top: 25px;
    padding: 2px;
}

.pro-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pro-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, #a78bfa 100%);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 10px;
}

.pro-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: bar-shimmer 2s infinite linear;
}

@keyframes bar-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}