* {
    box-sizing: border-box
}

:root {
    --bg: #07090d;
    --panel: #0d1118;
    --panel2: #11161f;
    --line: #202631;
    --muted: #818b9c;
    --text: #f4f6fa;
    --accent: #ff3857;
    --accent2: #ff5b72
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased
}

body.player-open {
    overflow: hidden
}

button,
input {
    font: inherit
}

button {
    cursor: pointer
}

a {
    color: inherit;
    text-decoration: none
}

.hidden {
    display: none !important
}

.wrap {
    width: min(1120px, calc(100% - 34px));
    margin-inline: auto
}

.topbar {
    height: 72px;
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 max(17px, calc((100vw - 1120px)/2));
    background: rgba(7, 9, 13, .92);
    border-bottom: 1px solid #171c24;
    backdrop-filter: blur(18px)
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0
}

.brand-logo {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(145deg, #ff4260, #b5092c);
    overflow: hidden;
    box-shadow: 0 8px 25px #ff31531c
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none
}

.brand-logo img[src]:not([src=""]) {
    display: block
}

.brand-copy {
    min-width: 0
}

.brand-copy b {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    letter-spacing: -.01em;
    white-space: nowrap
}

.brand-copy small {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    color: #778193;
    white-space: nowrap
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 7px
}

.header-nav a {
    font-size: 12px;
    color: #aab3c2;
    padding: 9px 12px;
    border-radius: 9px
}

.header-nav a:hover {
    color: #fff;
    background: #11161e
}

.header-nav .header-apk {
    background: #f5f6f8;
    color: #080a0f;
    font-weight: 900;
    padding: 10px 14px
}

.notice-bar {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 max(17px, calc((100vw - 1120px)/2));
    border-bottom: 1px solid #1b212a;
    background: #0c1016;
    color: #b9c1cd;
    font-size: 11px;
    overflow: hidden
}

.notice-icon {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 5px #ff385712;
    flex: 0 0 auto
}

.notice-bar div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.home {
    padding-bottom: 45px
}

.featured-wrap {
    padding-top: 28px
}

.section-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #ff4a66;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .15em;
    margin-bottom: 10px
}

.section-kicker i {
    height: 1px;
    width: 32px;
    background: #3b2028
}

.featured-card {
    width: 100%;
    min-height: 116px;
    display: grid;
    grid-template-columns: 82px 1fr auto;
    align-items: center;
    gap: 18px;
    text-align: left;
    padding: 15px 18px;
    border: 1px solid #35202a;
    border-radius: 17px;
    background: linear-gradient(100deg, #171016, #0d1118);
    color: #fff;
    box-shadow: 0 14px 45px #00000018
}

.featured-card:hover {
    border-color: #61313f
}

.featured-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #343b46;
    background: #151a22;
    padding: 3px
}

.featured-info strong {
    display: block;
    font-size: 18px;
    letter-spacing: -.02em
}

.featured-info span {
    display: block;
    margin-top: 5px;
    color: #8d97a7;
    font-size: 11px
}

.featured-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff536c;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .1em;
    margin-bottom: 6px
}

.featured-live i {
    width: 6px;
    height: 6px;
    background: #ff3d59;
    border-radius: 50%
}

.featured-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #1a2029;
    color: #fff;
    font-size: 14px
}

.channels-section {
    padding-top: 38px
}

.page-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px
}

.section-kicker-text {
    font-size: 9px;
    color: #ff4a66;
    font-weight: 950;
    letter-spacing: .15em
}

.page-title h1 {
    font-size: 31px;
    line-height: 1;
    margin: 7px 0 0;
    letter-spacing: -.045em
}

.channel-count {
    font-size: 10px;
    color: #6f798a;
    padding-bottom: 3px
}

.channel-count span {
    color: #b6becb;
    font-weight: 800
}

.toolbar {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 19px
}

.search {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 12px;
    border: 1px solid #252c36;
    background: #0d1118;
    border-radius: 12px;
    color: #697486
}

.search>span {
    font-size: 20px;
    line-height: 1
}

.search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: none;
    color: #fff;
    font-size: 12px
}

.search input::placeholder {
    color: #697486
}

.clear-search {
    border: 0;
    background: #1a2029;
    color: #aab3c0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 18px
}

.categories {
    display: flex;
    gap: 7px;
    overflow: auto;
    scrollbar-width: none
}

.categories::-webkit-scrollbar {
    display: none
}

.category {
    white-space: nowrap;
    border: 1px solid #252c36;
    background: #0d1118;
    color: #8e98a8;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 10px
}

.category:hover {
    border-color: #39414d;
    color: #dfe3e9
}

.category.active {
    background: #f3f5f7;
    border-color: #f3f5f7;
    color: #080a0d;
    font-weight: 900
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 11px
}

.channel-card {
    border: 1px solid #202631;
    background: #0d1118;
    border-radius: 15px;
    overflow: hidden;
    padding: 0;
    color: #fff;
    text-align: left;
    transition: transform .18s ease, border-color .18s ease, background .18s ease
}

.channel-card:hover {
    transform: translateY(-2px);
    border-color: #353d49;
    background: #10151d
}

.channel-card:active {
    transform: translateY(0)
}

.channel-logo {
    height: 126px;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 45%, #171d27 0, #0b0f15 64%)
}

.channel-logo img {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    object-fit: cover;
    background: #171c24;
    border: 1px solid #2c333e;
    padding: 4px
}

.channel-name {
    padding: 13px 12px 14px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    min-height: 48px;
    display: flex;
    align-items: center
}

.empty-state {
    padding: 65px 20px;
    text-align: center;
    border: 1px dashed #242b35;
    border-radius: 15px;
    background: #0a0e13
}

.empty-icon {
    width: 44px;
    height: 44px;
    margin: auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #131821;
    color: #727d8d;
    font-size: 23px
}

.empty-state h3 {
    font-size: 15px;
    margin: 14px 0 6px
}

.empty-state p {
    margin: 0;
    color: #727d8d;
    font-size: 11px
}

.site-footer {
    width: min(1120px, calc(100% - 34px));
    margin: auto;
    border-top: 1px solid #171c24;
    padding: 22px 0 28px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #687283;
    font-size: 9px
}

.player-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #000;
    display: grid;
    place-items: center
}

.player-shell {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000
}

.player-shell video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000
}

.player-title {
    position: absolute;
    z-index: 4;
    left: 18px;
    top: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 13px;
    text-shadow: 0 1px 10px #000
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff3b58;
    box-shadow: 0 0 0 5px #ff3b581c
}

.player-close {
    position: absolute;
    z-index: 5;
    right: 17px;
    top: 14px;
    width: 34px;
    height: 34px;
    border: 1px solid #ffffff18;
    border-radius: 50%;
    background: #0007;
    color: #fff;
    font-size: 22px;
    line-height: 1
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: #000b;
    backdrop-filter: blur(9px)
}

.notice-modal {
    position: relative;
    width: min(430px, 100%);
    padding: 28px;
    border: 1px solid #2a313c;
    border-radius: 19px;
    background: #0f141b;
    box-shadow: 0 25px 80px #0008
}

.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    border: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1b212a;
    color: #fff;
    font-size: 19px
}

.notice-modal h2 {
    font-size: 24px;
    margin: 8px 0
}

.notice-modal p {
    font-size: 12px;
    line-height: 1.7;
    color: #929bab
}

.modal-action {
    display: inline-flex;
    margin-top: 7px;
    padding: 10px 14px;
    border-radius: 9px;
    background: #f4f5f7;
    color: #090b0f;
    font-size: 11px;
    font-weight: 900
}

@media(max-width:900px) {
    .channel-grid {
        grid-template-columns: repeat(4, 1fr)
    }

    .toolbar {
        grid-template-columns: 1fr
    }

    .categories {
        padding-bottom: 2px
    }
}

@media(max-width:650px) {
    .wrap {
        width: calc(100% - 26px)
    }

    .topbar {
        height: 64px
    }

    .header-nav a {
        padding: 8px 9px;
        font-size: 11px
    }

    .header-nav .header-apk {
        padding: 9px 11px
    }

    .notice-bar {
        height: 34px
    }

    .featured-wrap {
        padding-top: 18px
    }

    .featured-card {
        grid-template-columns: 58px 1fr 30px;
        gap: 12px;
        min-height: 92px;
        padding: 12px
    }

    .featured-logo {
        width: 58px;
        height: 58px
    }

    .featured-info strong {
        font-size: 14px
    }

    .featured-arrow {
        width: 30px;
        height: 30px;
        font-size: 11px
    }

    .channels-section {
        padding-top: 28px
    }

    .page-title h1 {
        font-size: 27px
    }

    .channel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px
    }

    .channel-logo {
        height: 108px
    }

    .channel-logo img {
        width: 68px;
        height: 68px
    }

    .channel-name {
        font-size: 12px;
        padding: 11px 10px;
        min-height: 45px
    }

    .site-footer {
        width: calc(100% - 26px);
        flex-direction: column;
        padding-bottom: 22px
    }

    .player-title {
        left: 12px;
        top: 12px;
        font-size: 11px
    }

    .player-close {
        right: 10px;
        top: 10px
    }
}

.simple-page {
    min-height: calc(100vh - 160px);
    padding-top: 78px;
    padding-bottom: 80px
}

.simple-page h1 {
    font-size: clamp(38px, 6vw, 60px);
    letter-spacing: -.055em;
    line-height: 1.02;
    max-width: 700px;
    margin: 10px 0 14px
}

.simple-lead {
    max-width: 570px;
    color: #8791a1;
    font-size: 14px;
    line-height: 1.75
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 35px
}

.contact-card {
    border: 1px solid #222933;
    background: #0d1118;
    border-radius: 16px;
    padding: 20px;
    transition: .18s
}

.contact-card:hover {
    transform: translateY(-2px);
    border-color: #37404c;
    background: #10151d
}

.contact-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #171d26;
    color: #fff;
    font-weight: 900;
    margin-bottom: 28px
}

.contact-card strong {
    display: block;
    font-size: 14px
}

.contact-card small {
    display: block;
    color: #747f90;
    font-size: 10px;
    margin-top: 5px
}

.download-box {
    margin-top: 34px;
    max-width: 760px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 17px;
    border: 1px solid #252c36;
    background: #0d1118;
    border-radius: 17px
}

.download-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #ff4260, #b5092c);
    font-weight: 950
}

.download-box div:nth-child(2) {
    flex: 1
}

.download-box strong {
    display: block;
    font-size: 14px
}

.download-box span {
    display: block;
    color: #788394;
    font-size: 10px;
    margin-top: 4px
}

@media(max-width:650px) {
    .simple-page {
        padding-top: 54px
    }

    .contact-grid {
        grid-template-columns: 1fr
    }

    .download-box {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .download-box .modal-action {
        margin-left: 72px;
        margin-top: -8px
    }
}

/* Final responsive refinements */
body {
    padding-bottom: 58px
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit
}

.mobile-menu {
    display: none;
    border: 1px solid #272e38;
    background: #10151c;
    color: #dfe4ea;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 17px
}

.mobile-menu-panel {
    display: none
}

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    width: 100%;
    height: 48px;
    padding: 0 max(17px, calc((100vw - 1120px)/2));
    background: rgba(7, 9, 13, .94);
    backdrop-filter: blur(16px);
    border-top: 1px solid #171c24;
    align-items: center
}

.settings-list {
    max-width: 760px;
    margin-top: 32px;
    border: 1px solid #222933;
    border-radius: 17px;
    overflow: hidden;
    background: #0d1118
}

.setting-row {
    min-height: 72px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #202631;
    color: #fff
}

.setting-row:last-child {
    border-bottom: 0
}

.setting-row strong {
    display: block;
    font-size: 13px
}

.setting-row small {
    display: block;
    color: #747f90;
    font-size: 10px;
    margin-top: 5px
}

.setting-value {
    color: #8e98a8;
    font-size: 10px
}

.setting-link:hover {
    background: #11161e
}

.setting-link>span {
    font-size: 21px;
    color: #6f7989
}

@media(max-width:650px) {
    body {
        padding-bottom: 55px
    }

    .topbar {
        padding-inline: 13px
    }

    .brand-logo {
        width: 38px;
        height: 38px
    }

    .brand-copy b {
        font-size: 13px
    }

    .header-nav>a:not(.header-apk) {
        display: none
    }

    .header-nav .header-apk {
        font-size: 10px;
        padding: 9px 11px
    }

    .mobile-menu {
        display: block
    }

    .mobile-menu-panel {
        position: absolute;
        right: 13px;
        top: 59px;
        display: block;
        width: 180px;
        padding: 6px;
        background: #11161e;
        border: 1px solid #2a313b;
        border-radius: 13px;
        box-shadow: 0 20px 55px #0009
    }

    .mobile-menu-panel.hidden {
        display: none
    }

    .mobile-menu-panel a {
        display: block;
        padding: 11px 12px;
        border-radius: 8px;
        font-size: 11px;
        color: #bfc7d3
    }

    .mobile-menu-panel a:hover {
        background: #1a2029;
        color: #fff
    }

    .channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .channel-logo {
        height: 112px
    }

    .channel-name {
        font-size: 11px
    }

    .toolbar {
        gap: 9px
    }

    .categories {
        margin-right: -13px;
        padding-right: 13px
    }

    .page-title {
        align-items: flex-end
    }

    .channel-count {
        font-size: 9px
    }

    .simple-page h1 {
        font-size: 38px
    }

    .settings-list {
        margin-top: 25px
    }

    .setting-row {
        min-height: 67px;
        padding: 14px
    }

    .site-footer {
        height: 50px;
        font-size: 8px
    }
}

@media(min-width:651px) and (max-width:1000px) {
    .channel-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr))
    }
}

@media(max-width:420px) {
    .channel-grid {
        gap: 7px
    }

    .channel-logo {
        height: 96px
    }

    .channel-logo img {
        width: 62px;
        height: 62px
    }

    .channel-name {
        padding: 10px 9px;
        font-size: 10px;
        min-height: 40px
    }

    .page-title h1 {
        font-size: 25px
    }

    .search {
        height: 42px
    }
}

/* Final v4: minimal header + theme modes + fixed footer */
html[data-theme="light"] {
    --bg: #f5f7fa;
    --panel: #ffffff;
    --panel2: #eef1f5;
    --line: #dfe3e8;
    --muted: #687386;
    --text: #11151b
}

html[data-theme="light"] body {
    background: var(--bg);
    color: var(--text)
}

html[data-theme="light"] .topbar {
    background: rgba(245, 247, 250, .92);
    border-color: #e1e5ea
}

html[data-theme="light"] .channel-card,
.html[data-theme="light"] .search,
.html[data-theme="light"] .category,
.html[data-theme="light"] .settings-list,
.html[data-theme="light"] .contact-card,
.html[data-theme="light"] .download-box {
    background: #fff;
    border-color: #dfe4ea
}

html[data-theme="light"] .channel-logo {
    background: #f0f3f7
}

html[data-theme="light"] .site-footer {
    background: rgba(245, 247, 250, .94);
    border-color: #dfe3e8;
    color: #6f7988
}

html[data-theme="light"] .brand-copy b {
    color: #11151b
}

html[data-theme="light"] .header-nav a {
    color: #566171
}

html[data-theme="light"] .category {
    color: #596576
}

html[data-theme="light"] .category.active {
    background: #11151b;
    color: #fff;
    border-color: #11151b
}

html[data-theme="light"] .search input {
    color: #11151b
}

html[data-theme="light"] .settings-list {
    box-shadow: 0 12px 35px #202b3a0a
}

html[data-theme="light"] .setting-row {
    border-color: #e4e8ed
}

html[data-theme="light"] .setting-value {
    color: #6d7787
}

.brand-copy b {
    font-size: 16px;
    letter-spacing: -.025em;
    font-weight: 900
}

.header-nav {
    gap: 0
}

.settings-icon {
    width: 38px !important;
    height: 38px !important;
    display: grid !important;
    place-items: center;
    padding: 0 !important;
    border: 1px solid #272e38;
    border-radius: 11px;
    background: #10151c;
    color: #cbd2dc !important;
    font-size: 18px !important;
    transition: .18s
}

.settings-icon:hover {
    transform: rotate(18deg);
    border-color: #3d4653;
    background: #171d26
}

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid #2a313b;
    background: #171d25;
    color: #cbd2dc;
    border-radius: 99px;
    padding: 5px 9px 5px 6px;
    font-size: 10px;
    font-weight: 800
}

.theme-dot {
    width: 23px;
    height: 23px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #080b10
}

.theme-dot:after {
    content: "☾";
    font-size: 12px
}

html[data-theme="light"] .theme-toggle {
    background: #eef1f5;
    border-color: #d7dde4;
    color: #313a48
}

html[data-theme="light"] .theme-dot {
    background: #fff
}

html[data-theme="light"] .theme-dot:after {
    content: "☀";
    color: #d78c00
}

html[data-theme="light"] .settings-link {
    color: #11151b
}

html[data-theme="light"] .setting-row {
    color: #11151b
}

body {
    padding-bottom: 56px
}

.site-footer {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    width: 100% !important;
    height: 52px !important;
    margin: 0 !important;
    padding: 0 max(16px, calc((100vw - 1120px)/2)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: rgba(7, 9, 13, .96);
    backdrop-filter: blur(16px)
}

@media(max-width:650px) {
    .topbar {
        height: 62px
    }

    .brand-copy b {
        font-size: 15px
    }

    .settings-icon {
        width: 36px !important;
        height: 36px !important
    }

    .site-footer {
        height: 50px !important;
        font-size: 8px
    }

    .site-footer span:last-child {
        display: none
    }

    .theme-toggle {
        min-width: 75px;
        justify-content: center
    }
}

/* v5 branding + settings drawer */
:root {
    color-scheme: dark
}

html[data-theme="light"] {
    color-scheme: light
}

body.settings-open {
    overflow: hidden
}

.site-logo {
    display: flex;
    align-items: center;
    width: 230px;
    height: 52px;
    color: var(--text)
}

.site-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: left center
}

.settings-icon {
    font-family: Arial, sans-serif !important;
    font-size: 19px !important
}

.settings-backdrop {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: #0008;
    backdrop-filter: blur(4px)
}

.settings-drawer {
    position: fixed;
    z-index: 100;
    right: 16px;
    top: 78px;
    width: min(370px, calc(100vw - 24px));
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 25px 80px #0008;
    transform: translateY(-10px) scale(.98);
    opacity: 0;
    pointer-events: none;
    transition: .2s ease
}

.settings-drawer.open {
    transform: none;
    opacity: 1;
    pointer-events: auto
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 3px 14px;
    border-bottom: 1px solid var(--line)
}

.drawer-kicker {
    font-size: 8px;
    letter-spacing: .16em;
    font-weight: 950;
    color: var(--accent)
}

.drawer-head h2 {
    font-size: 22px;
    letter-spacing: -.035em;
    margin: 4px 0 0
}

.drawer-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel2);
    color: var(--text);
    font-size: 20px
}

.drawer-list {
    padding-top: 8px
}

.drawer-item {
    width: 100%;
    min-height: 65px;
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    text-align: left
}

.drawer-item:last-child {
    border-bottom: 0
}

.drawer-item:hover {
    background: var(--panel2);
    border-radius: 11px
}

.drawer-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--panel2);
    color: var(--accent2);
    font-size: 15px;
    font-weight: 900
}

.drawer-item b {
    display: block;
    font-size: 12px
}

.drawer-item small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    margin-top: 4px
}

.drawer-arrow {
    font-size: 21px;
    color: var(--muted)
}

.switch {
    width: 39px;
    height: 22px;
    padding: 3px;
    border-radius: 99px;
    background: #272e38;
    transition: .18s
}

.switch i {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f5f6f8;
    transition: .18s
}

.switch.on {
    background: #ff3d5b
}

.switch.on i {
    transform: translateX(17px)
}

html[data-theme="light"] .settings-drawer {
    box-shadow: 0 25px 70px #202b3a22
}

html[data-theme="light"] .settings-backdrop {
    background: #18212b33
}

html[data-theme="light"] .drawer-item:hover {
    background: #f0f3f6
}

html[data-theme="light"] .drawer-icon {
    background: #f0f3f6
}

html[data-theme="light"] .settings-icon {
    background: #fff !important;
    border-color: #d9dfe6 !important;
    color: #151b24 !important
}

@media(max-width:650px) {
    .site-logo {
        width: 188px;
        height: 45px
    }

    .settings-drawer {
        right: 8px;
        left: 8px;
        top: 70px;
        width: auto;
        border-radius: 16px
    }

    .drawer-item {
        min-height: 62px
    }

    .player-shell video {
        width: 100vw;
        height: 100dvh
    }
}

@media(max-width:380px) {
    .site-logo {
        width: 165px;
        height: 41px
    }

    .settings-drawer {
        top: 67px
    }

    .drawer-item b {
        font-size: 11px
    }
}

@media(max-width:650px) {
    .site-footer {
        justify-content: center !important;
        text-align: center
    }

    .site-footer span:last-child {
        display: none !important
    }
}

/* v6 visual polish */
.site-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px
}

.site-logo img {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    object-fit: cover
}

.site-name {
    font-size: 19px;
    font-weight: 950;
    letter-spacing: -.035em;
    color: var(--text);
    white-space: nowrap
}

.brand {
    gap: 11px
}

.channels-section {
    padding-top: 44px
}

.page-title h1 {
    font-size: 38px;
    letter-spacing: -.055em
}

.channel-count {
    font-size: 12px
}

.channel-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.channel-card {
    min-height: 214px;
    border-radius: 18px;
    background: linear-gradient(180deg, #0e131a 0%, #0b0f15 100%);
    box-shadow: 0 12px 35px #00000016
}

.channel-card:hover {
    transform: translateY(-3px);
    border-color: #3a4350;
    box-shadow: 0 18px 45px #00000025
}

.channel-logo {
    height: 156px;
    background: radial-gradient(circle at 50% 45%, #1a212c 0, #0b0f15 68%);
    border-bottom: 1px solid #1d242e
}

.channel-logo img {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    border: 1px solid #333c49;
    background: #141a23;
    padding: 4px;
    box-shadow: 0 10px 25px #0006
}

.channel-name {
    padding: 16px 15px;
    font-size: 15px;
    font-weight: 850;
    min-height: 57px;
    justify-content: center;
    text-align: center
}

html[data-theme="light"] .channel-card {
    background: linear-gradient(180deg, #fff, #f7f9fb);
    box-shadow: 0 10px 28px #25304110
}

html[data-theme="light"] .channel-logo {
    background: radial-gradient(circle at 50% 45%, #eef2f6 0, #f8fafc 68%);
    border-color: #e3e7ec
}

html[data-theme="light"] .channel-logo img {
    background: #fff;
    border-color: #dce2e9;
    box-shadow: 0 8px 22px #1f29370e
}

.site-footer {
    height: 58px !important;
    justify-content: center !important;
    gap: 24px !important;
    text-align: center
}

.site-footer span {
    font-size: 11px !important
}

.site-footer span:last-child {
    color: #8b95a5
}

body {
    padding-bottom: 66px
}

@media(max-width:1050px) {
    .channel-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr))
    }
}

@media(max-width:720px) {
    .channels-section {
        padding-top: 31px
    }

    .page-title h1 {
        font-size: 32px
    }

    .channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px
    }

    .channel-card {
        min-height: 185px;
        border-radius: 15px
    }

    .channel-logo {
        height: 128px
    }

    .channel-logo img {
        width: 76px;
        height: 76px
    }

    .channel-name {
        padding: 13px 8px;
        font-size: 13px;
        min-height: 50px
    }

    .site-name {
        font-size: 16px
    }

    .site-logo,
    .site-logo img {
        width: 40px;
        height: 40px
    }

    .site-logo {
        flex-basis: 40px
    }

    .site-footer {
        height: 54px !important
    }

    .site-footer span {
        font-size: 10px !important
    }
}

@media(max-width:390px) {
    .wrap {
        width: calc(100% - 20px)
    }

    .channel-grid {
        gap: 8px
    }

    .channel-card {
        min-height: 164px
    }

    .channel-logo {
        height: 112px
    }

    .channel-logo img {
        width: 66px;
        height: 66px
    }

    .channel-name {
        font-size: 12px;
        padding: 11px 6px
    }

    .page-title h1 {
        font-size: 29px
    }

    .site-name {
        font-size: 15px
    }
}

/* v7 public notice + live match polish */
.notice-track {
    overflow: hidden;
    white-space: nowrap;
    flex: 1
}

.notice-track>div {
    display: inline-block;
    min-width: 100%;
    animation: sr-marquee var(--notice-speed, 28s) linear infinite;
    padding-left: 100%
}

@keyframes sr-marquee {
    from {
        transform: translateX(0)
    }

    to {
        transform: translateX(-100%)
    }
}

.featured-card {
    display: grid !important;
    grid-template-columns: 1fr 1.6fr 1fr;
    align-items: center;
    gap: 14px;
    padding: 18px !important;
    text-align: center
}

.match-team {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0
}

.match-team img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    background: #171d26;
    border: 1px solid #2d3744
}

.match-team b {
    font-size: 13px
}

.match-center small {
    display: block;
    color: #ff3d5b;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .12em
}

.match-center strong {
    display: block;
    font-size: 15px;
    margin: 6px 0
}

.match-center span {
    color: #8d97a7;
    font-size: 10px
}

.modal-close {
    z-index: 3
}

.modal-action.hidden {
    display: none !important
}

@media(max-width:650px) {
    .featured-card {
        grid-template-columns: 1fr 1.2fr 1fr;
        gap: 7px;
        padding: 13px !important
    }

    .match-team {
        flex-direction: column;
        gap: 5px
    }

    .match-team img {
        width: 48px;
        height: 48px
    }

    .match-team b {
        font-size: 10px
    }

    .match-center strong {
        font-size: 12px
    }

    .match-center span {
        font-size: 9px
    }
}

/* v8 live matches + notice polish */
.notice-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center !important
}

#scrollNotice {
    display: inline-block;
    white-space: nowrap;
    min-width: max-content
}

#scrollNotice.scrolling {
    animation: noticeMarquee var(--notice-speed, 28s) linear infinite
}

@keyframes noticeMarquee {
    from {
        transform: translateX(100vw)
    }

    to {
        transform: translateX(-100%)
    }
}

.notice-bar:hover #scrollNotice {
    animation-play-state: paused
}

.match-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px
}

.featured-card {
    min-height: 145px !important;
    grid-template-columns: 1fr 1.5fr 1fr !important;
    padding: 18px !important;
    border-radius: 20px !important;
    background: radial-gradient(circle at 50% 0, #1d141d, #0d1118 62%) !important;
    box-shadow: 0 18px 55px #0003 !important;
    transition: .2s
}

.featured-card:hover {
    transform: translateY(-3px);
    border-color: #6b3443;
    box-shadow: 0 24px 60px #0005 !important
}

.match-team {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0
}

.match-team img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50%;
    object-fit: cover;
    background: #171d26;
    border: 1px solid #333c49;
    box-shadow: 0 8px 25px #0006
}

.match-team b {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px
}

.match-center {
    text-align: center;
    min-width: 0
}

.match-center small {
    display: block;
    color: #ff3d5b;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .15em
}

.match-center strong {
    display: block;
    font-size: 17px;
    line-height: 1.25;
    margin: 7px 0
}

.match-center span {
    display: block;
    color: #a1aaba;
    font-size: 11px
}

.notice-modal {
    overflow: hidden;
    padding: 34px 28px 27px !important;
    border-radius: 24px !important;
    background: linear-gradient(145deg, #151a23, #0b0f15) !important;
    border-color: #303946 !important;
    box-shadow: 0 30px 100px #000b !important;
    text-align: left !important
}

.notice-glow {
    position: absolute;
    right: -80px;
    top: -90px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: #ff3d5b24;
    filter: blur(30px);
    pointer-events: none
}

.popup-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    border-radius: 99px;
    background: #ff3d5b12;
    border: 1px solid #ff3d5b2b;
    color: #ff7186;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .13em
}

.popup-badge span {
    font-size: 7px
}

.popup-icon {
    position: relative;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin: 18px 0 13px;
    border-radius: 15px;
    background: linear-gradient(135deg, #ff405e, #b70e33);
    color: #fff;
    font-size: 24px;
    font-weight: 950;
    box-shadow: 0 12px 30px #ff3d5b2b
}

.notice-modal h2 {
    position: relative;
    font-size: 25px !important;
    line-height: 1.15;
    margin: 0 40px 9px !important;
    letter-spacing: -.035em
}

.notice-modal p {
    position: relative;
    font-size: 12px !important;
    line-height: 1.75 !important;
    color: #a4adba !important;
    margin: 0 !important;
    white-space: pre-wrap
}

.modal-close {
    z-index: 3 !important;
    right: 14px !important;
    top: 14px !important;
    width: 34px !important;
    height: 34px !important;
    border: 1px solid #2c3541 !important;
    background: #1a2029 !important;
    color: #cbd2dc !important;
    transition: .18s
}

.modal-close:hover {
    background: #242c36;
    transform: rotate(90deg);
    color: #fff
}

.modal-action {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 22px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: #f4f6f8 !important;
    color: #080b10 !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    text-decoration: none !important;
    transition: .18s
}

.modal-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px #0004
}

.modal-action b {
    font-size: 17px
}

@media(max-width:700px) {
    .match-grid {
        grid-template-columns: 1fr;
        gap: 10px
    }

    .featured-card {
        min-height: 128px !important;
        grid-template-columns: 1fr 1.35fr 1fr !important;
        padding: 14px !important
    }

    .match-team {
        flex-direction: column;
        gap: 6px
    }

    .match-team img {
        width: 56px !important;
        height: 56px !important
    }

    .match-team b {
        font-size: 11px;
        max-width: 95px
    }

    .match-center strong {
        font-size: 13px
    }

    .match-center span {
        font-size: 9px
    }

    .notice-modal {
        padding: 28px 20px 21px !important;
        border-radius: 21px !important
    }

    .notice-modal h2 {
        font-size: 22px !important
    }
}

/* v8.1 fixes */
html[data-theme="light"] .channel-name {
    color: #111827 !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
}

html[data-theme="light"] .channel-card .channel-name {
    background: transparent !important;
}

html[data-theme="light"] .channel-card:hover .channel-name {
    color: #0b1220 !important;
}

/* v8.2 notice polish */
.notice-modal {
    width: min(500px, calc(100vw - 28px)) !important
}

.notice-modal::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(135deg, #ff3d5b08, transparent 45%, #ff3d5b06)
}

.notice-modal p {
    max-height: 220px;
    overflow: auto
}

@media(max-width:700px) {
    .notice-modal {
        width: calc(100vw - 24px) !important
    }

    .notice-modal p {
        max-height: 180px
    }
}

/* v8.3: simple popup, immediate continuous marquee, autoplay player */
.notice-track {
    min-width: 0
}

#scrollNotice.scrolling {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: max-content;
    gap: 120px;
    animation: noticeLoop var(--notice-speed, 55s) linear infinite;
    will-change: transform
}

#scrollNotice.scrolling>span {
    display: inline-block;
    white-space: nowrap
}

@keyframes noticeLoop {
    from {
        transform: translateX(0)
    }

    to {
        transform: translateX(calc(-50% - 60px))
    }
}

.notice-modal {
    width: min(380px, calc(100vw - 30px)) !important;
    padding: 28px 24px 22px !important;
    border-radius: 18px !important;
    background: #0f141b !important;
    border: 1px solid #29313c !important;
    box-shadow: 0 28px 80px #0009 !important;
    text-align: center !important
}

.notice-modal::before,
.notice-glow,
.popup-icon,
.popup-badge {
    display: none !important
}

.popup-label {
    display: inline-block;
    color: #ff4d68;
    font-size: 8px;
    font-weight: 950;
    letter-spacing: .16em;
    margin-bottom: 10px
}

.notice-modal h2 {
    font-size: 21px !important;
    line-height: 1.25;
    margin: 0 36px 9px !important;
    color: #f4f6fa !important
}

.notice-modal p {
    font-size: 12px !important;
    line-height: 1.65 !important;
    color: #9ca6b5 !important;
    margin: 0 auto !important;
    max-height: 160px;
    overflow: auto;
    white-space: pre-wrap
}

.modal-close {
    right: 11px !important;
    top: 11px !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 17px !important;
    background: #171d26 !important;
    border: 1px solid #2b3440 !important
}

.modal-close:hover {
    transform: none !important;
    background: #242c36 !important
}

.modal-action {
    display: inline-flex !important;
    width: auto !important;
    min-width: 110px;
    justify-content: center !important;
    margin: 18px auto 0 !important;
    padding: 9px 16px !important;
    border-radius: 9px !important;
    background: #f4f6f8 !important;
    color: #080b10 !important;
    font-size: 10px !important;
    font-weight: 900 !important
}

.modal-action:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 20px #0003 !important
}

@media(max-width:650px) {
    .notice-modal {
        width: min(340px, calc(100vw - 28px)) !important;
        padding: 25px 18px 19px !important
    }

    .notice-modal h2 {
        font-size: 19px !important
    }

    .notice-modal p {
        font-size: 11px !important
    }

    .modal-action {
        min-width: 100px;
        padding: 8px 14px !important
    }
}

/* v8.4 */
.match-center .match-name {
    display: block;
    font-size: 11px;
    color: var(--text);
    font-weight: 800;
    margin-top: 2px
}

.match-admin-name {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px
}

#scrollNotice.scrolling {
    animation-duration: var(--notice-speed, 55s) !important
}

.notice-modal {
    max-width: 460px !important
}

.notice-modal .modal-action {
    width: auto !important;
    min-width: 120px !important;
    max-width: 220px !important;
    margin: 16px auto 0 !important;
    padding: 10px 18px !important;
    font-size: 11px !important
}

@media(max-width:650px) {
    .match-center .match-name {
        font-size: 10px
    }

    .notice-modal .modal-action {
        min-width: 110px !important
    }
}

/* v8.5 match + interaction fixes */
.featured-card {
    cursor: pointer !important
}

.match-center .match-name {
    display: block !important;
    color: var(--text) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    margin-top: 4px !important
}

.match-center span {
    display: block !important;
    color: var(--muted) !important;
    font-size: 11px !important;
    margin-top: 5px !important
}