/* Стили для иконки Rutube в заголовке */
.rutube-aio-header h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* Расстояние между иконкой и текстом */
}

.rutube-aio-header h3 img.rutube-icon {
    width: 28px; /* Фиксированная ширина */
    height: 28px; /* Фиксированная высота */
    object-fit: contain; /* Сохраняет пропорции */
    display: inline-block;
    vertical-align: middle; /* Выравнивание по вертикали */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); /* Легкая тень */
    transition: transform 0.2s ease; /* Плавный эффект при наведении */
}

.rutube-aio-header h3 img.rutube-icon:hover {
    transform: scale(1.05); /* Легкое увеличение при наведении */
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .rutube-aio-header h3 img.rutube-icon {
        width: 28px;
        height: 28px;
    }
    
    .rutube-aio-header h3 {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}
   
.fab, .far {
    font-weight: 400;
}

.fab {
    font-family: "Font Awesome 5 Brands";
}
.fa, .fab, .fad, .fal, .far, .fas {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* Modern CSS Reset */
.rutube-aio-video-downloader-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* color: #fafafa; */
}

/* Main Container */
.rutube-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 */
.rutube-aio-header {
    padding: 32px 32px 24px;
    /* background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%); */
    /* border-bottom: 1px solid #f1f5f9; */
}

.rutube-aio-header h3 {
    font-size: 25px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.025em;
}

.rutube-supported-features {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.rutube-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 */
.rutube-url-input-section {
    /* padding: 32px; */
    /* background: white; */
}

.rutube-url-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.rutube-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;
}

.rutube-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;
}

.rutube-url-input-group input[type="url"]::placeholder {
    color: #94a3b8;
}

/* Buttons */
.rutube-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;
	justify-content: center;
}

.rutube-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;
}

.rutube-aio-btn:hover::before {
    left: 100%;
}

.rutube-aio-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.rutube-aio-btn:active {
    transform: translateY(0);
}

.rutube-aio-btn-primary {
    background: #3b82f6;
    color: white;
}

.rutube-aio-btn-primary:hover {
    background: #2563eb;
}

.rutube-aio-btn-secondary {
    background: #64748b;
    color: white;
}

.rutube-aio-btn-secondary:hover {
    background: #475569;
}

.rutube-aio-btn-success {
    background: black;
    color: white;
}

.rutube-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;
}

.rutube-progress-bar-container {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}

.rutube-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.rutube-progress-bar.rutube-active {
    animation: progressPulse 1.5s ease infinite;
}

/* Results Area */
#aio-result {
    min-height: 20px;
}

/* Video Title Section */
.rutube-video-title-section {
    padding: 24px 32px;
    background: #52565b;
    /* 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 */
#rutube-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;
}

.rutube-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 Tabs */
.rutube-format-tabs {
    display: flex;
    gap: 8px;
    padding: 20px 183px;
    /* background: white; */
    border-bottom: 1px solid #3b82f6;
    overflow-x: auto;
}

.rutube-format-tab {
    padding: 5px 15px;
    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;
}

.rutube-format-tab:hover {
    border-color: #cbd5e1;
    color: #475569;
}

.rutube-format-tab.rutube-active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Format Options */
.rutube-format-options {
    padding: 0;
    background: white;
    display: none;
}

.rutube-format-options.rutube-active {
    display: block;
    animation: fadeIn 0.2s ease;
}

.rutube-format-section {
    padding: 24px 32px;
    border-bottom: 1px solid #f1f5f9;
}

.rutube-format-section:last-child {
    border-bottom: none;
}

.rutube-format-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Format Grid */
.rutube-format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.rutube-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;
}

.rutube-format-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.rutube-format-card.rutube-selected {
    border-color: #10b981;
    background: #f0fdf9;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
    animation: selectedPulse 0.5s ease;
}

.rutube-format-card.rutube-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;
}

.rutube-format-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rutube-format-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.rutube-format-meta {
    margin-top: 6px;
    font-size: 0.9em;
    color: #666;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.rutube-audio-icon {
    font-size: 1.2em;
    margin-left: 4px;
}

.rutube-format-quality {
    font-size: 11px;
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    color: #475569;
    font-weight: 500;
}

/* Special Format Styles */
.rutube-format-card.rutube-video.rutube-with-audio {
    border-left: 3px solid #10b981;
}

.rutube-format-card.rutube-video.rutube-no-audio {
    border-left: 3px solid #f59e0b;
}

.rutube-format-card.rutube-audio {
    border-left: 3px solid #8b5cf6;
}

.rutube-format-card.rutube-thumbnail {
    border-left: 3px solid #f59e0b;
}

.rutube-shorts-card {
    border-left: 3px solid #ef4444 !important;
    background: linear-gradient(135deg, #fef2f2, #fecaca) !important;
}

.rutube-shorts-notice {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin: 16px 32px;
    text-align: center;
}

.rutube-shorts-notice strong {
    color: #dc2626;
    font-weight: 600;
}

/* Playlist Selector */
.rutube-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; */
}

.rutube-playlist-stats {
    text-align: center;
    margin: 15px 0;
    padding: 12px;
    background: #e8f4fd;
    border-radius: 8px;
    font-size: 16px;
}

.rutube-playlist-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}

.rutube-playlist-videos-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 16px;
    background: #fafafa;
    margin: 20px 0;
}

.rutube-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;
}

.rutube-playlist-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    background: #f8fafc;
    align-items: center;
}

.rutube-video-checkbox-container {
    flex: 1 0 0;
    text-align: left;
}

.rutube-video-checkbox-container input {
    transform: scale(1.4);
}

.rutube-video-thumbnail {
    flex: 0 0 120px;
    margin-left: 15px;
}

.rutube-video-thumbnail img {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

.rutube-video-info {
    flex: 1;
    margin-left: 15px;
}

.rutube-video-title {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 0px;
    color: #1f2937;
    line-height: 1.4;
    padding-left: 5px;
}

.rutube-video-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6b7280;
}

.rutube-video-format-selector {
    /* flex: 0 0 250px; */
    margin-right: 0px;
}

.rutube-video-format-select {
    #width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 14px;
    background: #1f2937;
    transition: border-color 0.3s ease;
    color: #f3f4f6;
}

.rutube-video-format-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.rutube-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 */
.rutube-download-success {
    padding: 24px 32px;
    background: #111827;
    border: 1px solid #3b82f6;
    border-radius: 5px;
    margin: 20px 32px;
    text-align: center;
}

.rutube-download-error {
    padding: 24px 32px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    margin: 20px 32px;
    text-align: center;
}

/* Empty State */
.rutube-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; }
}

.rutube-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) {
    .rutube-aio-video-downloader-container {
        margin: 20px 16px;
        border-radius: 12px;
    }
    
    .rutube-aio-header {
        padding: 24px 20px 16px;
    }
    
    .rutube-aio-header h3 {
        font-size: 24px;
    }
    
    .rutube-supported-features {
        gap: 8px;
    }
    
    .rutube-supported-features span {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .rutube-url-input-section {
        padding: 24px 20px;
    }
    
    .rutube-url-input-group {
        flex-direction: column;
    }
    
    .rutube-format-tabs {
        padding: 16px 20px;
        gap: 6px;
    }
    
    .rutube-format-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .rutube-format-section {
        padding: 20px;
    }
    
    .rutube-format-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .rutube-playlist-video-item {
        flex-wrap: wrap;
    }
    
    .rutube-video-format-selector {
        flex: 1 0 100%;
        margin-top: 10px;
    }
    
    .rutube-playlist-controls {
        flex-direction: column;
    }
    
    .rutube-video-title-section,
    #selected-download-container,
    .rutube-playlist-stats,
    .rutube-playlist-download-section {
        padding: 20px;
    }
    
    .rutube-shorts-notice,
    .rutube-download-success,
    .rutube-download-error {
        margin: 16px 20px;
    }
}

@media (max-width: 480px) {
    .rutube-format-tabs {
        flex-wrap: wrap;
    }
    
    .rutube-format-tab {
        flex: 1;
        min-width: calc(50% - 4px);
        justify-content: center;
    }
    
    .rutube-playlist-video-item {
        flex-direction: column;
        text-align: center;
    }
    
    .rutube-video-checkbox-container {
        order: -1;
    }
}
.rutube-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)
   ========================================================================== */

.rutube-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;
}

.rutube-download-archive-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(16, 185, 129, 0.3);
}
/* ÃÅ¾Ã‘ÂÃÂ½ÃÂ¾ÃÂ²ÃÂ½ÃÂ¾ÃÂ¹ ÃÂºÃÂ¾ÃÂ½Ã‘â€šÃÂµÃÂ¹ÃÂ½ÃÂµÃ‘â‚¬ */
.rutube-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 */
.rutube-url-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.rutube-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;
}

.rutube-url-input-group input[type="url"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.rutube-url-input-group input[type="url"]::placeholder {
    color: #9ca3af;
}

/* ÃÅ¾ÃÂ±Ã‘â€°ÃÂ¸ÃÂµ Ã‘ÂÃ‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂºÃÂ½ÃÂ¾ÃÂ¿ÃÂ¾ÃÂº */
.rutube-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;
}

.rutube-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.rutube-btn-blue {
    background-color: #3b82f6;
}

.rutube-btn-blue:hover {
    background-color: #2563eb;
}

.rutube-btn-yellow {
    background-color: #fbbf24;
    color: #1f2937;
}

.rutube-btn-yellow:hover {
    background-color: #f59e0b;
}

.rutube-btn-purple {
    background-color: #8b5cf6;
}

.rutube-btn-purple:hover {
    background-color: #7c3aed;
}

.rutube-btn-success {
    background-color: #10b981;
}

.rutube-btn-success:hover {
    background-color: #059669;
}

/* ÃÅ¾ÃÂ¿Ã‘â€ ÃÂ¸ÃÂ¸ Ã‘â€žÃÂ¾Ã‘â‚¬ÃÂ¼ÃÂ°Ã‘â€šÃÂ¾ÃÂ² */
.rutube-format-options {
    border: 2px dashed #93c5fd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    background-color: #111827;
}

/* ÃÂ¡ÃÂµÃ‘â€šÃÂºÃÂ° Ã‘â€žÃÂ¾Ã‘â‚¬ÃÂ¼ÃÂ°Ã‘â€šÃÂ¾ÃÂ² */
.rutube-format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

/* ÃÅ¡ÃÂ½ÃÂ¾ÃÂ¿ÃÂºÃÂ¸ Ã‘â€žÃÂ¾Ã‘â‚¬ÃÂ¼ÃÂ°Ã‘â€šÃÂ¾ÃÂ² ÃÂ² Ã‘ÂÃÂµÃ‘â€šÃÂºÃÂµ */
.rutube-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;
}

.rutube-format-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* ÃÂ¡Ã‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂ²Ã‘â€¹ÃÂ±ÃÂ¸Ã‘â‚¬ÃÂ°ÃÂµÃÂ¼Ã‘â€¹Ã‘â€¦ ÃÂºÃÂ½ÃÂ¾ÃÂ¿ÃÂ¾ÃÂº */
.rutube-format-button.rutube-selectable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.rutube-format-button.rutube-selectable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rutube-format-button.rutube-selectable.rutube-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);
}

/* ÃÂ¦ÃÂ²ÃÂµÃ‘â€šÃÂ° ÃÂ´ÃÂ»Ã‘Â Ã‘â‚¬ÃÂ°ÃÂ·ÃÂ½Ã‘â€¹Ã‘â€¦ Ã‘â€šÃÂ¸ÃÂ¿ÃÂ¾ÃÂ² Ã‘â€žÃÂ¾Ã‘â‚¬ÃÂ¼ÃÂ°Ã‘â€šÃÂ¾ÃÂ² */
.rutube-format-button.rutube-with-audio {
    background-color: #3b82f6 !important;
    color: white !important;
}

.rutube-format-button.rutube-with-audio:hover {
    background-color: #2563eb !important;
}

.rutube-format-button.rutube-without-audio {
    background-color: #ef4444 !important;
    color: white !important;
}

.rutube-format-button.rutube-without-audio:hover {
    background-color: #dc2626 !important;
}

.rutube-format-button.rutube-audio {
    background-color: #8b5cf6 !important;
    color: white !important;
}

.rutube-format-button.rutube-audio:hover {
    background-color: #7c3aed !important;
}

.rutube-format-button.rutube-thumbnail {
    background-color: #fbbf24 !important;
    color: #1f2937 !important;
}

.rutube-format-button.rutube-thumbnail:hover {
    background-color: #f59e0b !important;
}

/* Ãâ€”ÃÂ°ÃÂ³ÃÂ¾ÃÂ»ÃÂ¾ÃÂ²ÃÂ¾ÃÂº ÃÂ²ÃÂ¸ÃÂ´ÃÂµÃÂ¾ */
#aio-rutube-video-title {
    margin: 24px 0 16px;
    text-align: center;
    font-weight: 600;
    font-size: 20px;
    color: #1f2937;
}

/* ÃÅ¡ÃÂ¾ÃÂ½Ã‘â€šÃÂµÃÂ¹ÃÂ½ÃÂµÃ‘â‚¬ ÃÂ´ÃÂ»Ã‘Â Ã‘ÂÃÂºÃÂ°Ã‘â€¡ÃÂ¸ÃÂ²ÃÂ°ÃÂ½ÃÂ¸Ã‘Â ÃÂ²Ã‘â€¹ÃÂ±Ã‘â‚¬ÃÂ°ÃÂ½ÃÂ½ÃÂ¾ÃÂ³ÃÂ¾ */
#rutube-selected-download-container {
    padding: 20px 32px;
    text-align: center;
    display: none;
    /* background: #52565b; */
    /* border: 2px solid #10b981; */
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
    display: block;
}

#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-rutube-progress-bar {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.rutube-progress-label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.rutube-progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.rutube-progress-fill {
    height: 100%;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.rutube-progress-percentage {
    text-align: right;
    font-size: 14px;
    color: #6c757d;
}

/* ÃÂ¡Ã‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂºÃÂ½ÃÂ¾ÃÂ¿ÃÂºÃÂ¸ Ã‘Æ’Ã‘ÂÃÂ¿ÃÂµÃ‘Ë†ÃÂ½ÃÂ¾ÃÂ³ÃÂ¾ Ã‘ÂÃÂºÃÂ°Ã‘â€¡ÃÂ¸ÃÂ²ÃÂ°ÃÂ½ÃÂ¸Ã‘Â */
.rutube-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;
}

.rutube-download-success-btn:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    color: white;
}

/* ÃÂ¡Ã‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂºÃÂ¾ÃÂ½Ã‘â€šÃÂµÃÂ¹ÃÂ½ÃÂµÃ‘â‚¬ÃÂ° Ã‘â‚¬ÃÂµÃÂ·Ã‘Æ’ÃÂ»Ã‘Å’Ã‘â€šÃÂ°Ã‘â€šÃÂ° Ã‘ÂÃÂºÃÂ°Ã‘â€¡ÃÂ¸ÃÂ²ÃÂ°ÃÂ½ÃÂ¸Ã‘Â */
.rutube-download-result-container {
    background: #ecfdf5;
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

/* ÃÂÃÂ½ÃÂ¸ÃÂ¼ÃÂ°Ã‘â€ ÃÂ¸ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂ¿ÃÂ»ÃÂ°ÃÂ²ÃÂ½Ã‘â€¹Ã‘â€¦ ÃÂ¿ÃÂµÃ‘â‚¬ÃÂµÃ‘â€¦ÃÂ¾ÃÂ´ÃÂ¾ÃÂ² */
#rutube-selected-download-container,
#aio-rutube-progress-bar,
.rutube-download-result-container {
    transition: all 0.3s ease-in-out;
}

/* ÃÂ£ÃÂ±ÃÂµÃÂ´ÃÂ¸ÃÂ¼Ã‘ÂÃ‘Â, Ã‘â€¡Ã‘â€šÃÂ¾ ÃÂ¿Ã‘â‚¬ÃÂ¾ÃÂ³Ã‘â‚¬ÃÂµÃ‘ÂÃ‘Â ÃÂ±ÃÂ°Ã‘â‚¬ ÃÂ¸ÃÂ¼ÃÂµÃÂµÃ‘â€š ÃÂ¿Ã‘â‚¬ÃÂ°ÃÂ²ÃÂ¸ÃÂ»Ã‘Å’ÃÂ½Ã‘â€¹ÃÂµ ÃÂ¾Ã‘â€šÃ‘ÂÃ‘â€šÃ‘Æ’ÃÂ¿Ã‘â€¹ */
#aio-rutube-progress-bar {
    margin: 20px 0;
}

/* ÃÂ¡Ã‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂ¸ÃÂºÃÂ¾ÃÂ½ÃÂ¾ÃÂº Font Awesome */
.rutube-fas, .rutube-fa {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
}

/* ÃÂ£ÃÂ±ÃÂµÃÂ´ÃÂ¸ÃÂ¼Ã‘ÂÃ‘Â, Ã‘â€¡Ã‘â€šÃÂ¾ Font Awesome ÃÂ·ÃÂ°ÃÂ³Ã‘â‚¬Ã‘Æ’ÃÂ¶ÃÂ°ÃÂµÃ‘â€šÃ‘ÂÃ‘Â ÃÂ¿Ã‘â‚¬ÃÂ°ÃÂ²ÃÂ¸ÃÂ»Ã‘Å’ÃÂ½ÃÂ¾ */
@import url('https://cdnjs.rutube-cloudflare.rutube-com/ajax/libs/font-awesome/6.rutube-6.rutube-0/css/all.rutube-min.rutube-css');

/* Ãâ€ÃÂ¾ÃÂ¿ÃÂ¾ÃÂ»ÃÂ½ÃÂ¸Ã‘â€šÃÂµÃÂ»Ã‘Å’ÃÂ½Ã‘â€¹ÃÂµ Ã‘ÂÃ‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂºÃÂ½ÃÂ¾ÃÂ¿ÃÂ¾ÃÂº Ã‘Â ÃÂ¸ÃÂºÃÂ¾ÃÂ½ÃÂºÃÂ°ÃÂ¼ÃÂ¸ */
.rutube-btn i, .rutube-format-button i {
    margin-right: 8px;
    font-size: 14px;
}

/* ÃÂ£ÃÂ»Ã‘Æ’Ã‘â€¡Ã‘Ë†ÃÂµÃÂ½ÃÂ½Ã‘â€¹ÃÂµ Ã‘ÂÃ‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂºÃÂ½ÃÂ¾ÃÂ¿ÃÂ¾ÃÂº Ã‘â€žÃÂ¾Ã‘â‚¬ÃÂ¼ÃÂ°Ã‘â€šÃÂ¾ÃÂ² */
.rutube-format-button {
    position: relative;
    overflow: hidden;
}

.rutube-format-button:active {
    transform: scale(0.98);
}

/* ÃÂÃÂ½ÃÂ¸ÃÂ¼ÃÂ°Ã‘â€ ÃÂ¸Ã‘Â ÃÂ´ÃÂ»Ã‘Â ÃÂ¿Ã‘â‚¬ÃÂ¾ÃÂ³Ã‘â‚¬ÃÂµÃ‘ÂÃ‘Â-ÃÂ±ÃÂ°Ã‘â‚¬ÃÂ° */
.rutube-progress-fill {
    transition: width 0.5s ease-in-out;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* ÃÂ¡Ã‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â Ã‘ÂÃÂ¾Ã‘ÂÃ‘â€šÃÂ¾Ã‘ÂÃÂ½ÃÂ¸Ã‘Â ÃÂ·ÃÂ°ÃÂ³Ã‘â‚¬Ã‘Æ’ÃÂ·ÃÂºÃÂ¸ */
.rutube-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ÃÂ¡Ã‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â Ã‘ÂÃÂ¿ÃÂ¸Ã‘ÂÃÂºÃÂ° ÃÂ²ÃÂ¸ÃÂ´ÃÂµÃÂ¾ ÃÂ¸ÃÂ· ÃÂ¿ÃÂ»ÃÂµÃÂ¹ÃÂ»ÃÂ¸Ã‘ÂÃ‘â€šÃÂ° */
#aio-rutube-playlist-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rutube-playlist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.rutube-playlist-checkbox {
    margin: 0;
}

/* Responsive Ã‘ÂÃ‘â€šÃÂ¸ÃÂ»ÃÂ¸ */
@media (max-width: 1024px) {
    .rutube-format-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .rutube-format-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rutube-url-input-group {
        flex-direction: column;
    }

    #aio-rutube-format-buttons {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 600px) {
    .rutube-aio-video-downloader-container {
        padding: 16px;
    }

    .rutube-format-grid {
        grid-template-columns: 1fr;
    }

    .rutube-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Dark mode ÃÂ¿ÃÂ¾ÃÂ´ÃÂ´ÃÂµÃ‘â‚¬ÃÂ¶ÃÂºÃÂ° */
@media (prefers-color-scheme: dark) {
    .rutube-aio-video-downloader-container {
        background-color: #1f2937;
        color: #f3f4f6;
        border-color: #374151;
    }

    .rutube-url-input-group input[type="url"] {
        background-color: #374151;
        border-color: #4b5563;
        color: #f3f4f6;
    }

    .rutube-url-input-group input[type="url"]::placeholder {
        color: #9ca3af;
    }

    .rutube-format-options {
        background-color: #111827;
        border-color: #3b82f6;
    }

    .rutube-progress-bar {
        background-color: #374151;
    }
}

/* ÃÂ¡Ã‘â€šÃÂ¸ÃÂ»ÃÂ¸ ÃÂ´ÃÂ»Ã‘Â ÃÂ¿ÃÂ»ÃÂµÃÂ¹ÃÂ»ÃÂ¸Ã‘ÂÃ‘â€šÃÂ¾ÃÂ² */
.rutube-playlist-container {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.rutube-playlist-videos {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: white;
    padding: 10px;
}

.rutube-playlist-video-item {
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    /* align-items: center; */
    justify-content: space-between;
}

.rutube-playlist-video-item:last-child {
    border-bottom: none;
}

.rutube-playlist-video-item label {
    display: flex;
    align-items: center;
    flex-grow: 1;
    margin: 0;
    cursor: pointer;
}

.rutube-playlist-video-checkbox {
    margin-right: 10px;
}

.rutube-video-title {
    flex-grow: 1;
    /* font-weight: 500; */
}

.rutube-video-duration {
    background: #6c757d;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 10px;
}

.rutube-playlist-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.rutube-playlist-info {
    background: #e7f3ff;
    padding: 10px;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.rutube-playlist-info p {
    margin: 0;
    color: #0056b3;
    font-size: 0.9em;
}

.rutube-playlist-errors {
    margin-top: 15px;
    padding: 10px;
    background: #fee;
    border-radius: 5px;
    border-left: 4px solid #dc2626;
}

.rutube-playlist-errors h5 {
    color: #dc2626;
    margin-bottom: 5px;
}

.rutube-playlist-errors ul {
    margin: 0;
    padding-left: 20px;
}

/* ÃÂÃÂ´ÃÂ°ÃÂ¿Ã‘â€šÃÂ¸ÃÂ²ÃÂ½ÃÂ¾Ã‘ÂÃ‘â€šÃ‘Å’ ÃÂ´ÃÂ»Ã‘Â ÃÂ¼ÃÂ¾ÃÂ±ÃÂ¸ÃÂ»Ã‘Å’ÃÂ½Ã‘â€¹Ã‘â€¦ Ã‘Æ’Ã‘ÂÃ‘â€šÃ‘â‚¬ÃÂ¾ÃÂ¹Ã‘ÂÃ‘â€šÃÂ² */
@media (max-width: 768px) {
    .rutube-playlist-actions {
        flex-direction: column;
    }
    
    .rutube-playlist-video-item {
        flex-direction: column;
        align-items: center;
    }
    
    .rutube-video-duration {
        margin-left: 0;
        margin-top: 5px;
    }
}