/* Custom styles for GLB Optimizer */

/* ==========================================
   Global Typography - Inter Font
   ========================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.lead {
    font-weight: 400;
    letter-spacing: 0;
}

/* ==========================================
   Primary Action Button Glow
   ========================================== */
.btn-info,
.btn-primary {
    box-shadow: 0 0 20px rgba(13, 202, 240, 0.25);
    transition: all 0.3s ease;
}

.btn-info:hover,
.btn-primary:hover {
    box-shadow: 0 0 30px rgba(13, 202, 240, 0.4);
    transform: translateY(-1px);
}

.btn-info:active,
.btn-primary:active {
    box-shadow: 0 0 15px rgba(13, 202, 240, 0.3);
    transform: translateY(0);
}

/* ==========================================
   Drop Zone Styling
   ========================================== */
.drop-zone {
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(13, 202, 240, 0.03) 0%, transparent 100%);
}

.drop-zone:hover {
    border-color: var(--bs-info);
    background: linear-gradient(180deg, rgba(13, 202, 240, 0.08) 0%, rgba(13, 202, 240, 0.02) 100%);
    box-shadow: 0 0 30px rgba(13, 202, 240, 0.1);
}

.drop-zone.dragover {
    border-color: var(--bs-success);
    background: linear-gradient(180deg, rgba(25, 135, 84, 0.15) 0%, rgba(25, 135, 84, 0.05) 100%);
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(25, 135, 84, 0.2);
}

.drop-zone.dragging {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

/* ==========================================
   Enhanced Progress Animations
   ========================================== */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite, pulse-glow 2s ease-in-out infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(13, 202, 240, 0.5);
    }

    50% {
        box-shadow: 0 0 20px rgba(13, 202, 240, 0.8), 0 0 30px rgba(13, 202, 240, 0.4);
    }
}

.progress {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: visible;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #0dcaf0 0%, #20c997 50%, #0dcaf0 100%);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* File size badges */
.badge.fs-6 {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem !important;
}

/* Feature icons */
.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.25rem;
}

/* Marketing section styling */
.marketing-highlight {
    background: linear-gradient(135deg, var(--bs-info-bg-subtle), var(--bs-primary-bg-subtle));
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Upload button states */
#upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Smooth transitions for section visibility */
.container>.row {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.container>.row[style*="display: none"] {
    opacity: 0;
}

/* Custom spacing */
.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Icon colors */
.text-success {
    color: var(--bs-success) !important;
}

.text-muted {
    color: var(--bs-secondary) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .drop-zone {
        padding: 2rem !important;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Error state styles */
.alert-danger {
    border-left: 4px solid var(--bs-danger);
}

/* Success state styles */
.alert-success {
    border-left: 4px solid var(--bs-success);
}

/* 3D Model Viewer Styles */
.model-viewer {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
}

.model-viewer canvas {
    display: block;
    outline: none;
}

.viewer-controls {
    background-color: var(--bs-dark);
    border-top: 1px solid var(--bs-border-color);
    text-align: center;
}

.model-viewer-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bs-light);
    text-align: center;
}

.model-viewer-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--bs-danger);
    text-align: center;
    padding: 1rem;
}

/* Model comparison highlighting */
#model-viewer-section .card {
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

#model-viewer-section .card:hover {
    border-color: var(--bs-primary);
}

/* Synchronized camera indicator */
.camera-synced {
    border-color: var(--bs-success) !important;
}

.camera-synced .card-header {
    background-color: var(--bs-success-bg-subtle);
    border-bottom-color: var(--bs-success);
}

/* Loading spinner for 3D models */
.model-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-direction: column;
    color: var(--bs-light);
}

.model-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
}

/* Responsive 3D viewer */
@media (max-width: 768px) {
    .model-viewer {
        height: 250px;
    }

    #model-viewer-section .col-md-6 {
        margin-bottom: 1rem;
    }
}


/* =========================================
   Premium UI Enhancements
   ========================================= */

/* Batch File List Items - Card Style */
.list-group-item {
    background-color: var(--bs-dark-bg-subtle);
    border: 1px solid var(--bs-border-color);
    margin-bottom: 0.5rem;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    transform: translateX(5px);
    border-color: var(--bs-info);
    background-color: var(--bs-dark);
}

/* Processing Pulse Animation */
@keyframes pulse-info {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 202, 240, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(13, 202, 240, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(13, 202, 240, 0);
    }
}

.badge.bg-info.task-status {
    animation: pulse-info 2s infinite;
}

/* Custom Scrollbar for Details Panel */
#technical-details::-webkit-scrollbar {
    width: 8px;
}

#technical-details::-webkit-scrollbar-track {
    background: #1a1a2e;
    border-radius: 4px;
}

#technical-details::-webkit-scrollbar-thumb {
    background: #4a4a6a;
    border-radius: 4px;
}

#technical-details::-webkit-scrollbar-thumb:hover {
    background: #5a5a8a;
}

/* ==========================================
   Premium Card Styling
   ========================================== */
.card-body {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
}

.card {
    background: linear-gradient(180deg, #2a2e33 0%, #1a1d21 100%);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.35);
    border-color: rgba(13, 202, 240, 0.2);
}

/* Success Animation Checkmark */
.fa-check-circle.text-success {
    filter: drop-shadow(0 0 10px rgba(25, 135, 84, 0.4));
}

/* ==========================================
   Info Disclosure Components
   ========================================== */

/* Privacy Badge */
.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    border-radius: 2rem;
    font-size: 0.75rem;
    color: var(--bs-info);
    cursor: pointer;
    transition: all 0.2s ease;
}

.privacy-badge:hover {
    background: rgba(13, 202, 240, 0.2);
    border-color: rgba(13, 202, 240, 0.5);
}

/* Quality Comparison Table */
.quality-comparison {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
}

.quality-comparison table {
    margin: 0;
    font-size: 0.85rem;
}

.quality-comparison th {
    background: rgba(13, 202, 240, 0.15);
    font-weight: 600;
    padding: 0.75rem;
    white-space: nowrap;
}

.quality-comparison td {
    padding: 0.6rem 0.75rem;
    vertical-align: middle;
}

.quality-comparison tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* Technical Details Panel */
.tech-details-panel {
    background: linear-gradient(180deg, rgba(13, 202, 240, 0.05) 0%, transparent 100%);
    border: 1px solid rgba(13, 202, 240, 0.2);
    border-radius: 0.5rem;
    padding: 1rem;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.tech-badge.mobile-safe {
    background: rgba(25, 135, 84, 0.2);
    color: #20c997;
}

.tech-badge.desktop-ready {
    background: rgba(13, 110, 253, 0.2);
    color: #6ea8fe;
}

.tech-badge.vram-savings {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

/* FAQ Accordion */
.faq-accordion .accordion-button {
    background: transparent;
    color: var(--bs-body-color);
    padding: 1rem 1.25rem;
    font-weight: 500;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: rgba(13, 202, 240, 0.1);
    color: var(--bs-info);
}

.faq-accordion .accordion-button::after {
    filter: invert(1);
}

.faq-accordion .accordion-body {
    background: rgba(0, 0, 0, 0.2);
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Info Toggle Links */
.info-toggle {
    font-size: 0.8rem;
    color: var(--bs-info);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.info-toggle:hover {
    color: var(--bs-cyan);
}

.info-toggle i {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.info-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* ==========================================
   Liquid Neural Core Loader
   ========================================== */
.morph-loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 140px;
}

.morph-loader {
    position: relative;
    width: 100px;
    height: 100px;
    filter: drop-shadow(0 0 20px rgba(13, 202, 240, 0.4));
}

/* Layer 1: Inner Energy Core - Bright pulsing center */
.morph-core {
    position: absolute;
    width: 30%;
    height: 30%;
    top: 35%;
    left: 35%;
    background: radial-gradient(circle, #ffffff 0%, #ffffff 30%, #0dcaf0 70%, transparent 100%);
    border-radius: 50%;
    mix-blend-mode: screen;
    animation: pulse-core 1.5s ease-in-out infinite alternate;
    z-index: 4;
    box-shadow:
        0 0 15px #fff,
        0 0 30px #0dcaf0,
        0 0 50px rgba(13, 202, 240, 0.5);
}

/* Layer 2: Main Liquid Shell - Morphing glass with color shift */
.morph-shell {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 202, 240, 0.7) 0%, rgba(32, 201, 151, 0.7) 50%, rgba(13, 110, 253, 0.7) 100%);
    background-size: 200% 200%;
    animation:
        morph-shape 6s ease-in-out infinite,
        rotate-shape 10s linear infinite,
        color-shift 4s ease-in-out infinite;
    backdrop-filter: blur(3px);
    z-index: 3;
    opacity: 0.85;
    will-change: transform, border-radius, background-position;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Layer 3a: Primary Orbital Ring */
.morph-orbit {
    position: absolute;
    width: 130%;
    height: 130%;
    top: -15%;
    left: -15%;
    border: 2px solid transparent;
    border-top-color: rgba(13, 202, 240, 0.6);
    border-right-color: rgba(32, 201, 151, 0.4);
    border-radius: 50%;
    animation: orbit-spin 3s linear infinite;
    z-index: 2;
    pointer-events: none;
}

/* Layer 3b: Secondary Orbital Ring (counter-rotating) */
.morph-orbit::before {
    content: '';
    position: absolute;
    width: 115%;
    height: 115%;
    top: -7.5%;
    left: -7.5%;
    border: 1px solid transparent;
    border-bottom-color: rgba(13, 110, 253, 0.5);
    border-left-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: orbit-spin 2s linear infinite reverse;
}

/* Layer 3c: Tertiary particle dots */
.morph-orbit::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    top: -3px;
    left: 50%;
    background: #0dcaf0;
    border-radius: 50%;
    box-shadow:
        0 0 8px #0dcaf0,
        100px 50px 0 -1px #20c997,
        -80px 70px 0 -2px #0d6efd;
    animation: orbit-spin 3s linear infinite reverse;
}

/* Layer 4: Outer Ambient Glow */
.morph-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(13, 202, 240, 0.6) 0%, rgba(32, 201, 151, 0.3) 50%, transparent 70%);
    animation: morph-shape 6s ease-in-out infinite, pulse-glow 2.5s ease-in-out infinite;
    filter: blur(20px);
    z-index: 0;
    will-change: transform, border-radius;
}

@keyframes pulse-core {
    0% {
        transform: scale(0.85);
        opacity: 0.9;
        box-shadow:
            0 0 10px #fff,
            0 0 20px #0dcaf0,
            0 0 30px rgba(13, 202, 240, 0.4);
    }

    100% {
        transform: scale(1.15);
        opacity: 1;
        box-shadow:
            0 0 20px #fff,
            0 0 40px #0dcaf0,
            0 0 60px rgba(13, 202, 240, 0.6);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

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

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

@keyframes color-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes morph-shape {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    50% {
        border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    }

    75% {
        border-radius: 40% 60% 50% 50% / 40% 50% 60% 50%;
    }
}

@keyframes rotate-shape {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes pulse-scale {

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

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* ==========================================
   Particle Burst System (Digital Shockwave)
   ========================================== */
.particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.particle {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
}

/* Core particle - glowing dot with trail */
.particle-core {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--p-color, #0dcaf0) 50%, transparent 100%);
    box-shadow:
        0 0 10px var(--p-color, #0dcaf0),
        0 0 20px var(--p-color, #0dcaf0);
    animation: particle-fade 1.5s ease-out forwards;
}

/* Energy streak particles */
.particle-streak {
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, var(--p-color, #0dcaf0) 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    border-radius: 3px;
    box-shadow: 0 0 15px var(--p-color, #0dcaf0);
    animation: particle-streak-fade 1.2s ease-out forwards;
}

/* Ring shockwave */
.particle-ring {
    width: 20px;
    height: 20px;
    border: 3px solid #0dcaf0;
    border-radius: 50%;
    box-shadow:
        0 0 20px #0dcaf0,
        inset 0 0 20px rgba(13, 202, 240, 0.3);
    animation: ring-expand 1s ease-out forwards;
}

/* Hex/geometric particles */
.particle-hex {
    width: 12px;
    height: 12px;
    background: var(--p-color, #20c997);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    box-shadow: 0 0 15px var(--p-color, #20c997);
    animation: particle-spin-fade 1.8s ease-out forwards;
}

@keyframes particle-fade {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.3);
    }
}

@keyframes particle-streak-fade {
    0% {
        opacity: 1;
        transform: scaleY(1);
    }

    100% {
        opacity: 0;
        transform: scaleY(3);
    }
}

@keyframes ring-expand {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(15);
    }
}

@keyframes particle-spin-fade {
    0% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: rotate(360deg) scale(0.5);
    }
}