/* ==========================================================================
   DROPSITE VIDEO COMPRESSOR (CLIENT-SIDE WEBCODECS / MEDIARECORDER IN RAM)
   Theme: Obsidian Glass + Cyber Mint + Electric Cyan
   Zero emoji, pure inline SVG, 100% Client-Side Transcoding
   ========================================================================== */

.video-compress-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 820px;
    margin: 0 auto;
}

.video-compress-card {
    background: radial-gradient(120% 120% at 50% 0%, rgba(20, 28, 48, 0.9) 0%, rgba(8, 12, 22, 0.98) 100%);
    border: 1px solid rgba(52, 211, 153, 0.28);
    border-top: 1px solid rgba(52, 211, 153, 0.55);
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-dropzone {
    border: 2px dashed rgba(52, 211, 153, 0.35);
    background: rgba(6, 10, 20, 0.7);
    border-radius: 16px;
    padding: 36px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.video-dropzone:hover,
.video-dropzone.drag-over {
    border-color: #34D399;
    background: rgba(16, 185, 129, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.18);
}

.video-dropzone-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34D399;
}

.video-dropzone-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0;
}

.video-dropzone-subtitle {
    font-size: 0.8rem;
    color: #94A3B8;
    margin: 0;
}

/* Stan po wczytaniu wideo */
.video-compress-active-state {
    display: none;
    flex-direction: column;
    gap: 18px;
}

.video-compress-active-state.visible {
    display: flex;
}

.video-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(10, 15, 28, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.video-meta-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.video-meta-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #F8FAFC;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.video-meta-size {
    font-size: 0.76rem;
    color: #64748B;
}

/* Wybór profilu docelowego */
.video-preset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.video-preset-btn {
    padding: 14px 12px;
    background: rgba(6, 10, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #94A3B8;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.video-preset-btn:hover {
    border-color: rgba(52, 211, 153, 0.4);
    color: #F8FAFC;
    background: rgba(16, 185, 129, 0.05);
}

.video-preset-btn.active {
    background: rgba(16, 185, 129, 0.16);
    border-color: #34D399;
    color: #34D399;
}

.video-preset-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: inherit;
}

.video-preset-desc {
    font-size: 0.72rem;
    color: #64748B;
}

.video-preset-btn.active .video-preset-desc {
    color: #5EEAD4;
}

/* Pasek postępu kompresji */
.video-progress-box {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: rgba(6, 10, 20, 0.9);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 14px;
}

.video-progress-box.visible {
    display: flex;
}

.video-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: #F8FAFC;
}

.video-progress-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
}

.video-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #10B981 0%, #34D399 100%);
    border-radius: 5px;
    transition: width 0.15s linear;
}

.video-compress-btn-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    border: none;
    border-radius: 12px;
    color: #04140D;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.video-compress-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 26px rgba(16, 185, 129, 0.6);
}

.video-compress-btn-start:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Wynik kompresji */
.video-result-box {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 14px;
}

.video-result-box.visible {
    display: flex;
}

.video-result-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.video-result-saved {
    font-size: 0.94rem;
    font-weight: 800;
    color: #34D399;
}

.video-result-details {
    font-size: 0.78rem;
    color: #CBD5E1;
}

.video-result-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    border: none;
    border-radius: 8px;
    color: #04140D;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.video-btn-download:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

@media (max-width: 640px) {
    .video-compress-card {
        padding: 16px 12px;
        border-radius: 16px;
    }
    .video-dropzone {
        padding: 24px 14px;
        border-radius: 12px;
    }
    .video-dropzone-icon {
        width: 44px;
        height: 44px;
    }
    .video-dropzone-title {
        font-size: 0.92rem;
    }
    .video-preset-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .video-result-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
    }
    .video-result-actions {
        width: 100%;
    }
    .video-btn-download {
        width: 100%;
        justify-content: center;
        padding: 11px;
    }
    .video-compress-btn-start {
        width: 100%;
        padding: 12px;
    }
}
