/* ============================================
   ИСПРАВЛЕНИЯ ДЛЯ ТЕМНОЙ ТЕМЫ И ЭЛЕМЕНТОВ
   Обновленная версия с поддержкой всех сервисов
   ============================================ */

/* 1. ИСПРАВЛЕНИЕ ВИДИМОСТИ КОММЕНТАРИЕВ В ТЕМНОМ РЕЖИМЕ */
[data-bs-theme="dark"] .comment-block.bg-light,
[data-theme="dark"] .comment-block.bg-light,
html[data-theme="dark"] .bg-light {
    background-color: #2d3748 !important;
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .comment-block.bg-light *,
[data-theme="dark"] .comment-block.bg-light *,
html[data-theme="dark"] .bg-light * {
    color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .comment-block.bg-light a,
[data-theme="dark"] .comment-block.bg-light a,
html[data-theme="dark"] .bg-light a {
    color: #63b3ed !important;
}

[data-bs-theme="dark"] .comment-block.bg-light a:hover,
[data-theme="dark"] .comment-block.bg-light a:hover,
html[data-theme="dark"] .bg-light a:hover {
    color: #4299e1 !important;
}


/* 2. КОМПАКТНЫЕ КНОПКИ СКАЧИВАНИЯ С ИКОНКАМИ */
.btn-download {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    border-radius: 0.5rem !important;
    position: relative !important;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Иконки для кнопок скачивания через псевдоэлемент */
.btn-download::before {
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "FontAwesome";
    font-weight: 900;
    font-size: 1.1rem;
    display: inline-block;
    margin-right: 0.25rem;
}

/* === ИКОНКИ ДЛЯ КАЖДОГО СЕРВИСА === */

/* File-Mix кнопка - архив */
.btn-filemix::before {
    content: "\f1c6"; /* fa-file-archive-o */
}

/* ModsFire кнопка - огонь/молния */
.btn-modsfire::before {
    content: "\f0e7"; /* fa-bolt / lightning */
}

/* UP-4ever кнопка - облако с загрузкой вверх */
.btn-up4ever::before {
    content: "\f0ee"; /* fa-cloud-upload */
}

/* File-Upload кнопка - загрузка */
.btn-fileupload::before {
    content: "\f093"; /* fa-upload */
}

/* Mega4up кнопка - облако со стрелкой вниз */
.btn-mega4up::before {
    content: "\f0ed"; /* fa-cloud-download */
}

/* DLUpload кнопка - стрелка вниз к линии */
.btn-dlupload::before {
    content: "\f019"; /* fa-download */
}

/* Magnet ссылка - магнит */
.btn-magnet::before {
    content: "\f076"; /* fa-magnet */
}


/* === АЛЬТЕРНАТИВНЫЕ ИКОНКИ (UNICODE) === */
/* Используйте класс .no-fa если Font Awesome не загружен */

.btn-filemix.no-fa::before {
    content: "📦 ";
    font-family: inherit;
    font-weight: normal;
}

.btn-modsfire.no-fa::before {
    content: "⚡ ";
    font-family: inherit;
    font-weight: normal;
}

.btn-up4ever.no-fa::before {
    content: "☁️ ";
    font-family: inherit;
    font-weight: normal;
}

.btn-fileupload.no-fa::before {
    content: "📤 ";
    font-family: inherit;
    font-weight: normal;
}

.btn-mega4up.no-fa::before {
    content: "🔽 ";
    font-family: inherit;
    font-weight: normal;
}

.btn-dlupload.no-fa::before {
    content: "⬇️ ";
    font-family: inherit;
    font-weight: normal;
}

.btn-magnet.no-fa::before {
    content: "🧲 ";
    font-family: inherit;
    font-weight: normal;
}


/* 3. ИСПРАВЛЕНИЕ СПОЙЛЕРОВ (BORDER-RADIUS) */
.spoiler-wrap {
    border-radius: 0.75rem !important;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.spoiler-head {
    border-radius: 0.75rem !important;
    transition: border-radius 0.3s ease;
    cursor: pointer;
    padding: 1rem;
    background-color: #f8f9fa;
}

.spoiler-wrap.active .spoiler-head {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.spoiler-body {
    border-bottom-left-radius: 0.75rem !important;
    border-bottom-right-radius: 0.75rem !important;
    padding: 1rem;
}

/* Темная тема для спойлеров */
[data-theme="dark"] .spoiler-head,
html[data-theme="dark"] .spoiler-head {
    background-color: #374151;
    color: #e2e8f0;
}

[data-theme="dark"] .spoiler-body,
html[data-theme="dark"] .spoiler-body {
    background-color: #2d3748;
    color: #e2e8f0;
}

/* Bootstrap Accordion (если используется) */
.accordion-item {
    border-radius: 0.5rem !important;
    overflow: hidden;
    margin-bottom: 1rem;
}

.accordion-button {
    border-radius: 0.5rem !important;
}

.accordion-button:not(.collapsed) {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.accordion-collapse {
    border-bottom-left-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
}

.accordion-body {
    border-bottom-left-radius: 0.5rem !important;
    border-bottom-right-radius: 0.5rem !important;
}

/* Темная тема для accordion */
[data-theme="dark"] .accordion-item,
html[data-theme="dark"] .accordion-item {
    background-color: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .accordion-button,
html[data-theme="dark"] .accordion-button {
    background-color: #374151;
    color: #e2e8f0;
}

[data-theme="dark"] .accordion-button:not(.collapsed),
html[data-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #4a5568;
    color: #fff;
}

[data-theme="dark"] .accordion-body,
html[data-theme="dark"] .accordion-body {
    background-color: #2d3748;
    color: #e2e8f0;
}


/* 4. ДОПОЛНИТЕЛЬНЫЕ УЛУЧШЕНИЯ ДЛЯ КНОПОК */

/* Размер для маленьких тегов внутри кнопок */
.btn-download small {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Убираем старую иконку fa-download если она есть */
.btn-download .fa-download {
    display: none !important;
}

/* Убираем старую иконку fa-floppy-o если она есть */
.btn-download .fa-floppy-o {
    display: none !important;
}

/* Группы кнопок */
.btn-group.btn-block {
    width: 100%;
}

.btn-group.btn-block .btn-download {
    width: 100%;
    text-align: center;
}


/* 5. АДАПТИВНОСТЬ */

/* Мобильные устройства */
@media (max-width: 768px) {
    .btn-download {
        width: 100%;
        margin-bottom: 0.5rem;
        justify-content: center;
        font-size: 0.9rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .btn-download::before {
        font-size: 1rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .btn-download {
        font-size: 0.85rem !important;
        padding: 0.7rem 0.8rem !important;
    }
    
    .btn-download b {
        font-size: 0.9rem !important;
    }
    
    .btn-download small {
        font-size: 0.7rem !important;
    }
}


/* 6. СПЕЦИФИЧНЫЕ ЦВЕТА ДЛЯ КНОПОК (опционально) */

/* Можно раскомментировать, если хотите разные цвета для разных сервисов */
/*
.btn-filemix {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

.btn-modsfire {
    background-color: #fd7e14 !important;
    border-color: #fd7e14 !important;
}

.btn-up4ever {
    background-color: #20c997 !important;
    border-color: #20c997 !important;
}

.btn-fileupload {
    background-color: #17a2b8 !important;
    border-color: #17a2b8 !important;
}

.btn-mega4up {
    background-color: #6610f2 !important;
    border-color: #6610f2 !important;
}

.btn-dlupload {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.btn-magnet {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}
*/


/* 7. АНИМАЦИЯ HOVER ДЛЯ ИКОНОК */
.btn-download::before {
    transition: transform 0.3s ease;
}

.btn-download:hover::before {
    transform: scale(1.2);
}


/* 8. СОСТОЯНИЕ FOCUS ДЛЯ ДОСТУПНОСТИ */
.btn-download:focus {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

[data-theme="dark"] .btn-download:focus,
html[data-theme="dark"] .btn-download:focus {
    outline-color: #63b3ed;
}
