/* Intelligent File Hub - Premium UI/UX */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-green: #10b981;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* Glassmorphism Card Base */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Breadcrumb Navigation */
.hub-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
    margin-top: 0;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 100px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.breadcrumb-item.active {
    color: var(--accent-blue);
}

.breadcrumb-item.completed {
    color: var(--accent-green);
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-size: 12px;
}

/* Universal Drop Zone - PINK THEME */
.hub-drop-zone {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 40px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 3px dashed #e0b3ff;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 247, 253, 0.95));
    border-radius: 32px;
    box-shadow: 0 20px 60px -10px rgba(160, 100, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hub-drop-zone:hover,
.hub-drop-zone.drag-over {
    border-color: #c084fc;
    background: rgba(232, 121, 249, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 25px 70px rgba(160, 100, 255, 0.3);
}

.hub-drop-zone.drag-over {
    border-style: solid;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(37, 99, 235, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

.drop-zone-icon {
    font-size: 72px;
    margin-bottom: 24px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.hub-drop-zone:hover .drop-zone-icon {
    transform: scale(1.1) rotate(5deg);
}

.drop-zone-title {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    font-family: 'Outfit', sans-serif;
}

.drop-zone-desc {
    color: #64748b;
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto 32px;
}

/* File Preview Card */
.file-preview-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    margin-bottom: 32px;
    animation: slide-up 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.preview-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.preview-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info {
    flex-grow: 1;
}

.file-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    word-break: break-all;
}

.file-meta {
    font-size: 14px;
    color: #64748b;
    display: flex;
    gap: 12px;
}

/* Action Menu Grid - Horizontal Scrollable */
.hub-action-grid {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
    margin-top: 24px;

    /* Scrollbar styling */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #cbd5e1 transparent;
}

.hub-action-grid::-webkit-scrollbar {
    height: 8px;
}

.hub-action-grid::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.hub-action-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
    transition: background 0.2s;
}

.hub-action-grid::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.action-card {
    padding: 24px;
    text-align: left;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    border-radius: 20px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 240px;
    /* Fixed width for horizontal scroll */
    scroll-snap-align: start;
    position: relative;
}

.action-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.action-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-card:hover .action-icon {
    background: var(--accent-blue);
    color: white;
}

.action-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.action-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.action-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    background: var(--accent-gradient);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
}

/* Category Headers */
.hub-category-header {
    font-size: 14px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 40px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-category-header::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Animations */
.fade-in {
    animation: fade-in 0.4s ease-out forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Tool Options View */
.tool-options-container {
    animation: slide-up 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-options-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.back-btn {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: #f8fafc;
    border-color: #2563eb;
    transform: translateX(-4px);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.option-card {
    padding: 28px;
    text-align: center;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.option-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-6px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.12);
}

.option-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    background: #f8fafc;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.option-card:hover .option-icon {
    background: var(--accent-blue);
    transform: scale(1.1);
}

.option-name {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

.option-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .hub-drop-zone {
        padding: 40px 20px;
    }

    .drop-zone-title {
        font-size: 22px;
    }

    .hub-action-grid {
        grid-template-columns: 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== PROCESSING OVERLAY ==================== */

.processing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fade-in 0.3s ease;
}

.processing-card {
    max-width: 500px;
    width: 90%;
    padding: 48px 40px;
    text-align: center;
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.spinner {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.processing-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #f1f5f9;
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #7c3aed 100%);
    border-radius: 100px;
    transition: width 0.3s ease;
    animation: progress-shimmer 2s infinite;
}

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

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

.processing-card p {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

/* ==================== SUCCESS VIEW ==================== */

.success-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 40px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    margin: 0 auto 24px;
    animation: success-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-pop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.success-container h2 {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 32px;
}

.file-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
}

.size-before,
.size-after {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.size-before span,
.size-after span {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.size-before strong,
.size-after strong {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.size-after .savings {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
    margin-top: 4px;
}

.file-comparison .arrow {
    font-size: 24px;
    color: #cbd5e1;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* ==================== TOOL WORKSPACE ==================== */

.tool-workspace {
    background: #f8fafc;
    border-radius: 16px;
    padding: 32px;
    min-height: 300px;
}

.workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.workspace-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

.workspace-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-top: 4px;
}

/* File List (for merge tools) */
.file-list-area {
    margin-bottom: 24px;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.file-list-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
}

.file-list-info {
    flex: 1;
}

.file-list-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.file-list-size {
    font-size: 12px;
    color: #64748b;
}

.file-list-remove {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.file-list-remove:hover {
    background: #fee2e2;
}

.add-more-btn {
    width: 100%;
    padding: 14px;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #2563eb;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-more-btn:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

/* Preview Section (for image/video tools) */
.preview-section {
    margin-bottom: 24px;
    text-align: center;
}

.preview-section img,
.preview-section video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Control Inputs */
.dimension-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.dimension-inputs label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
}

.dimension-inputs input[type="number"] {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.dimension-inputs button {
    padding: 8px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.dimension-inputs button:hover {
    background: #e2e8f0;
}

/* Preset Buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.preset-buttons button {
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-buttons button:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

/* Quality Slider */
.quality-slider {
    margin-bottom: 24px;
}

.quality-slider label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
}

.quality-slider input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.quality-slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.quality-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
    border: none;
}

/* Compression Slider */
.compression-slider {
    margin-bottom: 24px;
}

.compression-slider label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.slider-labels span {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Warning Messages */
.quality-warning {
    padding: 12px 16px;
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
    margin-top: 16px;
}

/* Step Number Badge */
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #f1f5f9;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.breadcrumb-item.active .step-num {
    background: #2563eb;
    color: white;
}

.breadcrumb-item.completed .step-num {
    background: #10b981;
    color: white;
}

/* Mobile Responsiveness Enhancements */
@media (max-width: 768px) {
    .processing-card {
        padding: 40px 24px;
    }

    .success-container {
        padding: 40px 24px;
    }

    .file-comparison {
        flex-direction: column;
        gap: 12px;
    }

    .file-comparison .arrow {
        transform: rotate(90deg);
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .preset-buttons {
        grid-template-columns: 1fr;
    }

    .dimension-inputs {
        flex-wrap: wrap;
    }

    .tool-workspace {
        padding: 20px;
    }
}

/* PROGRESSIVE STEPPER - Enhanced Visual States */
.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.breadcrumb-item {
    cursor: pointer;
}

.breadcrumb-item:hover {
    opacity: 0.8;
}

.breadcrumb-item.active .step-num {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    animation: stepPulse 2s infinite;
}

.breadcrumb-item.completed .step-num {
    background: #10b981;
    color: white;
}

@keyframes stepPulse {

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

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