.comp-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* ☁️ Upload Dropzone */
.comp-dropzone {
    background-color: var(--bg-card);
    border: none;
    border-radius: 16px; 
    padding: 60px 24px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.comp-dropzone:hover { background-color: var(--bg-card-hover); }
.comp-icon { font-size: 48px; color: #0084ff; margin-bottom: 14px; }

/* 🚀 Preview Workspace Frame */
.comp-preview-container {
    display: none;
    flex-direction: column;
    gap: 20px;
    position: relative;
    scroll-margin-top: 20px;
}

/* ឧបករណ៍បង្វិលទិសដៅ (លេចឡើងក្រោយ Compress រួច) */
.comp-rotate-toolbar {
    display: none;
    justify-content: center;
    gap: 12px;
    margin-bottom: -6px;
}
.rotate-btn {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.rotate-btn:hover { background: #0084ff; color: #fff; border-color: #0084ff; }

.comp-slider-box {
    position: relative;
    width: 100%;
    height: 520px;
    border-radius: 16px;
    overflow: hidden;
    background-color: #0b0c0e;
    user-select: none;
}

.zoom-pan-panel {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    cursor: grab;
}
.zoom-pan-panel:active { cursor: grabbing; }

.comp-slider-img {
    position: absolute;
    top: 50%; left: 50%; 
    transform: translate(-50%, -50%);
    object-fit: contain;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}
.comp-img-before { z-index: 2; opacity: 0; } 
.comp-img-after { z-index: 1; opacity: 1; }  
.comp-slider-box.view-before .comp-img-before { opacity: 1; }

/* 🪄 Magic Progress Overlay */
.magic-wave-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(-45deg, #04091a, #0b1a3a, #1a2f63, #081229);
    background-size: 400% 400%;
    animation: vibrantMagicWave 3.5s ease infinite;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.magic-wave-overlay.active { opacity: 1; pointer-events: auto; }

@keyframes vibrantMagicWave {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.magic-status-text { color: #ffffff; font-size: 16px; font-weight: 500; text-shadow: 0 0 20px rgba(0, 132, 255, 0.6); }
.magic-sub-text { color: #a8c7fa; font-size: 13px; opacity: 0.85; }

.progress-bar-container {
    width: 260px; height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    overflow: hidden;
    margin-top: 6px;
}
.progress-bar-fill {
    width: 0%; height: 100%;
    background: #0084ff;
    border-radius: 100px;
    transition: width 0.15s linear;
}
.progress-percentage { color: #fff; font-size: 14px; font-weight: 600; font-family: monospace; }

/* 🔘 Google Compact Toggle Switch */
.toggle-switch-wrapper {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    background: rgba(30, 31, 32, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px; 
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.toggle-label-text { color: #e3e3e3; font-size: 13px; font-weight: 500; }
.ios-switch-input { display: none; }
.ios-switch-slider { width: 34px; height: 18px; background-color: rgba(255,255,255,0.2); border-radius: 100px; position: relative; transition: 0.2s; }
.ios-switch-slider::before { content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background-color: #fff; top: 3px; left: 3px; transition: 0.2s; }
.ios-switch-input:checked + .ios-switch-slider { background-color: #0084ff; }
.ios-switch-input:checked + .ios-switch-slider::before { transform: translateX(16px); }

/* 🎬 Custom Fixed Video Player Controls */
.custom-video-controls {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    padding: 30px 20px 16px 20px;
    box-sizing: border-box;
    display: none;
    align-items: center;
    gap: 14px;
    z-index: 12;
}
.ctrl-btn {
    background: none; border: none; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 4px; border-radius: 50%; transition: background 0.2s;
}
.ctrl-btn:hover { background: rgba(255,255,255,0.15); }
.timeline-slider {
    flex: 1; -webkit-appearance: none; background: rgba(255,255,255,0.25);
    height: 4px; border-radius: 4px; cursor: pointer;
}
.timeline-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px;
    background: #0084ff; border-radius: 50%; cursor: pointer;
}
.time-display { color: #fff; font-size: 12px; font-family: monospace; min-width: 80px; text-align: right; }

/* 📊 Bottom Panel Specs */
.comp-result-panel {
    background-color: var(--bg-card); border-radius: 16px; padding: 20px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.comp-meta-info h4 { font-size: 16px; font-weight: 500; color: var(--text-main); margin: 0; }
.comp-meta-info p { font-size: 14px; color: var(--text-muted); margin: 6px 0 0 0; }

.google-btn-primary {
    background-color: #0084ff; color: #ffffff; border: none; padding: 12px 24px;
    font-size: 14px; font-weight: 500; border-radius: 100px; cursor: pointer;
    display: flex; align-items: center; gap: 8px; transition: 0.2s;
}
.google-btn-primary:hover { background-color: #0074e4; }

.comp-carousel-section { margin-top: 12px; display: flex; flex-direction: column; gap: 16px; }
.carousel-heading { font-size: 16px; font-weight: 500; color: var(--text-main); margin: 0; }
.carousel-viewport { overflow-x: auto; display: flex; gap: 16px; padding-bottom: 8px; }
.carousel-card { flex: 0 0 280px; background-color: var(--bg-card); padding: 20px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.card-icon-wrapper { width: 40px; height: 40px; border-radius: 100px; background: rgba(0, 132, 255, 0.1); display: flex; align-items: center; justify-content: center; color: #0084ff; }
.card-title { font-size: 15px; font-weight: 500; color: var(--text-main); margin: 0; }
.card-desc { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }