/* Media Converter — standalone fullscreen app */

#media-converter-app {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
    margin-top: 0 !important;
}

/* Main glass panel */
.mc-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--primary-border);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mc-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.mc-subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-grey, #aaa);
    margin: -1rem 0 0;
}

/* ── Drop Zone ── */
.mc-dropzone {
    border: 2px dashed var(--primary-border);
    border-radius: 14px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    background: transparent;
}

.mc-dropzone.drag-over {
    border-color: var(--primary);
    background: rgba(162, 76, 255, 0.07);
    box-shadow: 0 0 0 4px rgba(162, 76, 255, 0.15);
}

.mc-dropzone-icon {
    color: var(--text-grey, #aaa);
    opacity: 0.6;
    margin-bottom: 0.25rem;
    transition: color 0.2s, opacity 0.2s;
}

.mc-dropzone.drag-over .mc-dropzone-icon {
    color: var(--primary);
    opacity: 1;
}

.mc-dropzone-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.mc-dropzone-sub {
    font-size: 0.8rem;
    color: var(--text-grey, #aaa);
    margin: 0;
}

.mc-dropzone-formats {
    font-size: 0.72rem;
    color: var(--text-grey, #aaa);
    opacity: 0.6;
    margin: 0.25rem 0 0;
    text-align: center;
    line-height: 1.6;
}

.btn-select {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.25rem;
}

.btn-select:hover {
    background: var(--primary-hover, #8a2be2);
}

/* ── Controls ── */
.mc-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mc-controls.hidden {
    display: none;
}

/* File Info */
.mc-file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
}

.mc-file-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.mc-file-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.mc-file-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mc-file-meta {
    font-size: 0.75rem;
    color: var(--text-grey, #aaa);
}

.btn-clear {
    background: transparent;
    border: 1px solid var(--primary-border);
    color: var(--text-grey, #aaa);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s;
}

.btn-clear:hover {
    border-color: #e55;
    color: #e55;
}

/* Image Preview */
.mc-preview {
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    max-height: 220px;
}

.mc-preview img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px;
}

/* Row layout */
.mc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: end;
}

.mc-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mc-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.85;
}

.mc-select {
    background: var(--input-bg, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--primary-border);
    color: var(--text-color);
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.mc-select:focus {
    border-color: var(--primary);
}

.mc-select option {
    background: #1a1a2e;
    color: var(--text-color);
}

.mc-slider {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
}

/* Convert Button */
.btn-convert {
    background: var(--primary);
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    letter-spacing: 0.01em;
}

.btn-convert:hover {
    background: var(--primary-hover, #8a2be2);
}

.btn-convert:active {
    transform: scale(0.98);
}

.btn-convert:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Progress */
.mc-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mc-progress-wrap.hidden {
    display: none;
}

.mc-progress-label {
    font-size: 0.82rem;
    color: var(--text-grey, #aaa);
    text-align: center;
}

.mc-progress-bar {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.mc-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
}

/* FFmpeg Loading */
.mc-ffmpeg-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-grey, #aaa);
    padding: 0.5rem;
}

.mc-ffmpeg-loading.hidden {
    display: none;
}

.mc-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(162, 76, 255, 0.3);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: mc-spin 0.8s linear infinite;
    flex-shrink: 0;
}

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

/* Download */
.mc-download-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.mc-download-wrap.hidden {
    display: none;
}

.btn-download {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

.btn-download:hover {
    background: var(--primary);
    color: #fff;
}

.mc-result-info {
    font-size: 0.8rem;
    color: var(--text-grey, #aaa);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .mc-panel {
        padding: 1.5rem 1.25rem;
    }

    .mc-row {
        grid-template-columns: 1fr;
    }

    .mc-dropzone {
        padding: 2rem 1rem;
    }
}
