/**
 * FC Saturn - Dark Theme Stylesheet
 * Brand colors: Blue (#0077be / #0088dd), Deep Dark (#0f1117 / #161922), Text (#f0f3f8 / #9ca3af)
 */

/* ============================================================
   1. Theme Switcher Component
   ============================================================ */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    border: 1px solid #e9ecf1;
    background-color: #f5f6f8;
    color: #6b6d74;
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    outline: none;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.theme-toggle-btn:hover {
    border-color: #0077be;
    color: #0077be;
    transform: scale(1.08);
}

.theme-toggle-btn .theme-icon {
    width: 17px;
    height: 17px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Light mode state: show moon, hide sun */
html:not([data-theme="dark"]) .theme-icon--sun {
    display: none !important;
}
html:not([data-theme="dark"]) .theme-icon--moon {
    display: block !important;
}

/* Dark mode state: show sun, hide moon */
[data-theme="dark"] .theme-icon--moon {
    display: none !important;
}
[data-theme="dark"] .theme-icon--sun {
    display: block !important;
    color: #f59e0b;
}

[data-theme="dark"] .theme-toggle-btn {
    background-color: #1c202a;
    border-color: #2e3546;
    color: #f59e0b;
}

[data-theme="dark"] .theme-toggle-btn:hover {
    border-color: #f59e0b;
    background-color: #252b38;
}

.header__top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (max-width: 576px) {
    .header__top-actions {
        gap: 8px;
    }
    .header__top .theme-toggle-btn {
        width: 30px;
        height: 30px;
    }
    .header__top .theme-toggle-btn .theme-icon {
        width: 15px;
        height: 15px;
    }
}

/* Sticky Header (both light & dark themes) */
html,
body {
    overflow-x: clip !important;
}

body.overflow-hidden {
    overflow: hidden !important;
}

.header {
    position: sticky !important;
    top: 0 !important;
    z-index: 101 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .header {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
}

/* ============================================================
   2. Dark Theme Variables & Base Layout
   ============================================================ */
[data-theme="dark"] {
    --clr-light-gray: #161922;
    --clr-gray: #262b38;
    --clr-white: #0f1117;
    --clr-text: #f0f3f8;
    --clr-dark-gray: #9ca3af;
    --clr-asphalt: #2e3444;
    --shadow: 0px 5px 34px 0px rgba(0, 0, 0, 0.6);
    --shadow-2: 0 0 20px 0 rgba(0, 0, 0, 0.5);
    color-scheme: dark;
}

[data-theme="dark"] body,
[data-theme="dark"] .page-wrapper {
    background-color: #0f1117 !important;
    color: #f0f3f8 !important;
}

/* Generic backgrounds */
[data-theme="dark"] .bg-gray,
[data-theme="dark"] .bg-light-gray {
    background-color: #141720 !important;
}

/* Scrollbar */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0f1117;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #2a3040;
    border-radius: 4px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #0077be;
}

/* Headings & Texts */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .h1,
[data-theme="dark"] .h2,
[data-theme="dark"] .h3,
[data-theme="dark"] .h4,
[data-theme="dark"] .block__title,
[data-theme="dark"] .page-heading__title h1 {
    color: #ffffff !important;
}

[data-theme="dark"] p,
[data-theme="dark"] span:not(.btn):not(.login-link span):not(.quantity):not(.icon),
[data-theme="dark"] .text-content {
    color: #d1d5db;
}

[data-theme="dark"] a:not(.btn):not(.socials-item):not(.login-link) {
    color: #f0f3f8;
}

[data-theme="dark"] a:not(.btn):not(.socials-item):not(.login-link):hover {
    color: #0088dd;
}

/* See-all link */
[data-theme="dark"] .see-all {
    color: #f0f3f8 !important;
}
[data-theme="dark"] .see-all:hover {
    color: #0088dd !important;
}
[data-theme="dark"] .see-all > span {
    border-bottom-color: #0088dd !important;
    color: inherit !important;
}

/* Date / metadata */
[data-theme="dark"] .date,
[data-theme="dark"] .item__date,
[data-theme="dark"] .content-area_date,
[data-theme="dark"] .sidebar__nav-date,
[data-theme="dark"] .index-matches__item .item-score .score .inner.fdc .date {
    color: #9ca3af !important;
}

/* ============================================================
   3. Header & Navigation (Fixed Contrast)
   ============================================================ */
[data-theme="dark"] .header::before {
    background-color: #101217 !important;
}

[data-theme="dark"] .header {
    background-color: #151820 !important;
    border-bottom: 1px solid #222632 !important;
}

[data-theme="dark"] .header__top {
    background-color: transparent !important;
    border-bottom: 1px solid #1f232f !important;
}

[data-theme="dark"] .header__bottom {
    background-color: #151820 !important;
}

/* High specificity override for .header .nav__link { color: #000 !important; } */
[data-theme="dark"] .header .nav__link,
[data-theme="dark"] .mobile-menu__nav .nav__link,
[data-theme="dark"] .nav__link {
    color: #f0f3f8 !important;
}

[data-theme="dark"] .header .nav__link:hover,
[data-theme="dark"] .mobile-menu__nav .nav__link:hover,
[data-theme="dark"] .nav__link:hover {
    color: #0088dd !important;
}

[data-theme="dark"] .header .nav__item.has-dropdown .nav__link::after {
    filter: invert(1);
}

/* Header dropdown specific styling (high contrast & specificity) */
[data-theme="dark"] .header .nav__item-dropdown {
    background-color: #1a1e28 !important;
    border: 1px solid #292f3f !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

[data-theme="dark"] .header .nav__item-dropdown .dropdown__list-link {
    background-color: #1a1e28 !important;
    color: #f0f3f8 !important;
    border-color: #292f3f !important;
}

[data-theme="dark"] .header .nav__item-dropdown .dropdown__list-item:not(:last-child) > a {
    border-bottom: 1px solid #292f3f !important;
}

[data-theme="dark"] .header .nav__item-dropdown .dropdown__list-link:hover {
    background-color: #0077be !important;
    color: #ffffff !important;
}

[data-theme="dark"] .login-link {
    color: #f0f3f8 !important;
}

[data-theme="dark"] .login-link:hover {
    color: #0088dd !important;
}

[data-theme="dark"] .login-link svg.icon {
    fill: currentColor;
}

[data-theme="dark"] .burger-line {
    background: #ffffff !important;
}

/* Mobile Menu */
[data-theme="dark"] .mobile-menu {
    background-color: #151820 !important;
}

[data-theme="dark"] .mobile-menu .nav__item {
    border-bottom: 1px solid #222632;
}

[data-theme="dark"] .mobile-menu__login .login-link {
    border-color: #222632;
}

/* Footer Old Site Link */
[data-theme="dark"] .old-site {
    color: #9ca3af !important;
}
[data-theme="dark"] .old-site:hover {
    color: #0088dd !important;
}

/* ============================================================
   4. Breadcrumbs & Page Heading
   ============================================================ */
[data-theme="dark"] .breadcrumbs__item-content {
    color: #9ca3af !important;
}

[data-theme="dark"] .breadcrumbs__item a.breadcrumbs__item-content:hover {
    color: #0088dd !important;
}

[data-theme="dark"] .breadcrumbs__item:not(:last-child)::after {
    color: #6b7280;
}

[data-theme="dark"] .page-heading {
    background-color: #12141c;
    border-bottom: 1px solid #222632;
}

[data-theme="dark"] .page-navigation {
    border-bottom: 1px solid #222632;
}

[data-theme="dark"] .page-navigation_list-link,
[data-theme="dark"] .page-navigation_list-btn {
    color: #9ca3af;
}

[data-theme="dark"] .page-navigation_list-link.is-active,
[data-theme="dark"] .page-navigation_list-btn.is-active {
    color: #0088dd !important;
    background-color: #1a1e28 !important;
}

[data-theme="dark"] .page-navigation_list-link:not(.is-active):hover,
[data-theme="dark"] .page-navigation_list-btn:not(.is-active):hover {
    background-color: #222838 !important;
    color: #ffffff !important;
}

/* ============================================================
   5. Match Page & Protocol (Fixed Contrast)
   ============================================================ */
[data-theme="dark"] .match-heading {
    background-color: #151820;
}

[data-theme="dark"] .match-heading:before {
    display: none !important;
}

[data-theme="dark"] .match-heading:after {
    background-color: #262b38 !important;
}

[data-theme="dark"] .match-heading__league {
    color: #d1d5db;
}

[data-theme="dark"] .match-heading__stadium,
[data-theme="dark"] .match-heading__viewers,
[data-theme="dark"] .match-heading__club .club-city {
    color: #9ca3af !important;
}

[data-theme="dark"] .match-heading__club .club-name {
    color: #ffffff;
}

[data-theme="dark"] .match-heading__score {
    border-color: #2e3546 !important;
    background-color: #1a1e28;
}

[data-theme="dark"] .match-heading__score .score {
    color: #ffffff;
}

[data-theme="dark"] .prev-page,
[data-theme="dark"] .share-btn {
    color: #9ca3af;
}

[data-theme="dark"] .prev-page:hover,
[data-theme="dark"] .share-btn:hover {
    color: #0088dd;
}

/* Protocol items */
[data-theme="dark"] .match__details .protocol__items {
    background-color: #141720 !important;
    border: 1px solid #222634;
}

[data-theme="dark"] .match__details .protocol__items:before {
    border-left-color: #262b38 !important;
}

[data-theme="dark"] .match__details .protocol__item-center {
    background-color: #141720 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .match__details .protocol__item:hover .protocol__item-center {
    background-color: #222838 !important;
}

[data-theme="dark"] .match__details .protocol__item.highlight-time {
    background-color: #222838 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .match__details .protocol__item .description {
    background-color: #1e222d !important;
    color: #f0f3f8 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .match__details .protocol__item:not(.reverse) .protocol__item-event:first-of-type .description:before {
    border-color: transparent #1e222d transparent transparent !important;
}

[data-theme="dark"] .match__details .protocol__item .description:before {
    border-color: transparent #1e222d transparent transparent !important;
}

[data-theme="dark"] .match__details .protocol__item.reverse .description:before {
    border-color: transparent transparent transparent #1e222d !important;
}

[data-theme="dark"] .match__details .protocol__item small {
    color: #9ca3af !important;
}

[data-theme="dark"] .match__details .broadcast__item {
    background-color: #161922 !important;
    color: #f0f3f8;
}

[data-theme="dark"] .match__details .broadcast__item.highlight-time {
    background-color: #222838 !important;
}

/* Lineups tabs and buttons */
[data-theme="dark"] .match__lineups-btns {
    background-color: #141720 !important;
    border: 1px solid #262b38 !important;
}

[data-theme="dark"] .match__lineups-btns .btn {
    color: #9ca3af !important;
    background-color: transparent !important;
}

[data-theme="dark"] .match__lineups-btns .btn.is-active {
    background-color: #0077be !important;
    color: #ffffff !important;
}

[data-theme="dark"] .match__lineups-btns .btn:not(.is-active):hover {
    background-color: #1f2330 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .match__lineups-player {
    background-color: #161922;
    border-color: #262b38;
}

[data-theme="dark"] .match__lineups-player .player-name {
    color: #ffffff !important;
}

[data-theme="dark"] .match__lineups-player .player-position {
    color: #9ca3af !important;
}

[data-theme="dark"] .match__lineups-player .player-number {
    color: #363c4e;
}

/* ============================================================
   6. Match Cards & Calendar
   ============================================================ */
[data-theme="dark"] .hero__matches-item,
[data-theme="dark"] .index-matches__item,
[data-theme="dark"] .hero__match,
[data-theme="dark"] .calendar__event-wrap {
    background-color: #161922 !important;
    border-color: #262b38 !important;
    color: #f0f3f8 !important;
}

[data-theme="dark"] .hero__matches-item:hover,
[data-theme="dark"] .index-matches__item:hover,
[data-theme="dark"] .calendar__event-wrap:has(.calendar__event-link):hover {
    background-color: #1d212d !important;
    border-color: #0077be !important;
    box-shadow: 0 4px 24px rgba(0, 119, 190, 0.2) !important;
    color: #ffffff !important;
}

[data-theme="dark"] .calendar__event-wrap {
    border-bottom: 1px solid #262b38 !important;
}

[data-theme="dark"] .calendar__event-wrap:first-child {
    border-top: 1px solid #262b38 !important;
}

[data-theme="dark"] .calendar__event-info,
[data-theme="dark"] .calendar__event-info--stadium,
[data-theme="dark"] .calendar__event-match--club .club-wrap .club-city,
[data-theme="dark"] .hero__match .match-schedule,
[data-theme="dark"] .hero__match-team .team-city {
    color: #9ca3af !important;
}

/* ============================================================
   7. News, Media & Articles
   ============================================================ */
[data-theme="dark"] .index-block,
[data-theme="dark"] .content-area {
    color: #f0f3f8;
}

[data-theme="dark"] .sidebar__nav-item {
    border-bottom: 1px solid #262b38 !important;
}

[data-theme="dark"] .sidebar__nav-item:first-child {
    border-top: 1px solid #262b38 !important;
}

[data-theme="dark"] .sidebar__nav-link,
[data-theme="dark"] .content-area_title,
[data-theme="dark"] .item__title {
    color: #ffffff !important;
}

[data-theme="dark"] .sidebar__nav-link:hover,
[data-theme="dark"] .content-area_link:hover .content-area_title,
[data-theme="dark"] .item:hover .item__title {
    color: #0088dd !important;
}

[data-theme="dark"] .sidebar__nav-date,
[data-theme="dark"] .content-area_date,
[data-theme="dark"] .item__info {
    color: #9ca3af !important;
}

/* ============================================================
   8. Tables (Standings, Statistics)
   ============================================================ */
[data-theme="dark"] .data-table {
    border: 1px solid #262b38 !important;
    background-color: #141720 !important;
}

[data-theme="dark"] table.dataTable thead {
    background: #1c202a !important;
    border-bottom: 1px solid #262b38 !important;
}

[data-theme="dark"] table.dataTable th {
    color: #9ca3af !important;
}

[data-theme="dark"] table.dataTable td {
    color: #f0f3f8 !important;
}

[data-theme="dark"] table.dataTable td .td-flex .column>span:first-child {
    color: #ffffff !important;
}

[data-theme="dark"] table.dataTable td .td-flex .column>span:last-child {
    color: #9ca3af !important;
}

[data-theme="dark"] table.dataTable tr:not(:last-child) td:not(:has(.loader)) {
    border-bottom: 1px solid #202430 !important;
}

[data-theme="dark"] table.dataTable tr:not(:has(.loader)):not(thead>tr:first-child):hover {
    background-color: rgba(0, 119, 190, 0.12) !important;
}

[data-theme="dark"] table.dataTable tr.is-active {
    background-color: rgba(0, 119, 190, 0.2) !important;
}

/* ============================================================
   9. Squad, Personnel & Info Cards
   ============================================================ */
[data-theme="dark"] .person-cards .person-card {
    outline: 1px solid #262b38 !important;
    background-color: #161922 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

[data-theme="dark"] .person-cards .person-card__header::before {
    background-image: linear-gradient(to bottom, rgba(22, 25, 34, 0) 30%, rgba(22, 25, 34, 0.8) 70%, #161922 100%) !important;
}

[data-theme="dark"] .person-cards .person-card__name,
[data-theme="dark"] .person-card .person-card__title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .person-cards .person-card__position,
[data-theme="dark"] .person-card .person-card__position {
    color: #9ca3af !important;
}

[data-theme="dark"] .person-cards .person-card__number {
    color: #262b38 !important;
}

[data-theme="dark"] .person-cards .person-card:hover .person-card__number {
    color: #0077be !important;
    filter: blur(2px) !important;
}

[data-theme="dark"] .player-info__statistic--items > div,
[data-theme="dark"] .player-info__statistic--item {
    background-color: #1c202a !important;
}

[data-theme="dark"] .player-info__statistic--item .player-info__statistic--title {
    color: #9ca3af !important;
}

/* ============================================================
   10. Form Controls & Choices
   ============================================================ */
[data-theme="dark"] input:not([type="submit"]):not([type="button"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .choices__inner {
    background-color: #161922 !important;
    border: 1px solid #2e3546 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .choices__list--dropdown {
    background-color: #1a1e28 !important;
    border: 1px solid #2e3546 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .choices__item--choice {
    color: #f0f3f8 !important;
}

[data-theme="dark"] .choices__item--choice:hover {
    background-color: #242938 !important;
}

[data-theme="dark"] .btn-transparent {
    border-color: #363c4e !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-gray {
    background-color: #202430 !important;
    color: #f0f3f8 !important;
}

[data-theme="dark"] .count .count-button {
    background-color: #1c202a !important;
    color: #ffffff !important;
}

/* ============================================================
   11. Fancybox, Modals, History, Misc
   ============================================================ */
[data-theme="dark"] .fancybox__content {
    background-color: #161922 !important;
    color: #f0f3f8 !important;
}

[data-theme="dark"] .text-content hr {
    background: #262b38 !important;
}

[data-theme="dark"] .stadium__location-link {
    color: #f0f3f8 !important;
}

[data-theme="dark"] .history__items .item__year {
    color: #ffffff !important;
}

[data-theme="dark"] .history__items .item:not(:last-child):before {
    background-color: #262b38 !important;
}

[data-theme="dark"] .archive .filter-letters .filter-letter {
    color: #9ca3af !important;
}
[data-theme="dark"] .archive .filter-letters .filter-letter.is-active {
    color: #0088dd !important;
}

/* ============================================================
   12. Footer (Cohesive Dark Styling & Border Clean)
   ============================================================ */
[data-theme="dark"] .footer {
    background-color: #0b0d13 !important;
    border-top: 1px solid #1a1f2b !important;
}

[data-theme="dark"] .footer .nav__item-dropdown,
[data-theme="dark"] .footer .dropdown-list {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

[data-theme="dark"] .footer__nav {
    border-top: 1px solid #1a1f2b !important;
    border-bottom: 1px solid #1a1f2b !important;
}

[data-theme="dark"] .footer .nav__item-title {
    color: #ffffff !important;
}

[data-theme="dark"] .footer a.nav__link,
[data-theme="dark"] .footer .nav__link {
    color: #9ca3af !important;
    transition: color 0.2s ease !important;
}

[data-theme="dark"] .footer a.nav__link:hover,
[data-theme="dark"] .footer .nav__link:hover {
    color: #0088dd !important;
}

[data-theme="dark"] .footer__copyright,
[data-theme="dark"] .footer__copyright > * {
    color: #6b7280 !important;
}

/* ============================================================
   13. Partners & Sponsors (Clean Light Cards)
   ============================================================ */
[data-theme="dark"] .partners .item-img {
    background-color: #ffffff !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 260px !important;
    min-height: 96px !important;
    height: 96px !important;
    margin: 0 auto !important;
}

[data-theme="dark"] .partners .item-img:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] .partners .item-img img,
[data-theme="dark"] .partners-2 .item-img img {
    max-height: 68px !important;
    width: auto !important;
    max-width: calc(100% / max(1, var(--sponsor-scale, 1))) !important;
    object-fit: contain !important;
}

[data-theme="dark"] .partners .item-img .caption {
    color: #6b6d74 !important;
}

@media (max-width: 767px) {
    [data-theme="dark"] .partners .item-img {
        height: 74px !important;
        min-height: 74px !important;
        padding: 8px 10px !important;
    }
    [data-theme="dark"] .partners .item-img img,
    [data-theme="dark"] .partners-2 .item-img img {
        max-height: 54px !important;
    }
}

/* ============================================================
   14. Mobile Theme Switcher (Header & Mobile Menu)
   ============================================================ */
@media (min-width: 992px) {
    .theme-toggle-btn--mobile {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .header__btns {
        display: flex !important;
        align-items: center !important;
    }
    .theme-toggle-btn--mobile {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        aspect-ratio: 1 !important;
        border: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #6b6d74 !important;
        cursor: pointer !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: 1 !important;
        transform: none !important;
    }
    .theme-toggle-btn--mobile:hover {
        transform: none !important;
    }
    [data-theme="dark"] .theme-toggle-btn--mobile {
        color: #f59e0b !important;
    }
    .theme-toggle-btn--mobile .theme-icon {
        width: 20px !important;
        height: 20px !important;
    }
}

@media (max-width: 385px) {
    .theme-toggle-btn--mobile {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }
}

.mobile-menu__theme-wrap {
    padding: 14px 0;
    border-bottom: 1px solid #e9ecf1;
}
[data-theme="dark"] .mobile-menu__theme-wrap {
    border-bottom: 1px solid #262b38;
}
.mobile-menu__theme-btn {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #111827 !important;
    padding: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
}
[data-theme="dark"] .mobile-menu__theme-btn {
    color: #f0f3f8 !important;
}
.mobile-menu__theme-btn .theme-icon {
    width: 20px !important;
    height: 20px !important;
}
html:not([data-theme="dark"]) .mobile-menu__theme-btn .theme-btn-text::after {
    content: "Тёмная тема";
}
[data-theme="dark"] .mobile-menu__theme-btn .theme-btn-text::after {
    content: "Светлая тема";
}

/* ============================================================
   15. Mobile Menu Dark Styling
   ============================================================ */
[data-theme="dark"] .mobile-menu {
    background-color: #12141a !important;
}
[data-theme="dark"] .mobile-menu__nav .nav__item {
    border-bottom: 1px solid #222735 !important;
}
[data-theme="dark"] .mobile-menu__nav .nav__link {
    color: #f0f3f8 !important;
}
[data-theme="dark"] .mobile-menu .login-link {
    color: #f0f3f8 !important;
}
[data-theme="dark"] .mobile-menu__login {
    border-color: #222735 !important;
}
[data-theme="dark"] .mobile-menu .dropdown__list-link {
    color: #9ca3af !important;
}
[data-theme="dark"] .mobile-menu .dropdown__list-link:hover {
    color: #0088dd !important;
}
[data-theme="dark"] .burger-line {
    background-color: #f0f3f8 !important;
}

/* ============================================================
   16. Contrast & Unreadable Insets Fixes (Images 1-4)
   ============================================================ */

/* Floating Form Labels (Сезон, Турнир, Команда, Поиск и др.) */
[data-theme="dark"] .select-placeholder,
[data-theme="dark"] .select-wrapper .select-placeholder,
[data-theme="dark"] .form-label,
[data-theme="dark"] #cart-form .form-label,
[data-theme="dark"] .archive-search label,
[data-theme="dark"] .archive .archive-search label,
[data-theme="dark"] .catalog__sorting-title {
    background-color: #161922 !important;
    color: #9ca3af !important;
}

/* Player and Coach Profile Info Block (/player/..., /coach/...) */
[data-theme="dark"] .player-info__item .item__info,
[data-theme="dark"] .player__info .item__info,
[data-theme="dark"] .coach-info__item .item__info {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
    border-radius: 8px !important;
}

[data-theme="dark"] .item__info-list_item-key {
    color: #9ca3af !important;
}

[data-theme="dark"] .item__info-list_item-value {
    color: #f0f3f8 !important;
    font-weight: 500 !important;
}

[data-theme="dark"] .player-info__items .player-info__statistics .item,
[data-theme="dark"] .player-info__statistics .item {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
}

/* Club History Timeline Watermarks (/club) */
[data-theme="dark"] .history__items .item__year,
[data-theme="dark"] .item__year {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.22) !important;
}

/* Dedicated Partner Page Cards (/partner) - Option 1 Style */
[data-theme="dark"] .partner-card .partner-card__img-wrapper,
[data-theme="dark"] .partner-card__img-wrapper {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    padding: 24px 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
    margin-top: 16px !important;
    box-sizing: border-box !important;
}

[data-theme="dark"] .partner-card__title {
    color: #ffffff !important;
}

/* Match Details Protocol & Lineups Contrast */
[data-theme="dark"] .match__details .protocol__items,
[data-theme="dark"] .match__details .broadcast__item {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
}

[data-theme="dark"] .match__details .protocol__item-center {
    background-color: #202430 !important;
}

/* ============================================================
   17. Comprehensive Mobile & Heading Visibility Fixes
   ============================================================ */

/* History Timeline Years - Desktop & Mobile (/club) */
[data-theme="dark"] .history .item__year,
[data-theme="dark"] .history__items .item__year,
[data-theme="dark"] .item__year {
    background-color: transparent !important;
    background: transparent !important;
}

@media (max-width: 767px) {
    [data-theme="dark"] .history .item__year,
    [data-theme="dark"] .history__items .item__year,
    [data-theme="dark"] .item__year {
        background-color: transparent !important;
        background: transparent !important;
        color: #ffffff !important;
        font-size: 22px !important;
        font-weight: 700 !important;
        display: block !important;
        margin-bottom: 8px !important;
    }
}

/* Floating Badges & Select Placeholders (/statistic, /calendar, /player) */
[data-theme="dark"] .select-placeholder,
[data-theme="dark"] .select-wrapper .select-placeholder,
[data-theme="dark"] .table__selects .select-placeholder,
[data-theme="dark"] .form-label,
[data-theme="dark"] #cart-form .form-label,
[data-theme="dark"] .archive-search label,
[data-theme="dark"] .archive .archive-search label,
[data-theme="dark"] .catalog__sorting-title {
    background-color: #161922 !important;
    background: #161922 !important;
    color: #9ca3af !important;
}

/* Calendar Event Match Cards & Date Headers on Mobile (/calendar) */
[data-theme="dark"] .calendar__event-info {
    background-color: #1a1e28 !important;
    border-bottom: 1px solid #262b38 !important;
}

[data-theme="dark"] .calendar__event-info--date {
    color: #f0f3f8 !important;
}

[data-theme="dark"] .calendar__event-wrap {
    border: 1px solid #262b38 !important;
    background-color: #141720 !important;
}

[data-theme="dark"] .calendar__event-wrap::before {
    background-color: #262b38 !important;
}

[data-theme="dark"] .calendar__event-match--score {
    border: 1px solid #262b38 !important;
}

/* Page Navigation Tabs (История, Руководство, Атрибутика...) */
[data-theme="dark"] .page-navigation_list-link.is-active,
[data-theme="dark"] .page-navigation_list-btn.is-active {
    background-color: #202430 !important;
    color: #0088dd !important;
}

[data-theme="dark"] .page-navigation_list-link,
[data-theme="dark"] .page-navigation_list-btn {
    background-color: #161922 !important;
    color: #9ca3af !important;
}

/* Headings on Mobile */
[data-theme="dark"] .block__title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .page-heading__title h1,
[data-theme="dark"] .heading h2,
[data-theme="dark"] .calendar .heading h2,
[data-theme="dark"] .history .heading h2,
[data-theme="dark"] .table__title {
    color: #ffffff !important;
}

/* Store Button in Footer & Mobile */
[data-theme="dark"] .store-btn,
[data-theme="dark"] .footer__top-btns > .store-btn {
    background-color: #1c202a !important;
    border: 1px solid #2e3546 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .store-btn *,
[data-theme="dark"] .footer__top-btns > .store-btn * {
    color: #ffffff !important;
}

/* ============================================================
   18. Tournament Table Legend / Footnote (/table)
   ============================================================ */
[data-theme="dark"] .table-foot,
[data-theme="dark"] .tournament__table-foot,
[data-theme="dark"] .tournament__table .table-foot {
    background-color: #141720 !important;
    border: 1px solid #262b38 !important;
    border-top: none !important;
}

[data-theme="dark"] .table-foot_item,
[data-theme="dark"] .tournament__table .table-foot_item {
    color: #9ca3af !important;
}

[data-theme="dark"] .table-foot_item .accent,
[data-theme="dark"] .tournament__table .table-foot_item .accent {
    color: #ffffff !important;
}


/* ============================================================
   19. Stadium Page (/stadium, /stadium/*)
   ============================================================ */
[data-theme="dark"] .stadium__characteristics .item {
    background-color: #141720 !important;
    border: 1px solid #262b38 !important;
    border-radius: 8px !important;
}

[data-theme="dark"] .stadium__characteristics .item .item__title,
[data-theme="dark"] .stadium__characteristics .item .h1,
[data-theme="dark"] .stadium__characteristics .item [class*="item__title"] {
    color: #38bdf8 !important;
}

[data-theme="dark"] .stadium__characteristics .item .item__subtitle {
    color: #9ca3af !important;
}

[data-theme="dark"] .stadium__location-map {
    background-color: #141720 !important;
    border: 1px solid #262b38 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

[data-theme="dark"] .stadium__location-link {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
}

[data-theme="dark"] .stadium__location-link:hover {
    background-color: #1c202a !important;
    border-color: #0077be !important;
    color: #38bdf8 !important;
}

[data-theme="dark"] .stadium-rental__service-card,
[data-theme="dark"] .stadium-rental__price-card,
[data-theme="dark"] .stadium-rental__rental-card,
[data-theme="dark"] .stadium-personal__card {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
}

/* ============================================================
   20. Documents, Attributes & File Actions (/documents, /attributes)
   ============================================================ */
[data-theme="dark"] .file-actions .item,
[data-theme="dark"] .documents .item,
[data-theme="dark"] .attributes .item {
    border-bottom: 1px solid #262b38 !important;
}

[data-theme="dark"] .file-actions .item__date {
    color: #9ca3af !important;
}

[data-theme="dark"] .file-actions .item__title,
[data-theme="dark"] .file-actions a.item__title,
[data-theme="dark"] .attributes .item__title {
    color: #ffffff !important;
}

[data-theme="dark"] .file-actions a.item__title:hover,
[data-theme="dark"] .attributes a.item__title:hover {
    color: #38bdf8 !important;
}

[data-theme="dark"] .file-actions .item__actions-title {
    color: #9ca3af !important;
}

[data-theme="dark"] .file-actions .item__actions-btn,
[data-theme="dark"] .attributes .item__actions-btn {
    background-color: #1c202a !important;
    border: 1px solid #2e3546 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .file-actions .item__actions-btn svg,
[data-theme="dark"] .file-actions .item__actions-btn use,
[data-theme="dark"] .attributes .item__actions-btn svg,
[data-theme="dark"] .attributes .item__actions-btn use {
    fill: #ffffff !important;
    color: #ffffff !important;
}

[data-theme="dark"] .file-actions .item__actions-btn:hover,
[data-theme="dark"] .attributes .item__actions-btn:hover {
    background-color: #0077be !important;
    border-color: #0077be !important;
    color: #ffffff !important;
}

/* ============================================================
   21. Team Archive Search & Filter Letters (/team/archive)
   ============================================================ */
[data-theme="dark"] .archive .archive-search label {
    background-color: #141720 !important;
    border: 1px solid #262b38 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .archive .archive-search input {
    background-color: transparent !important;
    color: #ffffff !important;
}

[data-theme="dark"] .archive .archive-search input::placeholder {
    color: #9ca3af !important;
}

[data-theme="dark"] .filter-letters .filter-letter:not(.is-active) {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
    color: #9ca3af !important;
}

[data-theme="dark"] .filter-letters .filter-letter.is-active {
    background-color: #0077be !important;
    border-color: #0077be !important;
    color: #ffffff !important;
}

/* ============================================================
   22. Match Details, Protocol & Lineups (/game/*)
   ============================================================ */
[data-theme="dark"] .match__details .protocol__items,
[data-theme="dark"] .match__details .protocol__item-center,
[data-theme="dark"] .match__details .broadcast__item,
[data-theme="dark"] .match__details .match__lineups-btns,
[data-theme="dark"] .match__details .match__lineups-player,
[data-theme="dark"] .match__details .match__history-head,
[data-theme="dark"] .hero__matches-item,
[data-theme="dark"] .hero__match.next-match,
[data-theme="dark"] .index-matches__item {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .match__history-stats--item .item-quantity {
    color: #ffffff !important;
}

/* ============================================================
   23. Contacts Page (/contacts)
   ============================================================ */
[data-theme="dark"] .contacts .item {
    border-bottom: 1px solid #262b38 !important;
}

[data-theme="dark"] .contacts .item__title {
    color: #ffffff !important;
}

[data-theme="dark"] .contacts .item__info {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

[data-theme="dark"] .contacts .item__info p,
[data-theme="dark"] .contacts .item__info span {
    color: #d1d5db !important;
}

[data-theme="dark"] .contacts .item__info a {
    color: #38bdf8 !important;
}

[data-theme="dark"] .contacts .item__info u {
    color: #9ca3af !important;
    text-decoration-color: #4b5563 !important;
}

/* ============================================================
   24. Player Statistics Cards & Global Elements
   ============================================================ */
[data-theme="dark"] .player-info__items .player-info__statistics .item {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
    border-radius: 8px !important;
}

[data-theme="dark"] .player-info__statistics .item .item__title {
    color: #38bdf8 !important;
}

[data-theme="dark"] .player-info__statistics .item .item__subtitle {
    color: #9ca3af !important;
}

[data-theme="dark"] table.dataTable thead {
    background: #141720 !important;
    border-bottom: 1px solid #262b38 !important;
}

[data-theme="dark"] table.dataTable thead th {
    color: #9ca3af !important;
}

[data-theme="dark"] table.dataTable tbody:has(.loader) .loader,
[data-theme="dark"] .loader {
    background-color: #141720 !important;
}

[data-theme="dark"] .bg-gray {
    background-color: #141720 !important;
}

[data-theme="dark"] .btn-gray {
    background-color: #1c202a !important;
    border: 1px solid #2e3546 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .person-card {
    outline: 1px solid #262b38 !important;
}

[data-theme="dark"] .has-sidebar .sidebar__nav-item {
    border-color: #262b38 !important;
}

[data-theme="dark"] .cart__form,
[data-theme="dark"] .catalog__filters,
[data-theme="dark"] .sizes-table,
[data-theme="dark"] .sizes-table .grid-table-head {
    background-color: #161922 !important;
    border: 1px solid #262b38 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .spinner {
    background-color: #0077be !important;
    color: #0077be !important;
}



/* ============================================================
   25. Stadium Scheme (Light/Dark Toggle)
   ============================================================ */
html:not([data-theme="dark"]) .stadium__scheme .scheme-dark {
    display: none !important;
}

[data-theme="dark"] .stadium__scheme .scheme-light {
    display: none !important;
}

[data-theme="dark"] .stadium__scheme .scheme-dark {
    display: block !important;
}

[data-theme="dark"] .stadium__scheme {
    background-color: #141720 !important;
    border: 1px solid #262b38 !important;
    border-radius: 12px !important;
    padding: 24px !important;
    overflow: hidden !important;
}
