/* ==========================================================================
   All-in-One Video Downloader - Cleaned Styles
   ========================================================================== */

/* Modern CSS Reset */
.aio-video-downloader-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* color: #fafafa; */
}

/* Main Container */
.aio-video-downloader-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e5e5;
}

/* Header */
.aio-header {
    padding: 32px 32px 24px;
    /* background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); */
    /* border-bottom: 1px solid #f1f5f9; */
}

.aio-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.025em;
}

.supported-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.supported-features span {
    font-size: 13px;
    color: #64748b;
    padding: 6px 12px;
    background: rgb(255 255 255);
    border-radius: 5px;
    /* border: 1px solid #7d0f70; */
    font-weight: 500;
    backdrop-filter: blur(8px);
}

/* URL Input Section */
.url-input-section {
    /* padding: 32px; */
    /* background: white; */
}

.url-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.url-input-group input[type="url"] {
    flex: 1;
    padding: 16px 20px;
    /* border: 1.5px solid #e2e8f0; */
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    background: #374151;
    transition: all 0.2s ease;
    color: #f3f4f6;
}

.url-input-group input[type="url"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #374151;
}

.url-input-group input[type="url"]::placeholder {
    color: #94a3b8;
}

/* Buttons */
.aio-btn {
    padding: 16px 24px;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: #3b82f6;
    color: white;
    position: relative;
    overflow: hidden;
}

.aio-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.aio-btn:hover::before {
    left: 100%;
}

.aio-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.aio-btn:active {
    transform: translateY(0);
}

.aio-btn-primary {
    background: #3b82f6;
    color: white;
}

.aio-btn-primary:hover {
    background: #2563eb;
}

.aio-btn-secondary {
    background: #64748b;
    color: white;
}

.aio-btn-secondary:hover {
    background: #475569;
}

.aio-btn-success {
    background: #10b981;
    color: white;
}

.aio-btn-success:hover {
    background: #059669;
}

/* Progress */
#aio-progress {
    padding: 24px 32px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: none;
}

#aio-progress p {
    margin-bottom: 12px;
    text-align: center;
    color: #475569;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-bar.active {
    animation: progressPulse 1.5s ease infinite;
}

/* Results Area */
#aio-result {
    min-height: 20px;
}

/* Video Title Section */
.video-title-section {
    padding: 24px 32px;
    background: #f8fafc;
    /* border-bottom: 1px solid #f1f5f9; */
    border-radius: 5px;
}

#video-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    text-align: center;
    margin: 0;
}

/* Selected Download Container */
#selected-download-container {
    padding: 20px 32px;
    /* background: #ecfdf5; */
    /* border-bottom: 1px solid #d1fae5; */
    text-align: center;
    display: none; /* Initially hidden */
}

#download-selected-btn {
    font-size: 16px;
    padding: 14px 28px;
}

/* Format Tabs */
.format-tabs {
    display: flex;
    gap: 8px;
    padding: 20px 183px;
    /* background: white; */
    border-bottom: 1px solid #3b82f6;
    overflow-x: auto;
}

.format-tab {
    padding: 12px 20px;
    border: 1.5px solid #e2e8f0;
    border-radius: 5px;
    background: white;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.format-tab:hover {
    border-color: #cbd5e1;
    color: #475569;
}

.format-tab.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Format Options */
.format-options {
    padding: 0;
    background: white;
    display: none;
}

.format-options.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.format-section {
    padding: 24px 32px;
    border-bottom: 1px solid #f1f5f9;
}

.format-section:last-child {
    border-bottom: none;
}

.format-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Format Grid */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.format-card {
    padding: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.format-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.format-card.selected {
    border-color: #10b981;
    background: #f0fdf9;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
    animation: selectedPulse 0.5s ease;
}

.format-card.selected::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.format-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.format-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.format-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.format-quality {
    font-size: 11px;
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    color: #475569;
    font-weight: 500;
}

/* Special Format Styles */
.format-card.video.with-audio {
    border-left: 3px solid #10b981;
}

.format-card.video.no-audio {
    border-left: 3px solid #f59e0b;
}

.format-card.audio {
    border-left: 3px solid #8b5cf6;
}

.format-card.thumbnail {
    border-left: 3px solid #f59e0b;
}

.shorts-card {
    border-left: 3px solid #ef4444 !important;
    background: linear-gradient(135deg, #fef2f2, #fecaca) !important;
}

.shorts-notice {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin: 16px 32px;
    text-align: center;
}

.shorts-notice strong {
    color: #dc2626;
    font-weight: 600;
}

/* Playlist Selector */
.playlist-selector-container {
    /* background: white; */
    border-radius: 5px;
    padding: 24px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); */
    /* border: 1px solid #f1f5f9; */
}

.playlist-stats {
    text-align: center;
    margin: 15px 0;
    padding: 12px;
    background: #e8f4fd;
    border-radius: 8px;
    font-size: 16px;
}

.playlist-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.playlist-videos-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 16px;
    background: #fafafa;
    margin: 20px 0;
}

.playlist-video-item {
    display: flex;
    align-items: center;
    padding: 16px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    gap: 15px;
    transition: all 0.3s ease;
}

.playlist-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    background: #f8fafc;
}

.video-checkbox-container {
    flex: 0 0 40px;
    text-align: center;
}

.video-checkbox-container input {
    transform: scale(1.4);
}

.video-thumbnail {
    flex: 0 0 120px;
    margin-left: 15px;
}

.video-thumbnail img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.video-info {
    flex: 1;
    margin-left: 15px;
}

.video-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    color: #1f2937;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6b7280;
}

.video-format-selector {
    flex: 0 0 250px;
    margin-left: 15px;
}

.video-format-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
	color: #f3f4f6;
}

.video-format-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.playlist-download-section {
    text-align: center;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

/* Thumbnail Modal */
#thumbnail-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    cursor: pointer;
}

#thumbnail-modal-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

/* Success/Error States */
.download-success {
    padding: 24px 32px;
    background: #111827;
    border: 1px solid #3b82f6;
    border-radius: 5px;
    margin: 20px 32px;
    text-align: center;
}

.download-error {
    padding: 24px 32px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin: 20px 32px;
    text-align: center;
}

/* Empty State */
.no-formats-message {
    padding: 40px 32px;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

/* Utility & Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes selectedPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.98); }
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .aio-video-downloader-container {
        margin: 20px 16px;
        border-radius: 12px;
    }
    
    .aio-header {
        padding: 24px 20px 16px;
    }
    
    .aio-header h3 {
        font-size: 24px;
    }
    
    .supported-features {
        gap: 8px;
    }
    
    .supported-features span {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .url-input-section {
        padding: 24px 20px;
    }
    
    .url-input-group {
        flex-direction: column;
    }
    
    .format-tabs {
        padding: 16px 20px;
        gap: 6px;
    }
    
    .format-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .format-section {
        padding: 20px;
    }
    
    .format-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .playlist-video-item {
        flex-wrap: wrap;
    }
    
    .video-format-selector {
        flex: 1 0 100%;
        margin-top: 10px;
    }
    
    .playlist-controls {
        flex-direction: column;
    }
    
    .video-title-section,
    #selected-download-container,
    .playlist-stats,
    .playlist-download-section {
        padding: 20px;
    }
    
    .shorts-notice,
    .download-success,
    .download-error {
        margin: 16px 20px;
    }
}

@media (max-width: 480px) {
    .format-tabs {
        flex-wrap: wrap;
    }
    
    .format-tab {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
    
    .playlist-video-item {
        flex-direction: column;
        text-align: center;
    }
    
    .video-checkbox-container {
        order: -1;
    }
}
.download-success h4 {
    /* Заставляем длинный текст переноситься на новую строку */
    overflow-wrap: break-word;
    word-wrap: break-word; /* Для старых браузеров */
    word-break: break-word; /* Более агрессивный перенос, если нужно */
    hyphens: auto; /* Пытается переносить по слогам, где возможно */

    /* Опционально: добавляем немного воздуха по бокам, чтобы текст не "лип" к краям */
    padding: 0 10px;
}

/* ==========================================================================
   Download Archive Button (was accidentally removed)
   ========================================================================== */

.download-archive-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin: 15px 0;
}

.download-archive-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.3);
}
/* Основной контейнер */
.aio-video-downloader-container {
    padding: 24px;
    border: 1px solid #e0e0e0;
    margin: 24px 0;
    background-color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.5;
    color: #333333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Группа ввода URL */
.url-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.url-input-group input[type="url"] {
    flex: 1;
    padding: 12px 16px;
    color: #f3f4f6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.url-input-group input[type="url"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.url-input-group input[type="url"]::placeholder {
    color: #9ca3af;
}

/* Общие стили кнопок */
.btn {
    padding: 12px 20px;
    background-color: #3b82f6;
    color: white;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-blue {
    background-color: #3b82f6;
}

.btn-blue:hover {
    background-color: #2563eb;
}

.btn-yellow {
    background-color: #fbbf24;
    color: #1f2937;
}

.btn-yellow:hover {
    background-color: #f59e0b;
}

.btn-purple {
    background-color: #8b5cf6;
}

.btn-purple:hover {
    background-color: #7c3aed;
}

.btn-success {
    background-color: #10b981;
}

.btn-success:hover {
    background-color: #059669;
}

/* Опции форматов */
.format-options {
    border: 2px dashed #93c5fd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    background-color: #111827;
}

/* Сетка форматов */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

/* Кнопки форматов в сетке */
.format-button {
    padding: 12px 16px;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
}

.format-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Стили для выбираемых кнопок */
.format-button.selectable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.format-button.selectable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.format-button.selectable.selected {
    background-color: #10b981 !important;
    border: 2px solid #059669 !important;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Цвета для разных типов форматов */
.format-button.with-audio {
    background-color: #3b82f6 !important;
    color: white !important;
}

.format-button.with-audio:hover {
    background-color: #2563eb !important;
}

.format-button.without-audio {
    background-color: #ef4444 !important;
    color: white !important;
}

.format-button.without-audio:hover {
    background-color: #dc2626 !important;
}

.format-button.audio {
    background-color: #8b5cf6 !important;
    color: white !important;
}

.format-button.audio:hover {
    background-color: #7c3aed !important;
}

.format-button.thumbnail {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
}

.format-button.thumbnail:hover {
    background-color: #f59e0b !important;
}

/* Заголовок видео */
#aio-vk-video-title {
    margin: 24px 0 16px;
    text-align: center;
    font-weight: 600;
    font-size: 20px;
    color: #1f2937;
}

/* Контейнер для скачивания выбранного */
#selected-download-container {
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    display: none;
}

#download-selected-btn {
    font-size: 16px;
    font-weight: 600;
    padding: 14px 24px;
	background: black;
}

#download-selected-btn:hover {
    background-color: #059669;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.2);
}

/* Прогресс-бар */
#aio-vk-progress-bar {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.progress-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.progress-percentage {
    text-align: right;
    font-size: 14px;
    color: #6c757d;
}

/* Стили для кнопки успешного скачивания */
.download-success-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #10b981;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin: 10px 0;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.download-success-btn:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    color: white;
}

/* Стили для контейнера результата скачивания */
.download-result-container {
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

/* Анимации для плавных переходов */
#selected-download-container,
#aio-vk-progress-bar,
.download-result-container {
    transition: all 0.3s ease-in-out;
}

/* Убедимся, что прогресс бар имеет правильные отступы */
#aio-vk-progress-bar {
    margin: 20px 0;
}

/* Стили для иконок Font Awesome */
.fas, .fa {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}

/* Убедимся, что Font Awesome загружается правильно */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css');

/* Дополнительные стили для кнопок с иконками */
.btn i, .format-button i {
    margin-right: 8px;
    font-size: 14px;
}

/* Улучшенные стили для кнопок форматов */
.format-button {
    position: relative;
    overflow: hidden;
}

.format-button:active {
    transform: scale(0.98);
}

/* Анимация для прогресс-бара */
.progress-fill {
    transition: width 0.5s ease-in-out;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* Стили для состояния загрузки */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Стили для списка видео из плейлиста */
#aio-vk-playlist-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.playlist-checkbox {
    margin: 0;
}

/* Responsive стили */
@media (max-width: 1024px) {
    .format-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .format-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .url-input-group {
        flex-direction: column;
    }

    #aio-vk-format-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 600px) {
    .aio-video-downloader-container {
        padding: 16px;
    }

    .format-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode поддержка */
@media (prefers-color-scheme: dark) {
    .aio-video-downloader-container {
        background-color: #1f2937;
        color: #f3f4f6;
        border-color: #374151;
    }

    .url-input-group input[type="url"] {
        background-color: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .url-input-group input[type="url"]::placeholder {
        color: #9ca3af;
    }

    .format-options {
        background-color: #111827;
        border-color: #3b82f6;
    }

    .progress-bar {
        background-color: #374151;
    }
}

/* Стили для плейлистов */
.playlist-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.playlist-videos {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: white;
    padding: 10px;
}

.playlist-video-item {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.playlist-video-item:last-child {
    border-bottom: none;
}

.playlist-video-item label {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin: 0;
    cursor: pointer;
}

.playlist-video-checkbox {
    margin-right: 10px;
}

.video-title {
    flex-grow: 1;
    font-weight: 500;
}

.video-duration {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 10px;
}

.playlist-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.playlist-info {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.playlist-info p {
    margin: 0;
    color: #0056b3;
    font-size: 0.9em;
}

.playlist-errors {
    margin-top: 15px;
    padding: 10px;
    background: #fee;
    border-radius: 5px;
    border-left: 4px solid #dc2626;
}

.playlist-errors h5 {
    color: #dc2626;
    margin-bottom: 5px;
}

.playlist-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .playlist-actions {
        flex-direction: column;
    }
    
    .playlist-video-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .video-duration {
        margin-left: 0;
        margin-top: 5px;
    }
}