/* Enhanced Dark Theme Fixes for TopBid */
/* Дополнительные исправления для проблем с видимостью текста */

/* Исправления для карточек отзывов - делаем текст темным для лучшей читаемости */
:root[data-theme="dark"] .reviews-section .card {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
}

:root[data-theme="dark"] .reviews-section .card-text,
:root[data-theme="dark"] .reviews-section .card p,
:root[data-theme="dark"] .reviews-section .card h6 {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .reviews-section .text-muted {
    color: #8b949e !important;
}

:root[data-theme="dark"] .reviews-section .lead.text-muted {
    color: #f0f6fc !important;
}

/* Исправления для Telegram блока */
:root[data-theme="dark"] section[style*="background-color: #0088cc"] {
    background-color: #0d4f8c !important;
}

:root[data-theme="dark"] .telegram-section {
    background: linear-gradient(135deg, #0d4f8c 0%, #0a3d6d 100%) !important;
}

:root[data-theme="dark"] .telegram-section h2,
:root[data-theme="dark"] .telegram-section p,
:root[data-theme="dark"] .telegram-section .telegram-message {
    color: #ffffff !important;
}

:root[data-theme="dark"] .telegram-section .telegram-icon {
    color: #0088cc !important;
    background-color: #ffffff !important;
}

/* Улучшение контраста для звезд рейтинга */
:root[data-theme="dark"] .text-warning {
    color: #fbbf24 !important;
}

:root[data-theme="dark"] .rating-stars .fas,
:root[data-theme="dark"] .rating-stars .far {
    color: #fbbf24 !important;
}

/* Исправления для форм и полей ввода */
:root[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25) !important;
}

:root[data-theme="dark"] .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25) !important;
}

/* Улучшение видимости для кнопок */
:root[data-theme="dark"] .btn-outline-light {
    border-color: #58a6ff !important;
    color: #58a6ff !important;
}

:root[data-theme="dark"] .btn-outline-light:hover {
    background-color: #58a6ff !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .btn-light {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .btn-light:hover {
    background-color: #21262d !important;
    border-color: #30363d !important;
    color: #ffffff !important;
}

/* Исправления для навигационных элементов */
:root[data-theme="dark"] .navbar-brand {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .navbar-nav .nav-link {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .navbar-nav .nav-link:hover {
    color: #58a6ff !important;
}

:root[data-theme="dark"] .navbar-nav .nav-link.active {
    color: #58a6ff !important;
}

/* Улучшение для таблиц */
:root[data-theme="dark"] .table {
    background-color: #1a1d20 !important;
}

:root[data-theme="dark"] .table th {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
}

:root[data-theme="dark"] .table td {
    color: #f0f6fc !important;
    border-color: #30363d !important;
}

/* Исправления для модальных окон */
:root[data-theme="dark"] .modal-header {
    background-color: #21262d !important;
    border-bottom-color: #30363d !important;
}

:root[data-theme="dark"] .modal-footer {
    background-color: #21262d !important;
    border-top-color: #30363d !important;
}

:root[data-theme="dark"] .modal-title {
    color: #f0f6fc !important;
}

/* Улучшение для выпадающих меню */
:root[data-theme="dark"] .dropdown-menu {
    background-color: #1a1d20 !important;
    border: 1px solid #30363d !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .dropdown-item {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .dropdown-item:hover {
    background-color: #21262d !important;
    color: #ffffff !important;
}

/* Исправления для пагинации */
:root[data-theme="dark"] .pagination .page-link {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .pagination .page-link:hover {
    background-color: #21262d !important;
    border-color: #30363d !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #58a6ff !important;
    border-color: #58a6ff !important;
    color: #ffffff !important;
}

/* Улучшение для хлебных крошек */
:root[data-theme="dark"] .breadcrumb {
    background-color: #1a1d20 !important;
}

:root[data-theme="dark"] .breadcrumb-item {
    color: #8b949e !important;
}

:root[data-theme="dark"] .breadcrumb-item.active {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .breadcrumb-item a {
    color: #58a6ff !important;
}

:root[data-theme="dark"] .breadcrumb-item a:hover {
    color: #79c0ff !important;
}

/* Исправления для списков */
:root[data-theme="dark"] .list-group {
    background-color: #1a1d20 !important;
}

:root[data-theme="dark"] .list-group-item {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .list-group-item:hover {
    background-color: #21262d !important;
}

/* Улучшение для прогресс-баров */
:root[data-theme="dark"] .progress {
    background-color: #30363d !important;
}

:root[data-theme="dark"] .progress-bar {
    background-color: #58a6ff !important;
}

/* Исправления для разделителей */
:root[data-theme="dark"] hr {
    border-color: #30363d !important;
}

:root[data-theme="dark"] .divider {
    border-color: #30363d !important;
}

/* Улучшение для бейджей */
:root[data-theme="dark"] .badge {
    background-color: #58a6ff !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .badge-secondary {
    background-color: #6e7681 !important;
    color: #f0f6fc !important;
}

/* Исправления для аккордеонов */
:root[data-theme="dark"] .accordion-button {
    background-color: #1a1d20 !important;
    color: #f0f6fc !important;
    border-color: #30363d !important;
}

:root[data-theme="dark"] .accordion-button:hover {
    background-color: #21262d !important;
}

:root[data-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #21262d !important;
    color: #58a6ff !important;
}

:root[data-theme="dark"] .accordion-item {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
}

:root[data-theme="dark"] .accordion-collapse {
    background-color: #1a1d20 !important;
}

/* Улучшение для вкладок */
:root[data-theme="dark"] .nav-tabs {
    border-color: #30363d !important;
}

:root[data-theme="dark"] .nav-tabs .nav-link {
    color: #f0f6fc !important;
    border-color: transparent !important;
}

:root[data-theme="dark"] .nav-tabs .nav-link:hover {
    color: #58a6ff !important;
    border-color: #30363d #30363d transparent !important;
}

:root[data-theme="dark"] .nav-tabs .nav-link.active {
    color: #58a6ff !important;
    background-color: #1a1d20 !important;
    border-color: #30363d #30363d transparent !important;
}

:root[data-theme="dark"] .tab-content {
    background-color: #1a1d20 !important;
    border: 1px solid #30363d !important;
    border-top: none !important;
}

/* Улучшение для алертов */
:root[data-theme="dark"] .alert {
    border: none !important;
}

:root[data-theme="dark"] .alert-success {
    background-color: rgba(46, 160, 67, 0.15) !important;
    color: #2ea043 !important;
}

:root[data-theme="dark"] .alert-danger {
    background-color: rgba(248, 81, 73, 0.15) !important;
    color: #f85149 !important;
}

:root[data-theme="dark"] .alert-warning {
    background-color: rgba(187, 128, 9, 0.15) !important;
    color: #bb8009 !important;
}

:root[data-theme="dark"] .alert-info {
    background-color: rgba(88, 166, 255, 0.15) !important;
    color: #58a6ff !important;
}

/* Улучшение для футера */
:root[data-theme="dark"] footer {
    background-color: #0d1117 !important;
    border-top: 1px solid #30363d !important;
}

:root[data-theme="dark"] footer h5,
:root[data-theme="dark"] footer h6 {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] footer p,
:root[data-theme="dark"] footer li {
    color: #8b949e !important;
}

:root[data-theme="dark"] footer a {
    color: #58a6ff !important;
}

:root[data-theme="dark"] footer a:hover {
    color: #79c0ff !important;
}

/* Улучшение для главного баннера */
:root[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #0d1117 0%, #1a1d20 100%) !important;
}

:root[data-theme="dark"] .hero-section h1,
:root[data-theme="dark"] .hero-section h2,
:root[data-theme="dark"] .hero-section h3 {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .hero-section p,
:root[data-theme="dark"] .hero-section .lead {
    color: #f0f6fc !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .hero-section .btn {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Улучшение для карточек категорий */
:root[data-theme="dark"] .category-card {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
    transition: all 0.3s ease !important;
}

:root[data-theme="dark"] .category-card:hover {
    background-color: #21262d !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

:root[data-theme="dark"] .category-card h5,
:root[data-theme="dark"] .category-card h6 {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .category-card p {
    color: #8b949e !important;
}

/* Улучшение для карточек аукционов */
:root[data-theme="dark"] .auction-card {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
    transition: all 0.3s ease !important;
}

:root[data-theme="dark"] .auction-card:hover {
    background-color: #21262d !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

:root[data-theme="dark"] .auction-card h5,
:root[data-theme="dark"] .auction-card h6 {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .auction-card p {
    color: #8b949e !important;
}

:root[data-theme="dark"] .auction-card .price {
    color: #58a6ff !important;
    font-weight: bold !important;
}

:root[data-theme="dark"] .auction-card .badge {
    background-color: #58a6ff !important;
    color: #ffffff !important;
}

/* Улучшение для форм поиска */
:root[data-theme="dark"] .search-form {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
}

:root[data-theme="dark"] .search-form .form-control {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .search-form .form-control::placeholder {
    color: #6e7681 !important;
}

:root[data-theme="dark"] .search-form .btn {
    background-color: #58a6ff !important;
    border-color: #58a6ff !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .search-form .btn:hover {
    background-color: #4c8fca !important;
    border-color: #4c8fca !important;
}

/* Улучшение для фильтров */
:root[data-theme="dark"] .filter-section {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
}

:root[data-theme="dark"] .filter-section h5,
:root[data-theme="dark"] .filter-section h6 {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .filter-section .form-label {
    color: #f0f6fc !important;
}

:root[data-theme="dark"] .filter-section .form-check-label {
    color: #f0f6fc !important;
}

/* Улучшение для статистики */
:root[data-theme="dark"] .stats-card {
    background-color: #1a1d20 !important;
    border-color: #30363d !important;
}

:root[data-theme="dark"] .stats-card h3,
:root[data-theme="dark"] .stats-card h4 {
    color: #58a6ff !important;
}

:root[data-theme="dark"] .stats-card p {
    color: #8b949e !important;
}

/* Улучшение для иконок */
:root[data-theme="dark"] .icon-wrapper {
    background-color: #21262d !important;
    color: #58a6ff !important;
}

:root[data-theme="dark"] .social-links a {
    color: #8b949e !important;
}

:root[data-theme="dark"] .social-links a:hover {
    color: #58a6ff !important;
}

/* Улучшение для времени обратного отсчета */
:root[data-theme="dark"] .countdown {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border: 1px solid #30363d !important;
}

:root[data-theme="dark"] .countdown .countdown-number {
    color: #58a6ff !important;
}

:root[data-theme="dark"] .countdown .countdown-label {
    color: #8b949e !important;
}

/* Улучшение для сообщений об ошибках */
:root[data-theme="dark"] .error-message {
    background-color: rgba(248, 81, 73, 0.15) !important;
    color: #f85149 !important;
    border: 1px solid rgba(248, 81, 73, 0.3) !important;
}

:root[data-theme="dark"] .success-message {
    background-color: rgba(46, 160, 67, 0.15) !important;
    color: #2ea043 !important;
    border: 1px solid rgba(46, 160, 67, 0.3) !important;
}

:root[data-theme="dark"] .warning-message {
    background-color: rgba(187, 128, 9, 0.15) !important;
    color: #bb8009 !important;
    border: 1px solid rgba(187, 128, 9, 0.3) !important;
}

:root[data-theme="dark"] .info-message {
    background-color: rgba(88, 166, 255, 0.15) !important;
    color: #58a6ff !important;
    border: 1px solid rgba(88, 166, 255, 0.3) !important;
}

/* Улучшение для загрузки */
:root[data-theme="dark"] .loading-spinner {
    border-color: #30363d !important;
    border-top-color: #58a6ff !important;
}

:root[data-theme="dark"] .skeleton {
    background-color: #21262d !important;
    background-image: linear-gradient(90deg, #21262d 0px, #30363d 40px, #21262d 80px) !important;
}

/* Улучшение для тултипов */
:root[data-theme="dark"] .tooltip {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border: 1px solid #30363d !important;
}

:root[data-theme="dark"] .tooltip .tooltip-arrow {
    border-color: #30363d !important;
}

/* Улучшение для popover */
:root[data-theme="dark"] .popover {
    background-color: #1a1d20 !important;
    border: 1px solid #30363d !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

:root[data-theme="dark"] .popover .popover-header {
    background-color: #21262d !important;
    color: #f0f6fc !important;
    border-bottom-color: #30363d !important;
}

:root[data-theme="dark"] .popover .popover-body {
    color: #f0f6fc !important;
}

/* Улучшение для карусели */
:root[data-theme="dark"] .carousel {
    background-color: #1a1d20 !important;
}

:root[data-theme="dark"] .carousel-item {
    background-color: #1a1d20 !important;
}

:root[data-theme="dark"] .carousel-control-prev-icon,
:root[data-theme="dark"] .carousel-control-next-icon {
    filter: invert(1) !important;
}

:root[data-theme="dark"] .carousel-indicators li {
    background-color: #6e7681 !important;
}

:root[data-theme="dark"] .carousel-indicators li.active {
    background-color: #58a6ff !important;
}
