.video-preview,
.upload-area {
    height: 86px;
    border-radius: 10px;
    border: 1px dashed #ddd;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 0.6rem;
}
.video-preview.show{
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: #f8f9ff;
}

.upload-area.dragover {
    background: #f0f4ff;
}

.upload-icon {
    color: var(--primary-color);
}

.upload-text {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--gray-500);
    line-height: 120%;
}

.video-preview {
    display: none;
}

.video-preview.show {
    display: flex;
    padding: 10px;
    align-items: center;
    flex-direction: row;
    margin-bottom: 0.6rem;
}

.video-thumbnail {
    width: 50%;
    padding-top: 24%;
    border-radius: var(--border-radius);
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 20px;
}

.video-info {
    flex: 1;
    font-size: 15px;
    text-align: left;
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.video-title {
    font-weight: 700;
    line-height: 100%;
    color: rgba(39, 39, 39, 1);
    width: 8.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-details {
    font-weight: 400;
    color: rgba(147, 147, 147, 1);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

/* Test Video Dropdown */
.dropdown-select-video-test {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
}

.dropdown-select-video-test-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    background: white;
    font-size: 14px;
    color: var(--text-color);
}

.btn-test-convert {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-test-convert:hover:not(:disabled) {
    background: var(--primary-hover);
}

.btn-test-convert:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Controls */
.controls {
    margin-top: var(--controls-gap);
    gap: 0.6rem;
    display: grid;
}

.control-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.control-label {
    font-weight: 400;
    line-height: 100%;
    color: var(--black);
    min-width: fit-content;
    font-size: 1rem;
}

.control-select {
    padding: 0.625rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--white) url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 0H0L6 8L12 0Z' fill='%23939393'/%3E%3C/svg%3E") no-repeat;
    background-position: right 12px center;
    background-size: 12px 8px;
    color: var(--black);
    min-width: 179px;
    cursor: pointer;
    font-weight: 400;
    line-height: 120%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.control-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.control-select option:first-child,
.control-select:has(> option:first-child:checked) {
    color: var(--gray-500);
}

.control-select option {
    color: var(--black);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(26px);
}

/* Volume Slider */
.volume-slider {
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--gray-500) var(--volume-percentage, 33.33%), #D9D9D9 var(--volume-percentage, 33.33%), #D9D9D9 100%);
    border-radius: 2px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: none; /* Prevent size transitions */
}

/* Webkit browsers (Chrome, Safari, Edge) */
.volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 2px solid var(--gray-500);
    border-radius: 50%;
    cursor: pointer;
    transition: none; /* Prevent size transitions */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.volume-slider::-webkit-slider-thumb:hover {
    border-color: var(--primary-color);
    transform: none; /* Prevent scaling on hover */
}

.volume-slider::-webkit-slider-thumb:active {
    border-color: var(--primary-color);
    transform: none; /* Prevent scaling when dragging */
}

/* Firefox */
.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 2px solid var(--gray-500);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: none; /* Prevent size transitions */
}

.volume-slider::-moz-range-thumb:hover {
    border-color: var(--primary-color);
}

.volume-slider::-moz-range-thumb:active {
    border-color: var(--primary-color);
}

.volume-text {
    font-size: 14px;
    color: rgba(136, 136, 136, 1);
    font-weight: 400;
    min-width: 40px;
    text-align: right;
}

/* Convert Button */
.convert-btn-container {
    width: 100%;
    position: absolute;
    bottom: 2rem;
    left: 0;
    padding: 0 1rem;
}

.convert-btn {
    width: 100%;
    padding: 0.7rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    color: var(--white);
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.convert-btn:active {
    transform: translateY(0);
}

.convert-btn:disabled {
    background: #c6c6c6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.convert-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Form Elements */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: var(--white);
    cursor: pointer;
    position: relative;
}

input[type="radio"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 7px;
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
}

input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background: var(--white);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

input[type="checkbox"]:checked {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 0px;
    left: 5px;
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

/* Ads */
.ads {
    min-height: 65px;
    height: fit-content;
    background-image: url('https://nguyencongpc.vn/media/banner/27_Maydf4e66449b333a029b08038347c6199e.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
}

.ads img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
