/* ============================================
   AI AutoCut Redesign - Modern Glass UI
   Premium dark theme with cyber aesthetics
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --glass-bg: rgba(15, 25, 45, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-gold: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    --glow-blue: 0 0 30px rgba(102, 126, 234, 0.3);
    --glow-purple: 0 0 30px rgba(118, 75, 162, 0.3);
    --glow-cyan: 0 0 30px rgba(34, 211, 238, 0.3);
}

/* ---------- View Container ---------- */
#view-autocut-redesign {
    display: none;
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.4s ease-out;
}

#view-autocut-redesign.active {
    display: block;
}

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

/* ---------- Hero Section ---------- */
.autocut-hero {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.autocut-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.autocut-hero h2 {
    font-size: 36px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.autocut-hero p {
    color: var(--text-secondary);
    font-size: 16px;
    position: relative;
    z-index: 1;
}

/* ---------- Step Indicator ---------- */
.autocut-steps-redesign {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 32px;
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
}

.step-redesign {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.step-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    background: var(--bg-elevated);
    border: 2px solid var(--border-default);
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.step-label-redesign {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.step-connector {
    width: 60px;
    height: 3px;
    background: var(--border-default);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.step-redesign.active .step-circle {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: var(--glow-purple);
    transform: scale(1.1);
}

.step-redesign.active .step-label-redesign {
    color: var(--text-primary);
}

.step-redesign.done .step-circle {
    background: var(--gradient-success);
    border-color: transparent;
    color: white;
}

.step-redesign.done .step-label-redesign {
    color: #38ef7d;
}

.step-connector.done {
    background: var(--gradient-success);
}

/* ---------- Glass Panel ---------- */
.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.glass-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.glass-panel-title .icon {
    font-size: 24px;
}

.glass-panel-body {
    padding: 24px;
}

/* ---------- Drop Zone Redesign ---------- */
.drop-zone-redesign {
    border: 2px dashed var(--glass-border);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.03);
    position: relative;
    overflow: hidden;
}

.drop-zone-redesign::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drop-zone-redesign:hover {
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: var(--glow-purple);
}

.drop-zone-redesign:hover::before {
    opacity: 1;
}

.drop-zone-redesign.drag-over {
    border-color: #22d3ee;
    background: rgba(34, 211, 238, 0.08);
    box-shadow: var(--glow-cyan);
}

.drop-zone-icon-redesign {
    font-size: 64px;
    margin-bottom: 16px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.drop-zone-title-redesign {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.drop-zone-hint-redesign {
    font-size: 14px;
    color: var(--text-muted);
}

.file-input-hidden {
    display: none;
}

/* ---------- Sample Clip Preview ---------- */
.sample-preview-section {
    margin: 24px 0;
}

.sample-preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sample-preview-header h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.sample-preview-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    background: var(--gradient-gold);
    color: #0f172a;
    text-transform: uppercase;
}

.sample-clip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.sample-clip-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sample-clip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(102, 126, 234, 0.3);
}

.sample-clip-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sample-clip-thumbnail::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.play-button-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sample-clip-card:hover .play-button-overlay {
    opacity: 1;
}

.play-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: var(--glow-purple);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.15);
}

.sample-clip-info {
    padding: 14px;
}

.sample-clip-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sample-clip-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.sample-clip-tag {
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.15);
    color: #a78bfa;
    font-size: 11px;
    font-weight: 600;
}

/* ---------- Video Player Modal ---------- */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    max-width: 900px;
    width: 90%;
    background: var(--bg-surface);
    border-radius: 20px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-player-container {
    position: relative;
    aspect-ratio: 16/9;
    background: #000;
}

.video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.video-modal-close:hover {
    background: rgba(255, 107, 122, 0.8);
    transform: rotate(90deg);
}

.video-modal-info {
    padding: 20px;
}

.video-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.video-modal-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---------- Selected Files ---------- */
.selected-files-redesign {
    margin-top: 20px;
}

.file-item-redesign {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.file-item-redesign:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

.file-icon-redesign {
    font-size: 28px;
    flex-shrink: 0;
}

.file-info-redesign {
    flex: 1;
    min-width: 0;
}

.file-name-redesign {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size-redesign {
    font-size: 12px;
    color: var(--text-muted);
}

.file-remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 107, 122, 0.1);
    border: none;
    color: #ff6b7a;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-remove-btn:hover {
    background: rgba(255, 107, 122, 0.2);
    transform: scale(1.1);
}

/* ---------- Action Buttons ---------- */
.action-buttons-redesign {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.btn-glass {
    padding: 14px 28px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-glass-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: var(--glow-purple);
}

.btn-glass-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.5);
}

.btn-glass-outline {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Upload Progress ---------- */
.upload-progress-panel-redesign {
    margin-top: 20px;
}

.progress-ring-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--glass-border);
    stroke-width: 8;
}

.progress-ring-fill {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.progress-percent {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---------- Processing Step ---------- */
.processing-panel-redesign {
    text-align: center;
    padding: 40px;
}

.processing-animation {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 30px;
}

.processing-orb {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.2;
    animation: orbPulse 2s ease-in-out infinite;
}

.processing-orb:nth-child(2) {
    animation-delay: 0.5s;
    background: linear-gradient(135deg, #22d3ee 0%, #667eea 100%);
}

.processing-orb:nth-child(3) {
    animation-delay: 1s;
    background: linear-gradient(135deg, #a78bfa 0%, #f093fb 100%);
}

@keyframes orbPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.2; }
    50% { transform: scale(1); opacity: 0.4; }
}

.processing-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: var(--glow-purple);
    animation: coreGlow 1.5s ease-in-out infinite;
}

@keyframes coreGlow {
    0%, 100% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 60px rgba(102, 126, 234, 0.8); }
}

.processing-status-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.processing-status-sub {
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------- Result Step ---------- */
.result-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 0 40px rgba(56, 239, 125, 0.4);
    animation: successPop 0.5s ease-out;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.result-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.result-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.3);
}

.result-stat-value {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ---------- Download Buttons ---------- */
.download-actions-redesign {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btn-download-redesign {
    padding: 16px 32px;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-download-primary {
    background: var(--gradient-success);
    border: none;
    color: white;
    box-shadow: 0 8px 30px rgba(56, 239, 125, 0.3);
}

.btn-download-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(56, 239, 125, 0.4);
}

.btn-download-secondary {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-download-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Checkbox Toggle ---------- */
.checkbox-toggle-container {
    margin-top: 16px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.checkbox-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.checkbox-toggle input {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}

.checkbox-toggle span {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---------- Processing Log ---------- */
.processing-log-redesign {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.log-entry {
    padding: 4px 0;
    color: var(--text-secondary);
}

.log-entry.success { color: #38ef7d; }
.log-entry.error { color: #ff6b7a; }
.log-entry.info { color: #22d3ee; }
.log-entry.warning { color: #ffbd59; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    #view-autocut-redesign {
        padding: 16px;
    }
    
    .autocut-hero {
        padding: 20px;
    }
    
    .autocut-hero h2 {
        font-size: 28px;
    }
    
    .autocut-steps-redesign {
        flex-direction: column;
        gap: 8px;
    }
    
    .step-connector {
        width: 3px;
        height: 30px;
    }
    
    .drop-zone-redesign {
        padding: 40px 20px;
    }
    
    .result-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .download-actions-redesign {
        flex-direction: column;
    }
    
    .btn-download-redesign {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.4); }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
