/* css/video.css */

/* ==========================================================================
   1. СЕТКА ВИДЕО И КАРТОЧКИ (Оставляем как было, тут все ок)
   ========================================================================== */
#video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    padding-bottom: 80px;
    width: 100%;
}

@media (min-width: 768px) {
    #video-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

.video-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-card, #141414);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.video-card:hover {
    border-color: var(--primary, #FABF3C);
    box-shadow: 0 0 15px rgba(250, 191, 60, 0.2);
    transform: translateY(-2px);
}

.video-card video {
    width: 100%; height: 100%; object-fit: cover;
}

.video-delete-btn {
    position: absolute; top: 8px; right: 8px;
    width: 28px; height: 28px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%; color: #fff;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.2s; z-index: 10;
}
.video-card:hover .video-delete-btn { opacity: 1; }
.video-delete-btn:hover { background: #dc3545; }

/* ==========================================================================
   2. НАСТРОЙКИ SEEDANCE (ИСПРАВЛЕНИЕ ДИЗАЙНА)
   ========================================================================== */

/* Контейнер настроек */
#seedance-settings {
    background: var(--bg-panel, rgba(26, 26, 26, 0.4));
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

/* --- СЛОТЫ ЗАГРУЗКИ (ИСПРАВЛЕНО) --- */
.video-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.upload-slot {
    position: relative;
    aspect-ratio: 1 / 1;
    background-color: var(--bg-input, #1a1a1a);
    border: 2px dashed var(--border-color, rgba(255,255,255,0.2));
    border-radius: 12px;
    cursor: pointer;
    transition: 0.3s;
    overflow: hidden;
    
    /* Центрирование содержимого */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.upload-slot:hover {
    border-color: var(--primary, #FABF3C);
    background-color: rgba(250, 191, 60, 0.05);
}

.upload-slot.has-file {
    border-style: solid;
    border-color: var(--primary, #FABF3C);
}

.slot-placeholder {
    color: var(--text-secondary, #888);
    pointer-events: none; /* Чтобы клик проходил сквозь текст */
}

.slot-placeholder svg {
    width: 32px; height: 32px;
    margin-bottom: 8px;
    fill: currentColor;
    display: block;
    margin-left: auto; margin-right: auto;
}

.slot-preview {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: none; z-index: 1;
}

.slot-remove-btn {
    position: absolute; top: 5px; right: 5px;
    width: 24px; height: 24px;
    background: rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%; color: #fff;
    cursor: pointer; z-index: 2;
    display: none; align-items: center; justify-content: center;
    font-size: 14px; padding: 0; line-height: 1;
}
.upload-slot.has-file:hover .slot-remove-btn { display: flex; }
.slot-remove-btn:hover { background: #dc3545; border-color: #dc3545; }


/* --- РАДИО КНОПКИ (ДЛИТЕЛЬНОСТЬ) --- */
.custom-duration-group {
    display: flex;
    background: var(--bg-input, #1a1a1a);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    margin-top: 5px;
}

.duration-option {
    flex: 1;
    position: relative;
}

/* ВАЖНО: Скрываем стандартный кружок радио-кнопки */
.duration-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Стили лейбла (визуальной кнопки) */
.duration-label {
    display: block;
    text-align: center;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #888);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.duration-label:hover {
    color: var(--text-main, #fff);
    background: rgba(255,255,255, 0.05);
}

/* Состояние CHECKED (Выбрано) */
.duration-option input[type="radio"]:checked + .duration-label {
    background-color: var(--primary, #FABF3C);
    color: #000; /* Черный текст на оранжевом фоне */
    box-shadow: 0 2px 8px rgba(250, 191, 60, 0.3);
}

/* --- ВЫПАДАЮЩИЙ СПИСОК --- */
.custom-dark-select {
    background-color: var(--bg-input, #1a1a1a);
    color: var(--text-main, #fff);
    border: 1px solid var(--border-color, rgba(255,255,255,0.1));
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    width: 100%;
    cursor: pointer;
}
.custom-dark-select:focus {
    border-color: var(--primary, #FABF3C);
    outline: none;
}

/* --- СВИТЧ (ЗВУК) --- */
.form-check-input {
    background-color: #333;
    border-color: #555;
    cursor: pointer;
}
.form-check-input:checked {
    background-color: var(--primary, #FABF3C);
    border-color: var(--primary, #FABF3C);
}

/* Кнопка генерации видео */
#generate-video-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Убедимся, что цвета правильные */
    background-color: var(--primary, #FABF3C);
    color: #000;
    border: none;
    border-radius: var(--radius-md, 12px);
    transition: all 0.3s ease;
}

#generate-video-button:hover {
    background-color: #ffca5c; /* Чуть светлее при наведении */
    box-shadow: 0 0 15px rgba(250, 191, 60, 0.4);
    transform: translateY(-2px);
}

#generate-video-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.video-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* Строгий квадрат */
    
    /* Фон и границы как у карточки */
    background-color: var(--bg-card, #141414); 
    border: 1px dashed rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px;
    
    /* Центрирование контента */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
}
