/* ===== MAIN CONTAINER ===== */
.video-converter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* ===== HEADER SECTION ===== */
.header-section {
    text-align: center;
    margin-bottom: 20px;
}

.video-converter-container h2 {
    color: #5d4037;
    margin-bottom: 10px;
    font-size: 2.2rem;
    font-weight: 600;
}

.converter-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== UPLOAD SECTION ===== */
.upload-section {
    margin-bottom: 30px;
}

.upload-container {
    border: 2px dashed #d2b48c;
    border-radius: 12px;
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(245, 240, 232, 0.4);
    position: relative;
    overflow: hidden;
}

.upload-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(160, 82, 45, 0.1), transparent);
    transition: left 0.5s ease;
}

.upload-container:hover::before {
    left: 100%;
}

.upload-container.highlight {
    border-color: #a0522d;
    background-color: rgba(160, 82, 45, 0.1);
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-content i {
    font-size: 48px;
    color: #a0522d;
}

.file-input-label {
    background-color: #a0522d;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.file-input-label:hover {
    background-color: #8b4513;
}

.hidden-input {
    display: none;
}

.supported-formats,
.upload-content p {
    font-size: 0.85rem;
    color: #888;
    margin-top: 10px;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

/* ===== SECTION LAYOUTS ===== */
.preview-section,
.edit-section,
.conversion-section,
.progress-section,
.result-section {
    margin-bottom: 30px;
}

.preview-container,
.edit-options,
.conversion-options,
.result-container,
.progress-container {
    background-color: #fdfbf7;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(210, 180, 140, 0.2);
    transition: all 0.3s ease;
}

.preview-container:hover,
.edit-options:hover,
.conversion-options:hover,
.result-container:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ===== SECTION HEADERS ===== */
h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #5d4037;
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 2px solid rgba(160, 82, 45, 0.3);
    padding-bottom: 12px;
    position: relative;
}

h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #a0522d;
}

.video-player {
    width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

.video-info,
.result-info {
    background-color: #f5f0e8;
    border-radius: 4px;
    padding: 10px 15px;
    margin-top: 15px;
}

.video-info p,
.result-info p {
    margin: 5px 0;
    font-size: 14px;
}

/* ===== EDIT SECTION LAYOUT ===== */
.edit-section {
    background: linear-gradient(135deg, #fdfbf7 0%, #f5f0e8 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.presets-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(160, 82, 45, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(160, 82, 45, 0.1);
}

.basic-edit-tools {
    margin-bottom: 30px;
}

.audio-settings {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(160, 82, 45, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(160, 82, 45, 0.1);
}

.effects-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(160, 82, 45, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(160, 82, 45, 0.1);
}

.edit-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.tool-group h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    color: #5d4037;
}

#videoTimeline {
    margin-bottom: 10px;
    background-color: #f5f0e8;
    border-radius: 4px;
    border: 1px solid #d2b48c;
}

.trim-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.time-input {
    width: 80px;
    padding: 5px;
    border: 1px solid #d2b48c;
    border-radius: 4px;
}

.tool-button {
    padding: 8px 12px;
    background-color: #f5f0e8;
    border: 1px solid #d2b48c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tool-button:hover {
    background-color: #efe8d9;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Milk Tea Themed Adjustment Slider --- */
.adjustment-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #e0dcd7;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    transition: opacity 0.2s ease-in-out;
}

.adjustment-slider:hover {
    opacity: 0.9;
}

.adjustment-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #c5a992;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    margin-top: -6px;
}

.adjustment-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #c5a992;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    border: none;
}

.adjustment-slider::-moz-range-track {
    width: 100%;
    height: 8px;
    background: #e0dcd7;
    border-radius: 5px;
    cursor: pointer;
}

.adjustment-input {
    width: 60px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #d2b48c;
    background-color: #fdfbf7;
    color: #5d4037;
    text-align: center;
    -moz-appearance: textfield;
}

.adjustment-input::-webkit-outer-spin-button,
.adjustment-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.edit-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

/* Resolution Options */
.resolution-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resolution-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.resolution-options input[type="radio"] {
    accent-color: #a0522d;
}

#customResolution {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f0e8;
    border-radius: 4px;
    border: 1px solid #d2b48c;
}

#customResolution label {
    margin-right: 10px;
}

#customResolution input {
    width: 80px;
    padding: 4px;
    border: 1px solid #d2b48c;
    border-radius: 4px;
    margin-right: 15px;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Filter Options */
.filter-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.filter-option {
    text-align: center;
    cursor: pointer;
}

.filter-preview {
    height: 60px;
    background-color: #e8e2d9;
    border-radius: 4px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #5d4037;
    border: 2px solid transparent;
}

.filter-option.active .filter-preview {
    border-color: #a0522d;
    box-shadow: 0 0 8px rgba(160, 82, 45, 0.5);
}

/* Text Overlay Options */
.overlay-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #d2b48c;
    border-radius: 4px;
    background-color: #fdfbf7;
    color: #5d4037;
}


/* ===== CONVERSION SECTION ===== */
.conversion-section {
    background: linear-gradient(135deg, #f5f0e8 0%, #fdfbf7 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.option-group {
    display: flex;
    flex-direction: column;
}

.option-group label {
    margin-bottom: 8px;
    font-weight: bold;
}

.option-group select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #d2b48c;
    background-color: #fdfbf7;
}

.option-group-checkbox {
    justify-content: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #a0522d;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #666;
}

/* Preset Buttons */
.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-button {
    padding: 8px 12px;
    background-color: #f5f0e8;
    border: 1px solid #d2b48c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.preset-button:hover,
.preset-button.active {
    background-color: #efe8d9;
    border-color: #c5a992;
}

/* Progress Bar */
.progress-container p {
    margin-bottom: 10px;
}

progress {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
}

progress::-webkit-progress-bar {
    background-color: #e8e2d9;
    border-radius: 6px;
}

progress::-webkit-progress-value {
    background-color: #a0522d;
    border-radius: 6px;
    transition: width 0.3s ease;
}

/* Buttons */
.convert-button,
.download-button,
.new-conversion-button,
.secondary-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s;
    text-decoration: none;
    color: white;
}

.convert-button {
    background-color: #8b4513;
    width: 100%;
}

.convert-button:hover {
    background-color: #a0522d;
}

.result-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.download-button {
    background-color: #a0522d;
    flex: 1;
}

.download-button:hover {
    background-color: #8b4513;
}

.new-conversion-button {
    flex: 1;
    background-color: #f5f0e8;
    color: #5d4037;
    border: 1px solid #d2b48c;
}

.new-conversion-button:hover {
    background-color: #efe8d9;
}

.secondary-button {
    background-color: #f5f0e8;
    color: #5d4037;
    border: 1px solid #d2b48c;
}

.secondary-button:hover {
    background-color: #efe8d9;
}

/* Message for unsupported formats */
.unsupported-message {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .video-converter-container {
        max-width: 100%;
        padding: 15px;
    }

    .edit-tools {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }

    .options-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .video-converter-container {
        padding: 10px;
        gap: 20px;
    }

    .header-section h2 {
        font-size: 1.8rem;
    }

    .converter-description {
        font-size: 1rem;
    }

    .edit-tools {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .trim-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .button-group {
        justify-content: center;
        flex-wrap: wrap;
    }

    .preset-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .result-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .edit-section,
    .conversion-section {
        padding: 20px;
    }

    .presets-section,
    .audio-settings,
    .effects-section {
        padding: 15px;
    }
}

@media (max-width: 520px) {
    .video-converter-container {
        padding: 8px;
        gap: 15px;
    }

    .header-section h2 {
        font-size: 1.5rem;
    }

    .converter-description {
        font-size: 0.9rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .filter-options {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 8px;
    }

    .resolution-options {
        font-size: 0.9rem;
    }

    .edit-section,
    .conversion-section {
        padding: 15px;
    }

    .presets-section,
    .audio-settings,
    .effects-section {
        padding: 12px;
    }

    .upload-container {
        padding: 30px 20px;
    }
}

/* Loading animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes progressGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(160, 82, 45, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(160, 82, 45, 0.6);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Enhanced progress container */
.progress-container {
    animation: fadeIn 0.3s ease-in;
}

.progress-container p {
    animation: pulse 1.5s ease-in-out infinite;
}

progress::-webkit-progress-value {
    animation: progressGlow 2s ease-in-out infinite;
}

/* Convert button loading state */
.convert-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
    position: relative;
}

.convert-button:disabled::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}