/* CSS Reset & Variables */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8B5CF6;
    --primary-dark: #7C3AED;
    --secondary: #EC4899;
    --bg-dark: #0F0F1A;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --gradient-dark: linear-gradient(180deg, #1a1a2e 0%, #0F0F1A 100%);
    --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: #3B82F6;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mode-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-tab:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.mode-tab.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.mode-tab svg {
    flex-shrink: 0;
}

/* Upload Section */
.upload-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 800px;
    margin-bottom: 2rem;
}

.upload-box {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.upload-box:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.upload-box.dragging {
    border-color: var(--secondary);
    background: rgba(236, 72, 153, 0.1);
}

.upload-box.has-video {
    border-style: solid;
    border-color: var(--primary);
}

.upload-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    transition: opacity 0.3s ease;
}

.upload-box.has-video .upload-content {
    opacity: 0;
    pointer-events: none;
}

.upload-icon {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.upload-box:hover .upload-icon {
    transform: translateY(-5px);
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.upload-preview {
    position: absolute;
    inset: 0;
    display: none;
}

.upload-box.has-video .upload-preview {
    display: block;
}

.upload-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 2px);
}

.file-name {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 50px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #EF4444;
    transform: scale(1.1);
}

/* Compare Button */
.compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.compare-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.compare-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Compare Section */
.compare-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.compare-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.video-labels {
    display: flex;
    gap: 2rem;
}

.label {
    padding: 8px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.label-left {
    border-left: 3px solid var(--primary);
}

.label-right {
    border-right: 3px solid var(--secondary);
}

/* Compare Container */
.compare-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: ew-resize;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-right-wrapper {
    clip-path: inset(0 0 0 50%);
}

.compare-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: white;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-dark);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.slider-handle:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Controls */
.controls {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
}

.controls-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.control-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.time-display {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-control .control-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-card-hover);
}

.volume-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-position-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.slider-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.slider-position {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
}

.slider-position::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.4);
    transition: transform 0.2s ease;
}

.slider-position::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
    text-align: right;
}

/* Uniqueize Section */
.uniqueize-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.uniqueize-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.uniqueize-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 2rem;
}

.uniqueize-upload {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.uniqueize-upload:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.uniqueize-upload.has-video {
    border-style: solid;
    border-color: var(--primary);
}

.uniqueize-upload.has-video .upload-content {
    opacity: 0;
    pointer-events: none;
}

.uniqueize-preview {
    position: absolute;
    inset: 0;
    display: none;
}

.uniqueize-upload.has-video .uniqueize-preview {
    display: block;
}

.uniqueize-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-lg) - 2px);
}

.video-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 50px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Settings Panel */
.settings-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    max-height: 500px;
    overflow-y: auto;
}

.settings-panel::-webkit-scrollbar {
    width: 6px;
}

.settings-panel::-webkit-scrollbar-track {
    background: transparent;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.settings-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.settings-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.settings-group:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.settings-group h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.settings-group h4 svg {
    color: var(--primary);
}

.settings-group h4 svg[viewBox="0 0 24 24"][stroke="currentColor"] {
    color: var(--primary);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
    padding: 8px 0;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked+.toggle-switch {
    background: var(--gradient-primary);
}

.toggle-label input[type="checkbox"]:checked+.toggle-switch::after {
    left: 21px;
}

.intensity-slider {
    width: 80px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
}

.intensity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.intensity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.option-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 35px;
    text-align: right;
}

/* Resolution Options */
.resolution-options {
    display: flex;
    gap: 8px;
}

.resolution-option {
    flex: 1;
    cursor: pointer;
}

.resolution-option input[type="radio"] {
    display: none;
}

.resolution-label {
    display: block;
    padding: 10px 12px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
}

.resolution-option input[type="radio"]:checked+.resolution-label {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.resolution-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
}

.preset-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.preset-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

.preset-btn span {
    font-size: 1rem;
}

/* Process Area */
.process-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 500px;
}

.process-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 48px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.process-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.process-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.process-btn svg {
    animation: none;
}

.process-btn.processing svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.process-progress {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.progress-info span:first-child {
    color: var(--text-secondary);
}

.progress-info span:last-child {
    color: var(--primary);
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: var(--radius-xl);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

/* Footer */
.footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .upload-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .compare-header {
        flex-direction: column;
        gap: 1rem;
    }

    .controls-row {
        flex-wrap: wrap;
    }

    .progress-container {
        order: 3;
        width: 100%;
    }

    .volume-control {
        order: 2;
    }

    .slider-position-row {
        flex-wrap: wrap;
    }

    .slider-position {
        width: 100%;
        order: 3;
    }

    .mode-tabs {
        flex-direction: column;
        width: 100%;
    }

    .mode-tab {
        width: 100%;
        justify-content: center;
    }

    .uniqueize-layout {
        grid-template-columns: 1fr;
    }

    .settings-panel {
        max-height: none;
    }

    .preset-buttons {
        flex-direction: column;
    }

    .process-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Video Queue Styles */
.video-queue {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border);
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.queue-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.add-more-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.add-more-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.queue-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.queue-item.processing {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.queue-item.completed {
    border-color: #22C55E;
    background: rgba(34, 197, 94, 0.1);
}

.queue-item.error {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.1);
}

.queue-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-dark);
}

.queue-item-info {
    flex: 1;
    min-width: 0;
}

.queue-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.queue-item-progress {
    width: 100%;
    height: 4px;
    background: var(--bg-dark);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.queue-item-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 0.3s;
}

.queue-item-status {
    font-size: 0.7rem;
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-card);
    white-space: nowrap;
}

.queue-item-status.waiting {
    color: var(--text-muted);
}

.queue-item-status.processing {
    color: var(--primary);
    background: rgba(139, 92, 246, 0.2);
}

.queue-item-status.completed {
    color: #22C55E;
    background: rgba(34, 197, 94, 0.2);
}

.queue-item-status.error {
    color: #EF4444;
    background: rgba(239, 68, 68, 0.2);
}

.queue-item-remove {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.queue-item-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

.queue-item-download {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.2);
    border: none;
    color: #22C55E;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.queue-item-download:hover {
    background: rgba(34, 197, 94, 0.3);
}

.queue-summary {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==========================================
   WATERMARK REMOVAL SECTION
   ========================================== */

.watermark-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.watermark-section h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.watermark-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 2rem;
}

.watermark-upload {
    position: relative;
    min-height: 280px;
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.watermark-upload:hover {
    border-color: #10B981;
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 0 40px rgba(16, 185, 129, 0.3);
}

.watermark-upload.has-images {
    border-style: solid;
    border-color: #10B981;
    cursor: default;
}

.watermark-upload.has-images .upload-content {
    display: none;
}

.watermark-upload .upload-icon {
    color: #10B981;
}

/* Image Queue (similar to video queue) */
.image-queue {
    padding: 1rem;
}

.image-queue .queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.image-queue .queue-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.image-queue .queue-list {
    max-height: 200px;
    overflow-y: auto;
}

.image-queue .queue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    transition: all 0.2s;
}

.image-queue .queue-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.image-queue .queue-item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg-dark);
}

.image-queue .queue-item-info {
    flex: 1;
    min-width: 0;
}

.image-queue .queue-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-queue .queue-item-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.image-queue .queue-item-status {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.image-queue .queue-item-status.waiting {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.image-queue .queue-item-status.processing {
    background: rgba(59, 130, 246, 0.2);
    color: #60A5FA;
}

.image-queue .queue-item-status.completed {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.image-queue .queue-item-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Watermark Preview */
.watermark-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(20px);
}

.watermark-preview h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.preview-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preview-item img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg-dark);
}

/* Watermark Process Button */
.watermark-process-btn {
    background: linear-gradient(135deg, #10B981 0%, #3B82F6 100%) !important;
}

.watermark-process-btn:not(:disabled):hover {
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5) !important;
}

/* API Status Indicator */
.api-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #22C55E;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.offline {
    background: #EF4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: none;
}

.status-dot.loading {
    background: #F59E0B;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Responsive adjustments for watermark section */
@media (max-width: 768px) {
    .watermark-layout {
        grid-template-columns: 1fr;
    }

    .preview-compare {
        grid-template-columns: 1fr;
    }
}

/* ===== Comparison Slider ===== */
.comparison-container {
    position: relative;
    margin-bottom: 1rem;
}

.comparison-wrapper {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--bg-dark);
    cursor: ew-resize;
    user-select: none;
}

.comparison-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
}

.comparison-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-right: 2px solid white;
}

.comparison-before .comparison-img {
    position: absolute;
    top: 0;
    left: 0;
    width: auto;
    min-width: 100%;
    height: 100%;
    object-fit: contain;
}

.comparison-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

.slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: white;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.slider-handle {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 11;
    transition: transform 0.2s ease;
}

.comparison-wrapper:hover .slider-handle {
    transform: scale(1.1);
}

.comparison-wrapper:active .slider-handle {
    transform: scale(0.95);
}

.comparison-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.view-btn.active {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    border-color: transparent;
    color: white;
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .comparison-wrapper {
        max-height: 350px;
    }

    .slider-handle {
        width: 36px;
        height: 36px;
    }

    .slider-handle svg {
        width: 20px;
        height: 20px;
    }
}

/* ==========================================
   MAXIMUM PRESET BUTTON STYLES
   ========================================== */

.preset-btn.preset-maximum {
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 50%, #F59E0B 100%);
    border: none;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.preset-btn.preset-maximum::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.preset-btn.preset-maximum:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.preset-btn.preset-maximum.active {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6),
        0 0 40px rgba(236, 72, 153, 0.3);
}

/* ==========================================
   ANTI-DETECT 2026 PRESET BUTTON STYLES
   ========================================== */

.preset-btn.preset-antidetect {
    background: linear-gradient(135deg, #06B6D4 0%, #10B981 50%, #22D3EE 100%);
    border: none;
    color: white;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.preset-btn.preset-antidetect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    animation: shimmer-ad 2.5s infinite;
}

@keyframes shimmer-ad {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.preset-btn.preset-antidetect:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.preset-btn.preset-antidetect.active {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.6),
        0 0 40px rgba(16, 185, 129, 0.3);
}

/* Adjust grid for 5 buttons */
.preset-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

@media (max-width: 768px) {
    .preset-buttons {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .preset-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   GPU STATUS INDICATOR
   ========================================== */

.gpu-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    margin: 12px auto;
    font-size: 14px;
    max-width: 400px;
}

.gpu-status.gpu-available {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.gpu-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.gpu-indicator.gpu-on {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
    animation: pulse-gpu 2s infinite;
}

.gpu-indicator.gpu-off {
    background: #6b7280;
}

.gpu-text {
    font-weight: 500;
    color: var(--text-primary);
}

.gpu-nvenc {
    color: #22c55e;
    font-size: 12px;
    font-weight: 600;
}

@keyframes pulse-gpu {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ==========================================
   GPU STATUS INDICATOR
   ========================================== */

.gpu-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(107, 114, 128, 0.1);
    border: 1px solid rgba(107, 114, 128, 0.2);
    border-radius: 10px;
    margin: 16px 0;
    font-size: 14px;
    transition: all 0.3s ease;
}

.gpu-status.gpu-available {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}

.gpu-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gpu-indicator.gpu-on {
    background: linear-gradient(135deg, #22c55e, #10b981);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    animation: gpu-pulse 2s ease-in-out infinite;
}

.gpu-indicator.gpu-off {
    background: #6b7280;
}

@keyframes gpu-pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.8);
    }
}

.gpu-text {
    font-weight: 500;
    color: var(--text-primary, #e5e7eb);
}

.gpu-nvenc {
    color: #22c55e;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 4px;
}

/* Progress bar GPU indicator */
.process-progress.gpu-mode .progress-bar-fill {
    background: linear-gradient(90deg, #22c55e, #10b981, #22c55e);
    background-size: 200% 100%;
    animation: gpu-progress 1s linear infinite;
}

@keyframes gpu-progress {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}
/* ── COMING SOON TAB BADGE ── */
.mode-tab--soon {
    opacity: .65;
    position: relative;
}
.tab-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.35);
    margin-left: 6px;
    letter-spacing: .5px;
    vertical-align: middle;
}

/* ── COMING SOON SECTION ── */
.coming-soon-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    min-height: 400px;
}
.coming-soon-inner {
    text-align: center;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.coming-soon-icon {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: flex; align-items: center; justify-content: center;
    color: #8b5cf6;
    margin-bottom: 8px;
}
.coming-soon-inner h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary, #fff);
}
.coming-soon-inner p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary, rgba(255,255,255,.5));
}
.coming-soon-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    text-align: left;
    width: 100%;
    padding: 20px 24px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
}
.cs-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255,255,255,.55);
}
.cs-feature svg {
    color: #8b5cf6;
    flex-shrink: 0;
}
