/* ================= 基础重置 ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f2f4f7;
    color: #1f2329;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    color: inherit;
    outline: none;
}

img.logo-img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ================= 顶部导航栏 ================= */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 12px 24px;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f2f4f7;
    color: #1f2329;
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background-color: #e5e6eb;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.logo-box {
    height: 35px;
    display: flex;
    align-items: center;
}

.logo-box img {
    height: 40px;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f2f4f7;
    border-radius: 8px;
    padding: 8px 16px;
    width: 380px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-right: 26px;
    /* RTL 翻转 */
}

.search-bar:focus-within {
    background-color: #ffffff;
    border-color: #e50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    width: 100%;
    min-width: 320px;
    font-size: 14px;
    color: #1f2329;
    margin-right: 8px;
    /* RTL 翻转 */
}

form#search-form {
    display: flex;
}

.search-bar input::placeholder {
    color: #8f959e;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-search-trigger {
    display: none;
}

.mobile-search-dropdown {
    display: none;
    position: absolute;
    top: 64px;
    right: 0;
    /* RTL 翻转 */
    width: 100%;
    background-color: #ffffff;
    padding: 12px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 99;
    border-bottom: 1px solid #e5e6eb;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-search-dropdown.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-search-dropdown .search-bar {
    width: 100%;
    margin-right: 0;
}

/* ================= 语言选择 ================= */
.lang-select {
    position: relative;
    user-select: none;
    z-index: 10;
}

.lang-select-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px 8px 30px;
    /* RTL 翻转 */
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background-color: #ffffff;
    color: #4e5969;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    line-height: 1.2;
}

.lang-select-btn:hover {
    background-color: #f2f4f7;
    border-color: #d1d5db;
}

.lang-select-arrow {
    position: absolute;
    left: 8px;
    /* RTL 翻转 */
    width: 14px;
    height: 14px;
    fill: #4e5969;
    transition: transform 0.2s ease;
}

.lang-select.active .lang-select-arrow {
    transform: rotate(180deg);
}

.lang-select-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    /* RTL 翻转 */
    right: auto;
    /* RTL 翻转 */
    min-width: 180px;
    max-height: 360px;
    overflow-y: auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e6eb;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
}

.lang-select.active .lang-select-menu {
    display: flex;
}

.lang-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 13px;
    color: #4e5969;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.lang-select-item:hover {
    background-color: #f2f4f7;
    color: #1f2329;
}

.lang-select-item.active {
    color: #e50914;
    background-color: #fff7ed;
    font-weight: 500;
}

#currentLangText {
    align-items: center;
    display: flex;
}

#currentLangText svg {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    /* RTL 翻转 */
}

#currentLangText i {
    margin-left: 5px;
    /* RTL 翻转 */
}

/* ================= 通用下拉菜单 ================= */
.custom-dropdown {
    position: relative;
    user-select: none;
    z-index: 10;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px 0 30px;
    /* RTL 翻转 */
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background-color: #ffffff;
    color: #4e5969;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dropdown-btn:hover {
    background-color: #f2f4f7;
    border-color: #d1d5db;
}

.dropdown-btn .arrow-down {
    position: absolute;
    left: 8px;
    /* RTL 翻转 */
    width: 14px;
    height: 14px;
    fill: #4e5969;
    transition: transform 0.2s ease;
}

.custom-dropdown.active .arrow-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    /* RTL 翻转 */
    min-width: 160px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 1px solid #e5e6eb;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    z-index: 200;
}

.custom-dropdown.active .dropdown-menu {
    display: flex;
}

.dropdown-item {
    padding: 8px 12px;
    font-size: 13px;
    color: #4e5969;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #f2f4f7;
}

.dropdown-item.active {
    color: #e50914;
    background-color: #fff7ed;
    font-weight: 600;
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    margin-left: 5px;
    /* RTL 翻转 */
}

/* ================= 页面整体布局 ================= */
.page-layout {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-content: flex-start;
    max-width: 1920px;
    margin: 0 auto;
    width: 100%;
}

.page-layout>.main-container {
    flex: 1;
    min-width: 0;
}

.page-layout>.mobile-search-dropdown {
    display: none !important;
}

/* --------- 侧边栏常驻菜单（右侧） --------- */
.sidebar-nav {
    width: 240px;
    background-color: #ffffff;
    border-left: 1px solid #e5e6eb;
    /* RTL 翻转：边框在左侧 */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

.sidebar-nav.hidden-nav {
    width: 0;
    overflow: hidden;
    border-left: none;
    /* RTL 翻转 */
    opacity: 0;
}

.nav-group {
    padding: 10px 0;
    border-bottom: 1px solid #f2f4f7;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    font-size: 14px;
    color: #4e5969;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
    white-space: nowrap;
}

.nav-item:hover {
    background-color: #f2f4f7;
}

.nav-item.active {
    color: #1f2329;
    font-weight: 600;
    background-color: #f8f9fa;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    fill: #8f959e;
}

.nav-item.active svg {
    fill: #1f2329;
}

.nav-btns {
    padding: 16px 20px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #f2f4f7;
}

.btn-green {
    flex: 1;
    padding: 8px 0;
    text-align: center;
    border-radius: 20px;
    background-color: #00a870;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    display: block;
    transition: background 0.2s;
}

.btn-green:hover {
    background-color: #008f5f;
}

.nav-footer {
    padding: 20px;
    margin-top: auto;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: #8f959e;
    margin-bottom: 12px;
}

.nav-links a:hover {
    color: #1f2329;
}

.nav-copy {
    font-size: 12px;
    color: #8f959e;
}

/* 子菜单折叠 */
.nav-item-toggle {
    cursor: pointer;
    user-select: none;
}

.nav-toggle-arrow {
    width: 18px;
    height: 18px;
    fill: #8f959e;
    flex-shrink: 0;
    transition: transform 0.25s ease;
    transform: scaleX(-1);
    /* RTL 翻转箭头 */
}

.nav-item-toggle.active .nav-toggle-arrow {
    transform: scaleX(-1) rotate(180deg);
}

.nav-item-toggle.active {
    color: #1f2329;
    font-weight: 600;
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-subitem {
    display: block;
    padding: 9px 50px 9px 20px;
    /* RTL 翻转 */
    font-size: 13px;
    color: #8f959e;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.nav-subitem::before {
    content: "";
    position: absolute;
    right: 32px;
    /* RTL 翻转 */
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d1d5db;
    transform: translateY(-50%);
    transition: background 0.2s;
}

.nav-subitem:hover {
    background-color: #f2f4f7;
    color: #1f2329;
}

.nav-subitem:hover::before {
    background: #e50914;
}

/* --------- 内容区 --------- */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2329;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: "";
    display: block;
    width: 4px;
    height: 18px;
    background-color: #e50914;
    border-radius: 2px;
    margin-left: 8px;
    /* RTL 翻转 */
}

.section-more {
    font-size: 13px;
    color: #8f959e;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.section-more:hover {
    color: #e50914;
}

.section-more svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    transform: scaleX(-1);
    /* RTL 翻转箭头 */
}

/* ================= Hero 轮播 ================= */
.hero-slider-container {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-slider-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.hero-banner {
    flex: 0 0 100%;
    min-width: 100%;
    background-size: cover;
    background-position: center;
    padding: 40px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 280px;
}

/* RTL 渐变方向覆盖 (因为 HTML 是行内样式，这里用 !important 覆盖) */
[dir="rtl"] .hero-banner {
    background-image: linear-gradient(to left, rgba(26, 42, 68, 0.9), rgba(26, 42, 68, 0.2));
}

.hero-content {
    max-width: 500px;
    z-index: 2;
}

.hero-tag {
    display: inline-block;
    background-color: #e50914;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

.hero-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 24px;
    line-height: 1.6;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #e50914;
    color: #ffffff;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.2s;
}

.hero-btn:hover {
    background-color: #c00812;
}

.hero-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transform: scaleX(-1);
}

.hero-slider-dots {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 5;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.hero-dot.active {
    background-color: #e50914;
    width: 24px;
    border-radius: 5px;
}

/* ================= 热门频道 ================= */
.hot-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hot-grid::-webkit-scrollbar {
    display: none;
}

.hot-card {
    flex: 0 0 280px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e6eb;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
}

.hot-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    flex-shrink: 0;
}

.hot-logo img {
    height: 50px;
    border: 1px solid #eeeeee;
    border-radius: 5px;
}

.hot-info {
    flex: 1;
    min-width: 0;
}

.hot-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2329;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-desc {
    font-size: 13px;
    color: #8f959e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-nav-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hot-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #e5e6eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4e5969;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.hot-nav-btn:hover:not(:disabled) {
    background-color: #f2f4f7;
    border-color: #d1d5db;
    color: #e50914;
}

.hot-nav-btn:active:not(:disabled) {
    transform: scale(0.94);
}

.hot-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.hot-nav-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    transform: scaleX(-1);
    /* RTL 翻转箭头 */
}

/* ================= 横向滚动模块 ================= */
.scroll-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.scroll-row::-webkit-scrollbar {
    display: none;
}

.scroll-card {
    flex: 0 0 200px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e6eb;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: all 0.2s ease;
}

.scroll-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.scroll-img-box {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    position: relative;
}

.scroll-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.scroll-card:hover .play-icon-overlay {
    opacity: 1;
}

.play-icon-overlay svg {
    width: 16px;
    height: 16px;
    fill: #ffffff;
    margin-right: 2px;
    /* RTL 翻转 */
    transform: scaleX(-1);
}

.scroll-name {
    padding: 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1f2329;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid #f2f4f7;
}

.scroll-tag {
    position: absolute;
    left: 5px;
    /* RTL 翻转 */
    bottom: 5px;
    font-size: 12px;
    background: #e50914;
    color: #ffffff;
    border-radius: 10px;
    padding: 1px 10px;
}

/* ================= 播放页 ================= */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-wrapper {
    background-color: #000000;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 655px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-inner {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.video-inner.pip-mode {
    position: fixed;
    bottom: 24px;
    left: 24px;
    /* RTL 翻转：画中画在左下角 */
    width: 400px;
    height: 225px;
    z-index: 9999;
    border: 2px solid #e50914;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.video-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    gap: 12px;
    border: none;
}

.video-content svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
    fill: #6b7280;
}

.video-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.player-info-bar {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease;
    position: relative;
    z-index: 50;
    flex-wrap: wrap;
    gap: 12px;
}

.channel-title-box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.channel-logo-small {
    width: 80px;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.channel-logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #e5e6eb;
}

.channel-title-text h1 {
    font-size: 16px;
    font-weight: 600;
}

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.live-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.control-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: #4e5969;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.control-btn:hover {
    background-color: #f2f4f7;
    border-color: #d1d5db;
}

.control-btn.active {
    background-color: #fff7ed;
    color: #ea580c;
    border-color: #fdba74;
}

.control-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===== 右侧侧边栏（播放页内） ===== */
.sidebar {
    width: 380px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateX(0);
    flex-shrink: 0;
}

.sidebar.hidden {
    width: 0;
    opacity: 0;
    transform: translateX(-20px);
    /* RTL 翻转 */
    overflow: hidden;
    margin-right: -24px;
    /* RTL 翻转 */
    pointer-events: none;
}

.sidebar-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease;
}

.channel-logo-large {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.channel-logo-large img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
}

.channel-title {
    display: flex;
    font-size: 16px;
    justify-content: center;
    margin: 10px 0;
    line-height: 1.4;
    word-break: break-word;
}

.current-channel-info {
    width: 100%;
    padding: 0 15px;
}

.meta-info-inline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13.5px;
    color: #8f959e;
    padding-top: 8px;
    border-top: 1px solid #f2f4f7;
}

.meta-info-inline ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-info-inline li {
    display: flex;
    align-items: flex-start;
    padding: 6px 0;
    border-bottom: 1px solid #8f959e1f;
    font-size: 0.8125rem;
    line-height: 1.55;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.meta-info-inline li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-info-inline li svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-left: 5px;
    /* RTL 翻转 */
    margin-top: 2px;
    color: #8f959e;
    stroke: currentColor;
}

.meta-info-inline li a {
    margin-right: 10px;
    /* RTL 翻转 */
    color: #e50914;
}

.meta-info-inline li a:hover {
    color: #4CAF50;
}

/* ===== Tabs ===== */
.tabs-container {
    padding: 0;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #e5e6eb;
    margin-bottom: 16px;
    justify-content: space-between;
}

.tab {
    padding: 12px 16px;
    font-size: 14px;
    color: #4e5969;
    cursor: pointer;
    position: relative;
    font-weight: 500;
    transition: color 0.2s;
    user-select: none;
}

.tab:hover {
    color: #1f2329;
}

.tab.active {
    color: #e50914;
    font-weight: 600;
}

.tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e50914;
    border-radius: 2px 2px 0 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content-ad,
.tab-content-text {
    background-color: #f8f9fa;
    justify-content: center;
    color: #8f959e;
    font-size: 14px;
    border-radius: 8px;
    padding: 10px;
    line-height: 30px;
}

.tab-content-ad {
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.donate-txt {
    color: #f44336;
}

/* ===== 推荐 ===== */
.recommend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.recommend-item {
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #ffffff;
}

.recommend-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.recommend-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.recommend-logo img {
    height: 100%;
    object-fit: contain;
    border: 1px solid #e5e6eb;
    border-radius: 8px;
    max-width: 100%;
}

.recommend-name {
    font-size: 13px;
    color: #4e5969;
    font-weight: 500;
}

/* ================= 弹层 ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    min-width: 300px;
    max-width: 80%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    /* RTL 翻转 */
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f2f4f7;
    color: #4e5969;
    cursor: pointer;
}

.modal-close:hover {
    background-color: #e5e6eb;
}

.modal-close svg:hover {
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.qrcode-img {
    width: 200px;
    height: 200px;
    background-color: #f2f4f7;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
    color: #8f959e;
    padding: 10px;
}

.api-info {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.875rem;
    line-height: 1.6;
    word-break: break-all;
    text-align: right;
    /* RTL 翻转 */
}

.api-info p {
    margin: 0 0 8px;
}

.api-embed-label {
    float: right;
    /* RTL 翻转 */
    font-size: 14px;
    padding: 10px 0;
}

.nettv-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #374151;
    background: #f9fafb;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    cursor: pointer;
    align-self: flex-start;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

.mt-1 {
    margin-top: 10px;
}

/* ================= 返回顶部 ================= */
#backToTopBtn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* RTL 翻转 */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #4e5969;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid #e5e6eb;
}

#backToTopBtn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTopBtn:hover {
    background-color: #f2f4f7;
    color: #e50914;
}

#backToTopBtn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* ================= 友情链接 ================= */
.links {
    background-color: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.links ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.links li {
    font-size: 13px;
    line-height: 1.8;
    color: #8f959e;
    white-space: nowrap;
}

.links li:first-child {
    color: #1f2329;
    font-weight: 600;
    margin-left: 4px;
    /* RTL 翻转 */
}

.links li a {
    color: #4e5969;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.links li a:hover {
    color: #e50914;
}

.links li:last-child {
    margin-right: auto;
    /* RTL 翻转 */
}

.links li:last-child a {
    color: #8f959e;
}

.links li:last-child a:hover {
    color: #e50914;
}

/* ================= 底部 Footer ================= */
.footer {
    background-color: #ffffff;
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: #8f959e;
    margin-top: auto;
    border-top: 1px solid #e5e6eb;
    transition: background-color 0.3s ease;
}

.footer p {
    margin-bottom: 8px;
}

.footer a {
    color: #4e5969;
    margin: 0 8px;
}

.footer a:hover {
    color: #e50914;
}

/* ================= 标签组 ================= */
.channel-tag {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    row-gap: 8px;
    width: 100%;
    margin: 12px 0;
    box-sizing: border-box;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 24px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease;
}

.channel-tag .channel-tag-title {
    flex: 0 0 100%;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.channel-tag .channel-tag-title::before {
    content: "";
    display: block;
    width: 4px;
    height: 18px;
    background-color: #e50914;
    border-radius: 2px;
    margin-left: 8px;
    /* RTL 翻转 */
}

.channel-tag .tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.channel-tag .tag a {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.8125rem;
    line-height: 1.4;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    transition: color 0.2s ease;
}

/* ================= 提交表单 ================= */
.submit-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.announcement-container {
    background-color: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #ea580c;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.announcement-icon {
    width: 20px;
    height: 20px;
    fill: #ea580c;
    flex-shrink: 0;
    margin-top: 2px;
}

.form-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
}

.form-container {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 32px 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e6eb;
}

.form-row {
    display: flex;
    margin-bottom: 24px;
}

.form-label {
    width: 100px;
    flex-shrink: 0;
    padding-top: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1f2329;
    text-align: left;
    /* RTL 翻转 */
    padding-left: 16px;
    /* RTL 翻转 */
}

.form-control-box {
    flex: 1;
    position: relative;
}

.form-control-box.required::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 0;
    /* RTL 翻转 */
    width: 4px;
    background-color: #e50914;
    border-radius: 2px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2329;
    background-color: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #e50914;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-right: 100px;
    /* RTL 翻转 */
}

.btn-submit {
    background-color: #00a870;
    color: #ffffff;
    padding: 10px 40px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
}

.btn-reset {
    background-color: #e50914;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
}

.sidebar-info {
    width: 300px;
    flex-shrink: 0;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e6eb;
}

.about-section {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 24px;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease;
    min-width: 0;
}

.about-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.about-section .about-title::before {
    content: "";
    display: block;
    width: 4px;
    height: 18px;
    background-color: #e50914;
    border-radius: 2px;
    margin-right: 8px;
}

.about-section p {
    font-size: 14px;
    color: #4e5969;
    line-height: 1.6;
}

.ad-section-bottom {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #8f959e;
    font-size: 14px;
    border: 1px dashed #d1d5db;
    transition: background-color 0.3s ease;
    position: relative;
}

.about-body {
    color: #7f7f7f;
}

.share-icons {
    display: grid;
    justify-content: space-around;
    margin-top: 10px;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.share-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #4e5969;
    cursor: pointer;
}

.share-icon-item svg {
    width: 32px;
    height: 32px;
}

.sharer-btn {
    display: grid;
}

.sharer-btn svg {
    width: 32px;
    height: 32px;
}

.sharer-btn.qzone .sharer-icon {
    color: #f5c926;
}


.sharer-btn.facebook .sharer-icon {
    color: #1877f2;
}

.sharer-btn.twitter .sharer-icon {
    color: #000;
}

.sharer-btn.weibo .sharer-icon {
    color: #e6162d;
}

.sharer-btn.telegram .sharer-icon {
    color: #229ed9;
}

.sharer-btn.whatsapp .sharer-icon {
    color: #25d366;
}

.sharer-btn.linkedin .sharer-icon {
    color: #0a66c2;
}

.sharer-btn.reddit .sharer-icon {
    color: #ff4500;
}

.sharer-btn.pinterest .sharer-icon {
    color: #e60023;
}

.sharer-btn.viber .sharer-icon {
    color: #7c60f2;
}

.sharer-btn.myspace .sharer-icon {
    color: #000000;
}

.sharer-btn.blogger .sharer-icon {
    color: #fe6602;
}

.sharer-btn.evernote .sharer-icon {
    color: #00a82d;
}

.sharer-btn.flipboard .sharer-icon {
    color: #e60023;
}

.sharer-btn.stumbleupon .sharer-icon {
    color: #eb4823;
}

.sharer-btn.digg .sharer-icon {
    color: #000000;
}

.sharer-btn.pocket .sharer-icon {
    color: #ee4257;
}

.sharer-btn.instapaper .sharer-icon {
    color: #2a2a2a;
}

.listpage-header {
    background-color: #1a2a44;
    background-image: linear-gradient(to right,
            rgba(26, 42, 68, 0.8),
            rgba(26, 42, 68, 0.4)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="%232a4d79"/><path d="M200 50 Q300 100 200 200 T400 300" stroke="%23456a9c" stroke-width="2" fill="none" opacity="0.5"/><circle cx="600" cy="150" r="100" fill="%23366599" opacity="0.3"/><path d="M700 50 L800 100 L750 200 L850 250" stroke="%23456a9c" stroke-width="3" fill="none" opacity="0.5"/></svg>');
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    padding: 40px;
    color: #ffffff;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.listpage-left {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

.listpage-icon-box {
    width: 120px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listpage-icon-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.listpage-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #ffffff;
}

.listpage-text p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.listpage-right {
    display: flex;
    align-items: center;
    gap: 16px;
    z-index: 2;
}

.listpage-search {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 4px;
    padding: 8px 12px;
    border: 1px solid;
    width: 260px;
}

.listpage-search form {
    display: flex;
    align-items: center;
    width: 100%;
}

.listpage-search input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 13px;
    color: #1f2329;
}

.listpage-search svg {
    width: 18px;
    height: 18px;
    fill: #8f959e;
    margin-right: 8px;
}

.listpage-stat {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.country-tags-box {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.country-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.country-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 13px;
    color: #4e5969;
    background: #f2f4f7;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.country-tag:hover {
    background: #e5e6eb;
}

.country-tag.active {
    background: #e50914;
    color: #ffffff;
    font-weight: 500;
}

.ad-banner {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #8f959e;
    font-size: 14px;
    border: 1px dashed #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: background-color 0.3s ease;
    letter-spacing: 1px;
    position: relative;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.channel-card {
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e6eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.channel-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.card-logo-area {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #ffffff;
}

.card-logo-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-name-area {
    padding: 12px;
    border-top: 1px solid #f2f4f7;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1f2329;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    margin-bottom: 16px;
}

.pagination li {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: #4e5969;
    background-color: #ffffff;
    border: 1px solid #e5e6eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pagination li.selected {
    background-color: #e50914;
    border-color: #e50914;
    color: #ffffff;
    font-weight: 500;
}

.pagination li:hover:not(.disabled):not(.ellipsis) {
    background-color: #f2f4f7;
    border-color: #d1d5db;
    color: #1f2329;
}

.pagination li.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    background-color: #f2f4f7;
    border-color: #e5e6eb;
}

.pagination li.ellipsis {
    cursor: default;
    border-color: transparent;
    background-color: transparent;
    color: #8f959e;
}

.pagination li a {
    display: flex;
    align-items: center;
}

.pagination li svg {
    width: 14px;
}

.pagination li.maininfo {
    margin-right: 5px;
}

.pagination li.thisclass {
    background-color: #F44336;
    color: #fff;
}

.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #4e5969;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.page-item:hover {
    background: #f2f4f7;
}

.page-item.active {
    background: #e50914;
    color: #ffffff;
    font-weight: 600;
}

.page-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-item.ellipsis {
    cursor: default;
    pointer-events: none;
}

/* ================= 各种页面排版修复（关于我们、免责声明、Logo历史） ================= */
.about-section .about-title::before,
.disclaimer-section h2 .disclaimer-num,
.donate-section-tag::before,
.guide-section-tag::before,
.adpage-section-tag::before {
    margin-left: 8px;
    /* RTL 翻转 */
}

.donate-hero::before,
.disclaimer-hero::before,
.aboutpage-hero::before,
.logohistory-hero::before,
.guide-hero::before,
.adpage-hero::before {
    right: auto;
    left: -80px;
    /* RTL 翻转 */
}

.donate-hero::after,
.disclaimer-hero::after,
.aboutpage-hero::after,
.logohistory-hero::after,
.guide-hero::after,
.adpage-hero::after {
    left: auto;
    right: -60px;
    /* RTL 翻转 */
}

.disclaimer-toc-list a.active::before {
    left: auto;
    right: 0;
    /* RTL 翻转 */
}

.disclaimer-section ul,
.disclaimer-section ol {
    padding-left: 0;
    padding-right: 20px;
    /* RTL 翻转 */
}

.aboutpage-timeline {
    padding: 8px 40px 8px 0;
    /* RTL 翻转 */
}

.aboutpage-timeline::before {
    left: auto;
    right: 12px;
    /* RTL 翻转 */
}

.aboutpage-timeline-dot {
    left: auto;
    right: -34px;
    /* RTL 翻转 */
}

.logohistory-timeline {
    padding-left: 0;
    padding-right: 32px;
    /* RTL 翻转 */
}

.logohistory-timeline::before {
    left: auto;
    right: 11px;
    /* RTL 翻转 */
}

.logohistory-item-dot {
    left: auto;
    right: -32px;
    /* RTL 翻转 */
}

.logohistory-do-list li {
    padding-left: 0;
    padding-right: 14px;
}

.logohistory-do-list li::before {
    left: auto;
    right: 0;
}

#vdimgck {
    float: left;
    /* RTL 翻转 */
    margin: -33px 0 0 10px;
    /* RTL 翻转 */
}

/* ================= 深色模式 (RTL 适配) ================= */
body.dark-mode .sidebar-nav {
    border-left-color: #333333;
    border-right-color: transparent;
}

body.dark-mode .dropdown-menu.right-align {
    right: auto;
    left: 0;
}

/* ================= 响应式 (RTL 适配) ================= */
@media (max-width: 1024px) {

    /* 移动端侧边栏从右侧滑出 */
    .sidebar-nav {
        position: fixed;
        top: 64px;
        right: 0;
        /* RTL 翻转 */
        left: auto;
        height: calc(100vh - 64px);
        z-index: 99;
        transform: translateX(100%);
        /* RTL 翻转 */
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
        /* RTL 翻转 */
        transition: transform 0.3s ease;
    }

    .sidebar-nav.active-drawer {
        transform: translateX(0);
    }

    .sidebar-nav.hidden-nav {
        transform: translateX(100%);
        /* RTL 翻转 */
        opacity: 1;
        width: 240px;
    }

    .sidebar-nav-mobile {
        left: auto;
        right: 0;
        transform: translateX(100%);
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    }

    .sidebar-nav-mobile.active-drawer {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .form-label {
        text-align: right;
        /* 移动端表单标签靠右 */
        padding-left: 0;
    }

    .form-actions {
        padding-right: 0;
    }

    .video-inner.pip-mode {
        left: 16px;
        /* RTL 翻转 */
        right: auto;
    }

    #backToTopBtn {
        left: 20px;
        /* RTL 翻转 */
        right: auto;
    }
}

/* ============ Head 搜索历史 ============ */
.search-bar.pc-search {
    position: relative;
}

.search-bar.pc-search svg {
    width: 18px;
    height: 18px;
    fill: #8F959E;
    margin-top: 3px;
}

.search-bar svg {
    width: 18px;
    height: 18px;
    fill: #8F959E;
    margin-top: 3px;
}

.search-history-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    min-width: 280px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 25, 50, .14);
    padding: 8px;
    display: none;
    z-index: 999;
}

.search-history-panel.is-open {
    display: block;
}

.search-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 9px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #9aa1ac;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    margin-bottom: 6px;
}

.search-history-clear {
    border: 0;
    background: none;
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    color: #9aa1ac;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 5px;
    transition: .15s ease;
}

.search-history-clear:hover {
    color: #ff5a36;
    background: rgba(255, 90, 54, .08);
}

.search-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow-y: auto;
}

.search-history-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13.5px;
    color: #4a5260;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-history-item:hover {
    background: #f8f9fa;
    color: #F44336;
}

.search-history-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    fill: #c9cfd8;
}

.search-history-item:hover svg {
    fill: #F44336;
}

.search-history-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-history-empty {
    padding: 20px 10px;
    text-align: center;
    font-size: 12.5px;
    color: #9aa1ac;
}

input.go {
    color: #4e5969;
    border: none;
    font-weight: 600;
    background: none;
}

.theme-switch {
    flex-shrink: 0;
    width: 56px;
    height: 30px;
    padding: 0;
    border-radius: 15px;
    background: none;
    -webkit-tap-highlight-color: transparent;
}

.theme-switch-track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    background-color: #E5E6EB;
    transition: background-color 0.3s ease;
}

.theme-switch:hover .theme-switch-track {
    background-color: #D1D5DB;
}

.theme-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6d6d6d url(/images/earth.gif);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
    will-change: transform;
}

/* 圓點內的太陽 / 月亮圖示 */
.theme-switch-thumb .theme-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translate(-50%, -50%);
    transition: opacity 0.25s ease, fill 0.25s ease;
}

.icon-sun {
    opacity: 1;
    fill: #F59E0B;
}

.icon-moon {
    opacity: 0;
    fill: #4E5969;
}

/* 深色模式：圓點右移、軌道變深 */
body.dark-mode .theme-switch-track {
    background-color: #3A3A3A;
}

body.dark-mode .theme-switch:hover .theme-switch-track {
    background-color: #454545;
}

body.dark-mode .theme-switch-thumb {
    transform: translateX(26px);
    background-color: #E4E6EB;
}

body.dark-mode .icon-sun {
    opacity: 0;
}

body.dark-mode .icon-moon {
    opacity: 1;
    fill: #1F2329;
}

/* 鍵盤聚焦提示 */
.theme-switch:focus-visible .theme-switch-track {
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.25);
}

/* ================= 深色模式 (完整版 RTL 适配) ================= */
body.dark-mode {
    background-color: #121212;
    color: #e4e6eb;
}

/* 容器统一深色背景 */
body.dark-mode .header,
body.dark-mode .sidebar-nav,
body.dark-mode .country-tags-box,
body.dark-mode .channel-card,
body.dark-mode .hot-card,
body.dark-mode .scroll-card,
body.dark-mode .links,
body.dark-mode .form-container,
body.dark-mode .sidebar-info,
body.dark-mode .footer,
body.dark-mode #backToTopBtn,
body.dark-mode .dropdown-btn,
body.dark-mode .dropdown-menu,
body.dark-mode .mobile-search-dropdown,
body.dark-mode .ad-banner,
body.dark-mode .page-item,
body.dark-mode .player-info-bar,
body.dark-mode .about-section,
body.dark-mode .ad-section-bottom,
body.dark-mode .channel-tag,
body.dark-mode .sidebar-card,
body.dark-mode .recommend-item,
body.dark-mode .control-btn,
body.dark-mode .modal-content,
body.dark-mode .pagination li,
body.dark-mode .api-info,
body.dark-mode .nettv-textarea,
body.dark-mode .tab-content-ad,
body.dark-mode .tab-content-text,
body.dark-mode .search-history-panel {
    background-color: #1e1e1e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    border-color: #333333;
}

/* 侧边栏边框翻转 */
body.dark-mode .sidebar-nav {
    border-left-color: #333333;
    /* RTL 翻转 */
    border-right-color: transparent;
}

body.dark-mode .nav-group,
body.dark-mode .nav-btns {
    border-bottom-color: #333333;
}

body.dark-mode .nav-item {
    color: #8f959e;
}

body.dark-mode .nav-item:hover {
    background-color: #2a2a2a;
}

body.dark-mode .nav-item.active {
    background-color: #2a2a2a;
    color: #e4e6eb;
}

body.dark-mode .nav-item.active svg {
    fill: #e4e6eb;
}

body.dark-mode .search-bar input {
    color: #8F959E;
}

/* 语言选择 */
body.dark-mode .lang-select-btn,
body.dark-mode .lang-select-menu {
    background-color: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .lang-select-btn {
    color: #e4e6eb;
}

body.dark-mode .lang-select-btn:hover {
    background-color: #3a3a3a;
}

body.dark-mode .lang-select-arrow {
    fill: #e4e6eb;
}

body.dark-mode .lang-select-item {
    color: #8f959e;
}

body.dark-mode .lang-select-item:hover {
    background-color: #2a2a2a;
    color: #e4e6eb;
}

body.dark-mode .lang-select-item.active {
    background-color: rgba(234, 88, 12, 0.15);
    color: #f97316;
}

body.dark-mode .lang-select-divider {
    background: #333333;
}

body.dark-mode .lang-select-menu::-webkit-scrollbar-thumb {
    background: #4a4a4a;
}

body.dark-mode [class*="span-flag-"] {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

/* 专题折叠菜单 */
body.dark-mode .nav-toggle-arrow {
    fill: #8f959e;
}

body.dark-mode .nav-item-toggle.active {
    color: #e4e6eb;
}

body.dark-mode .nav-subitem {
    color: #8f959e;
}

body.dark-mode .nav-subitem:hover {
    background-color: #2a2a2a;
    color: #e4e6eb;
}

body.dark-mode .nav-subitem::before {
    background: #4a4a4a;
}

body.dark-mode .nav-subitem:hover::before {
    background: #f87171;
}

/* Hero */
body.dark-mode .hero-banner {
    background-image: linear-gradient(to right,
            rgba(18, 18, 18, 0.8),
            rgba(18, 18, 18, 0.4)),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="%231a1a1a"/><path d="M200 50 Q300 100 200 200 T400 300" stroke="%23333" stroke-width="2" fill="none" opacity="0.5"/></svg>');
    background-color: #1a1a1a;
    border: 1px solid #333333;
}

body.dark-mode .hero-search {
    background-color: #2a2a2a;
}

body.dark-mode .hero-search input {
    color: #e4e6eb;
}

/* 热门频道 */
body.dark-mode .hot-nav-btn {
    background-color: #1e1e1e;
    border-color: #333333;
    color: #b0b3b8;
}

body.dark-mode .hot-nav-btn:hover:not(:disabled) {
    background-color: #3a3a3a;
    border-color: #4a4a4a;
    color: #f87171;
}

/* 章节标题 / 卡片文字 */
body.dark-mode .section-title {
    color: #e4e6eb;
}

body.dark-mode .section-more:hover {
    color: #f87171;
}

body.dark-mode .hot-name,
body.dark-mode .scroll-name {
    color: #e4e6eb;
}

body.dark-mode .hot-logo,
body.dark-mode .scroll-img-box {
    background-color: #2a2a2a;
}

body.dark-mode .scroll-name {
    border-top-color: #333333;
}

body.dark-mode .hot-card:hover,
body.dark-mode .scroll-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: #4a4a4a;
}

/* 列表页 */
body.dark-mode .country-tag {
    color: #8f959e;
}

body.dark-mode .country-tag:hover {
    color: #f87171;
    background-color: rgba(248, 113, 113, 0.1);
}

body.dark-mode .country-tag.active {
    color: #ffffff;
}

body.dark-mode .ad-banner {
    border-color: #444444;
    color: #6b7280;
}

body.dark-mode .card-logo-area {
    background-color: #1e1e1e;
}

body.dark-mode .card-name-area {
    border-top-color: #333333;
    color: #e4e6eb;
}

body.dark-mode .channel-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: #4a4a4a;
}

body.dark-mode .page-item {
    color: #8f959e;
}

body.dark-mode .page-item:hover:not(.disabled):not(.ellipsis) {
    background-color: #2a2a2a;
    border-color: #4a4a4a;
    color: #e4e6eb;
}

/* 分页状态 */
body.dark-mode .page-item.active {
    background-color: #e50914;
    border-color: #e50914;
    color: #ffffff;
}

body.dark-mode .page-item.disabled {
    background-color: #2a2a2a;
    color: #4a4a4a;
    border-color: #333333;
}

body.dark-mode .page-item.ellipsis {
    color: #6b7280;
}

/* 搜索与图标按钮 */
body.dark-mode .search-bar,
body.dark-mode .icon-btn {
    background-color: #2a2a2a;
    color: #e4e6eb;
    border-color: transparent;
}

body.dark-mode .icon-btn:hover,
body.dark-mode .dropdown-btn:hover {
    background-color: #3a3a3a;
}

body.dark-mode .dropdown-btn .arrow-down {
    fill: #e4e6eb;
}

body.dark-mode .dropdown-item {
    color: #8f959e;
}

body.dark-mode .dropdown-item:hover {
    background-color: #2a2a2a;
}

body.dark-mode .dropdown-item.active {
    background-color: rgba(234, 88, 12, 0.15);
    color: #f97316;
}

body.dark-mode .dropdown-menu.right-align {
    right: auto;
    left: 0;
}

/* 表单与提示 */
body.dark-mode .announcement-container {
    background-color: rgba(234, 88, 12, 0.1);
    border-color: rgba(234, 88, 12, 0.3);
    color: #f97316;
}

body.dark-mode .announcement-icon {
    fill: #f97316;
}

body.dark-mode .form-label,
body.dark-mode .info-title {
    color: #e4e6eb;
}

body.dark-mode .info-title {
    border-bottom-color: #333333;
}

body.dark-mode .info-item {
    color: #8f959e;
}

body.dark-mode .info-item strong {
    color: #e4e6eb;
}

body.dark-mode .form-input,
body.dark-mode .form-textarea {
    background-color: #2a2a2a;
    border-color: #3a3a3a;
    color: #e4e6eb;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-textarea:focus {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

/* Footer / Links */
body.dark-mode .footer {
    border-top-color: #333333;
}

body.dark-mode .footer a {
    color: #b0b3b8;
}

body.dark-mode .nav-links a:hover {
    color: #e4e6eb;
}

body.dark-mode .links {
    border-color: #333333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .links li:first-child {
    color: #e4e6eb;
}

body.dark-mode .links li a {
    color: #b0b3b8;
}

body.dark-mode .links li a:hover {
    color: #f87171;
}

/* 标签组 / 当前频道卡片 */
body.dark-mode .channel-tag .channel-tag-title {
    color: #e2e8f0;
}

body.dark-mode .channel-tag .tag {
    border-color: #323131;
    background-color: #1e1e1e;
}

body.dark-mode .channel-tag .tag a {
    color: #cbd5e1;
}

body.dark-mode .channel-tag .tag:hover {
    background: #3b82f6;
    border-color: #3b82f6;
}

body.dark-mode .channel-tag .tag:hover a {
    color: #ffffff;
}

body.dark-mode .current-channel-card {
    --card-bg: #1f2937;
    --card-border: #374151;
    --card-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --title-color: #f9fafb;
    --text-color: #d1d5db;
    --muted-color: #9ca3af;
    --icon-color: #9ca3af;
    --divider-color: #374151;
}

/* 用户下拉菜单 (Header) */
body.dark-mode .user-dropdown .dropdown-divider {
    background: #333333;
}

body.dark-mode .user-dropdown.active>.icon-btn {
    background-color: #3a3a3a;
    color: #f87171;
}

body.dark-mode .user-avatar {
    background: #2a2a2a;
}

body.dark-mode .user-menu-avatar {
    border-color: #3a3a3a;
    background: #2a2a2a;
}

body.dark-mode .user-menu-nickname {
    color: #e4e6eb;
}

body.dark-mode .user-menu-username {
    color: #8f959e;
}

body.dark-mode .user-dropdown .dropdown-item.user-logout {
    color: #f87171;
}

body.dark-mode .user-dropdown .dropdown-item.user-logout:hover {
    background-color: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

/* 针对其他特殊页面（关于、免责、赞助等）的深色模式适配补充 */
body.dark-mode .donate-hero,
body.dark-mode .disclaimer-hero,
body.dark-mode .aboutpage-hero,
body.dark-mode .logohistory-hero,
body.dark-mode .guide-hero,
body.dark-mode .adpage-hero {
    background: linear-gradient(135deg, #0f1825 0%, #1a2a44 100%);
}

body.dark-mode .donate-method,
body.dark-mode .donate-benefit,
body.dark-mode .donate-sponsors,
body.dark-mode .donate-faq-item,
body.dark-mode .disclaimer-toc,
body.dark-mode .disclaimer-body,
body.dark-mode .aboutpage-intro-text,
body.dark-mode .aboutpage-value-card,
body.dark-mode .logohistory-current,
body.dark-mode .logohistory-card,
body.dark-mode .logohistory-color,
body.dark-mode .logohistory-typeface,
body.dark-mode .logohistory-download,
body.dark-mode .logohistory-do,
body.dark-mode .guide-step,
body.dark-mode .guide-device,
body.dark-mode .guide-faq-item,
body.dark-mode .adpage-stat,
body.dark-mode .adpage-slot,
body.dark-mode .adpage-step,
body.dark-mode .adpage-plan,
body.dark-mode .adpage-faq-item {
    background-color: #1e1e1e;
    border-color: #333333;
}

body.dark-mode .disclaimer-toc-list a.active::before,
body.dark-mode .aboutpage-timeline::before,
body.dark-mode .logohistory-timeline::before {
    background-color: #e50914;
}

body.dark-mode .aboutpage-timeline-dot,
body.dark-mode .logohistory-item-dot {
    background-color: #1e1e1e;
    border-color: #4a4a4a;
}

/* ================= 响应式 (完整 RTL 适配) ================= */

/* ---------- ≤1200px ---------- */
@media (max-width: 1200px) {
    .search-bar {
        width: 240px;
    }

    /* 表单双栏改单栏 */
    .form-layout {
        flex-direction: column;
        align-items: stretch;
    }

    .sidebar-info {
        width: 100%;
    }

    .form-actions {
        padding-right: 0;
        /* RTL 翻转 */
    }

    /* 中等屏播放页：侧栏收窄，避免主内容被挤爆 */
    .main-container {
        gap: 16px;
        padding: 20px;
    }

    .sidebar {
        width: 320px;
    }
}

/* ---------- ≤1024px ---------- */
@media (max-width: 1024px) {

    /* 搜索切换 */
    .search-bar.pc-search {
        display: none;
    }

    .mobile-search-trigger {
        display: flex;
    }

    /* 页面布局：侧栏变抽屉，主内容整行 */
    .page-layout {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    /* 移动端侧边栏从右侧滑出 */
    .sidebar-nav {
        position: fixed;
        top: 64px;
        right: 0;
        /* RTL 翻转 */
        left: auto;
        height: calc(100vh - 64px);
        z-index: 99;
        transform: translateX(100%);
        /* RTL 翻转：从右侧隐藏 */
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
        /* RTL 翻转：阴影在左侧 */
        transition: transform 0.3s ease;
    }

    .sidebar-nav.active-drawer {
        transform: translateX(0);
    }

    .sidebar-nav.hidden-nav {
        transform: translateX(100%);
        /* RTL 翻转 */
        opacity: 1;
        width: 240px;
    }

    /* 关键：column 方向下必须 stretch，否则 content-area 不撑满 */
    .page-layout>.main-container {
        flex: none;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .content-area,
    .sidebar {
        width: 100%;
    }

    .sidebar.hidden {
        display: none;
    }

    /* 备用移动端抽屉 */
    .sidebar-nav-mobile {
        position: fixed;
        top: 0;
        right: 0;
        /* RTL 翻转 */
        left: auto;
        width: 280px;
        height: 100vh;
        background: #ffffff;
        z-index: 999;
        transform: translateX(100%);
        /* RTL 翻转 */
        transition: transform 0.3s ease;
        overflow-y: auto;
        box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
        /* RTL 翻转 */
    }

    .sidebar-nav-mobile.active-drawer {
        transform: translateX(0);
    }

    /* Hero */
    .hero-banner {
        padding: 24px;
        min-height: 220px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-desc {
        font-size: 14px;
    }

    /* 列表页头部 */
    .listpage-header {
        padding: 28px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        min-height: auto;
    }

    .listpage-right {
        width: 100%;
        gap: 12px;
    }

    .listpage-stat {
        font-size: 12px;
        padding: 0px 10px;
    }

    .listpage-search {
        width: 100%;
    }

    /* 播放页视频不再受 655px 限制 */
    .video-wrapper {
        max-height: none;
    }

    .donate-methods {
        grid-template-columns: 1fr;
    }

    .donate-benefits {
        grid-template-columns: 1fr 1fr;
    }

    .disclaimer-layout {
        flex-direction: column;
    }

    .disclaimer-toc {
        width: 100%;
        position: static;
        max-height: none;
        order: -1;
    }

    .disclaimer-toc-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }

    .disclaimer-toc-list a {
        padding: 6px 12px;
        background-color: #f2f4f7;
        border-radius: 999px;
        white-space: nowrap;
    }

    .disclaimer-toc-list a.active::before {
        display: none;
    }

    body.dark-mode .disclaimer-toc-list a {
        background-color: #2a2a2a;
    }

    .disclaimer-body {
        padding: 24px;
    }

    /* 关于页、Logo历史页、指南页的响应式 */
    .aboutpage-intro {
        flex-direction: column;
    }

    .aboutpage-brand-card {
        width: 100%;
        padding: 32px 24px;
    }

    .aboutpage-values {
        grid-template-columns: 1fr 1fr;
    }

    .logohistory-palette {
        grid-template-columns: repeat(2, 1fr);
    }

    .logohistory-downloads {
        grid-template-columns: repeat(2, 1fr);
    }

    .logohistory-current {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px;
        gap: 24px;
    }

    .logohistory-current-logo {
        width: 160px;
        height: 160px;
    }

    .guide-steps {
        grid-template-columns: 1fr;
    }

    .guide-steps::before {
        display: none;
    }

    .guide-step {
        flex-direction: row;
        text-align: right;
        /* RTL 翻转 */
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .guide-step-icon {
        margin-bottom: 0;
        width: 48px;
        height: 48px;
        border-width: 2px;
    }

    .guide-step-icon svg {
        width: 22px;
        height: 22px;
    }

    .guide-devices {
        grid-template-columns: 1fr;
    }

    .guide-tips {
        grid-template-columns: 1fr;
    }

    .adpage-stats {
        grid-template-columns: 1fr 1fr;
    }

    .adpage-steps {
        grid-template-columns: 1fr 1fr;
    }

    .adpage-steps::before {
        display: none;
    }

    .adpage-pricing {
        grid-template-columns: 1fr;
    }

    .adpage-plan {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
}

/* ---------- ≤768px ---------- */
@media (max-width: 768px) {
    .main-content {
        padding: 12px;
        gap: 16px;
    }

    .submit-wrapper {
        gap: 16px;
    }

    .announcement-container {
        padding: 12px 14px;
        font-size: 13px;
    }

    .form-container {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .form-actions {
        gap: 12px;
        margin-top: 24px;
    }

    /* 顶部导航紧凑 */
    .header {
        padding: 10px 12px;
        gap: 8px;
    }

    .header-left {
        gap: 8px;
        min-width: 0;
    }

    .header-left .logo-box {
        flex-shrink: 0;
    }

    .logo-box img {
        height: 32px;
    }

    .header-right {
        gap: 6px;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }

    .lang-select-btn {
        padding: 6px 8px 6px 24px;
        /* RTL 翻转 */
        font-size: 12px;
    }

    .lang-select-menu {
        min-width: 150px;
        max-height: 280px;
    }

    .lang-select-item {
        font-size: 12px;
    }

    .user-dropdown .dropdown-menu {
        min-width: 160px;
        max-width: calc(100vw - 24px);
    }

    /* 下拉菜单不溢出视口 */
    .lang-select-menu,
    .dropdown-menu {
        max-width: calc(100vw - 24px);
    }

    .video-inner.pip-mode {
        width: 280px;
        height: 157px;
        bottom: 16px;
        left: 16px;
        /* RTL 翻转 */
        right: auto;
    }

    .channel-title-text h1 {
        font-size: 17px;
    }

    /* 推荐 */
    .recommend-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* 返回顶部 */
    #backToTopBtn {
        bottom: 20px;
        left: 20px;
        /* RTL 翻转 */
        right: auto;
        width: 40px;
        height: 40px;
    }

    /* 友情链接 */
    .links {
        padding: 12px 14px;
    }

    /* 表单 */
    .form-row {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 20px;
    }

    .form-label {
        width: 100%;
        text-align: right;
        /* RTL 翻转 */
        padding-left: 0;
        /* RTL 翻转 */
        padding-top: 0;
        font-size: 14px;
    }

    #vdimgck {
        float: left;
        /* RTL 翻转 */
        margin: -33px 0 0 10px;
        /* RTL 翻转 */
        z-index: 99999999999;
        position: relative;
    }

    .btn-submit,
    .btn-reset {
        justify-content: center;
    }

    /* Tabs 可横向滚动，避免挤压 */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab {
        flex-shrink: 0;
        padding: 10px 12px;
        font-size: 13px;
    }

    /* 赞助页 */
    .donate-page,
    .donate-lang-block {
        gap: 24px;
    }

    .donate-hero {
        padding: 28px 24px 28px;
        padding-top: 60px;
    }

    .donate-hero h1 {
        font-size: 24px;
    }

    .donate-hero p {
        font-size: 14px;
    }

    .donate-lang-switch {
        top: 14px;
        left: 14px;
        /* RTL 翻转 */
        right: auto;
    }

    .donate-section-title {
        font-size: 19px;
    }

    .donate-method {
        padding: 20px;
        gap: 16px;
    }

    .donate-method-qr {
        width: 100px;
        height: 100px;
    }

    .donate-benefits {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .donate-benefit {
        padding: 20px;
    }

    .donate-sponsors {
        padding: 18px;
    }

    .donate-faq-q {
        padding: 14px 16px;
        font-size: 13.5px;
    }

    .donate-faq-a-inner {
        padding: 0 16px 14px;
        font-size: 13px;
    }

    .donate-cta {
        padding: 24px;
    }

    .donate-cta-content h3 {
        font-size: 18px;
    }

    .donate-cta-btn {
        flex: 1;
        justify-content: center;
    }

    /* 免责声明 */
    .disclaimer-page,
    .disclaimer-lang-block {
        gap: 24px;
    }

    .disclaimer-hero {
        padding: 28px 24px 28px;
        padding-top: 62px;
    }

    .disclaimer-hero h1 {
        font-size: 24px;
    }

    .disclaimer-hero>p {
        font-size: 14px;
    }

    .disclaimer-hero-meta {
        font-size: 12px;
        gap: 8px 16px;
    }

    .disclaimer-lang-switch {
        top: 14px;
        left: 14px;
        /* RTL 翻转 */
        right: auto;
    }

    .disclaimer-body {
        padding: 20px;
    }

    .disclaimer-section h2 {
        font-size: 17px;
    }

    .disclaimer-section h2 .disclaimer-num {
        width: 24px;
        height: 24px;
        font-size: 12px;
        border-radius: 6px;
    }

    .disclaimer-notice {
        padding: 14px 16px;
        font-size: 13px;
    }

    /* 关于页 */
    .aboutpage {
        gap: 24px;
    }

    .aboutpage-hero {
        padding: 28px 24px;
    }

    .aboutpage-hero h1 {
        font-size: 24px;
    }

    .aboutpage-hero p {
        font-size: 14px;
    }

    .aboutpage-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .aboutpage-stat {
        padding: 16px 10px;
    }

    .aboutpage-stat-num {
        font-size: 22px;
    }

    .aboutpage-stat-num small {
        font-size: 12px;
    }

    .aboutpage-intro-text {
        padding: 24px 20px;
    }

    .aboutpage-section-title {
        font-size: 19px;
    }

    .aboutpage-values {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .aboutpage-value-card {
        padding: 20px;
    }

    .aboutpage-timeline {
        padding-right: 32px;
        padding-left: 0;
    }

    /* RTL 翻转 */
    .aboutpage-timeline::before {
        right: 8px;
        left: auto;
    }

    /* RTL 翻转 */
    .aboutpage-timeline-dot {
        right: -30px;
        left: auto;
        width: 12px;
        height: 12px;
        border-width: 2px;
    }

    /* RTL 翻转 */
    .aboutpage-cta {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .aboutpage-cta-content h3 {
        font-size: 18px;
    }

    .aboutpage-cta-actions {
        width: 100%;
    }

    .aboutpage-cta-btn {
        flex: 1;
        justify-content: center;
    }

    /* Logo历史页 */
    .logohistory-page,
    .logohistory-lang-block {
        gap: 24px;
    }

    .logohistory-hero {
        padding: 28px 24px 28px;
        padding-top: 62px;
    }

    .logohistory-hero h1 {
        font-size: 24px;
    }

    .logohistory-hero>p {
        font-size: 14px;
    }

    .logohistory-lang-switch {
        top: 14px;
        left: 14px;
        right: auto;
    }

    /* RTL 翻转 */
    .logohistory-section-title {
        font-size: 19px;
    }

    .logohistory-current {
        padding: 24px 20px;
    }

    .logohistory-current-logo {
        width: 130px;
        height: 130px;
        padding: 16px;
        border-radius: 16px;
    }

    .logohistory-current-title {
        font-size: 20px;
    }

    .logohistory-timeline {
        padding-right: 24px;
        padding-left: 0;
    }

    /* RTL 翻转 */
    .logohistory-timeline::before {
        right: 7px;
        left: auto;
    }

    /* RTL 翻转 */
    .logohistory-item-dot {
        right: -24px;
        left: auto;
        width: 20px;
        height: 20px;
        border-width: 2px;
        box-shadow: 0 0 0 3px #f2f4f7;
    }

    /* RTL 翻转 */
    .logohistory-item {
        padding-bottom: 20px;
    }

    .logohistory-card {
        flex-direction: column;
        padding: 18px;
        gap: 16px;
    }

    .logohistory-card-logo {
        width: 100%;
        height: 120px;
    }

    .logohistory-card h3 {
        font-size: 16px;
    }

    .logohistory-dos {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .logohistory-typeface {
        padding: 20px 18px;
    }

    .logohistory-typeface-letter {
        width: 72px;
    }

    .logohistory-typeface-letter.is-h1 {
        font-size: 26px;
    }

    .logohistory-typeface-letter.is-h2 {
        font-size: 20px;
    }

    .logohistory-typeface-letter.is-h3 {
        font-size: 16px;
    }

    .logohistory-cta {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .logohistory-cta-content h3 {
        font-size: 18px;
    }

    .logohistory-cta-actions {
        width: 100%;
    }

    .logohistory-cta-btn {
        flex: 1;
        justify-content: center;
    }

    /* 指南页 */
    .guide-page,
    .guide-lang-block {
        gap: 24px;
    }

    .guide-hero {
        padding: 28px 24px 28px;
        padding-top: 62px;
    }

    .guide-hero h1 {
        font-size: 24px;
    }

    .guide-hero>p {
        font-size: 14px;
    }

    .guide-lang-switch {
        top: 14px;
        left: 14px;
        right: auto;
    }

    .guide-section-title {
        font-size: 19px;
    }

    .guide-device {
        padding: 16px;
    }

    .guide-faq-q {
        padding: 14px 16px;
        font-size: 14px;
    }

    .guide-faq-a-inner {
        padding: 0 16px 14px;
        font-size: 13px;
    }

    .guide-cta {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .guide-cta-content h3 {
        font-size: 18px;
    }

    .guide-cta-actions {
        width: 100%;
    }

    .guide-cta-btn {
        flex: 1;
        justify-content: center;
    }

    /* 广告页 */
    .adpage,
    .adpage-lang-block {
        gap: 24px;
    }

    .adpage-hero {
        padding: 28px 24px 28px;
        padding-top: 62px;
    }

    .adpage-hero h1 {
        font-size: 24px;
    }

    .adpage-hero>p {
        font-size: 14px;
    }

    .adpage-lang-switch {
        top: 14px;
        left: 14px;
        right: auto;
    }

    .adpage-section-title {
        font-size: 19px;
    }

    .adpage-stats {
        gap: 10px;
    }

    .adpage-stat {
        padding: 18px 14px;
    }

    .adpage-stat-value {
        font-size: 22px;
    }

    .adpage-slots {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .adpage-slot {
        padding: 18px;
    }

    .adpage-slot-preview.is-player {
        max-height: 160px;
    }

    .adpage-step {
        padding: 20px 14px;
    }

    .adpage-step-num {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .adpage-faq-q {
        padding: 14px 16px;
        font-size: 13.5px;
    }

    .adpage-faq-a-inner {
        padding: 0 16px 14px;
        font-size: 13px;
    }

    .adpage-cta {
        padding: 24px;
        flex-direction: column;
        align-items: flex-start;
    }

    .adpage-cta-content h3 {
        font-size: 18px;
    }

    .adpage-cta-actions {
        width: 100%;
    }

    .adpage-cta-btn {
        flex: 1;
        justify-content: center;
    }
}

/* ---------- ≤480px ---------- */
@media (max-width: 480px) {
    .header {
        padding: 8px 10px;
    }

    .logo-box img {
        height: 28px;
    }

    .lang-select-btn {
        padding: 6px 6px 6px 22px;
        /* RTL 翻转 */
    }

    .lang-select-btn #currentLangText {
        max-width: 52px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .icon-btn {
        width: 30px;
        height: 30px;
    }

    .icon-btn svg {
        width: 18px;
        height: 18px;
    }

    .theme-switch {
        width: 48px;
        height: 26px;
        border-radius: 13px;
    }

    .theme-switch-track {
        border-radius: 13px;
    }

    .theme-switch-thumb {
        width: 20px;
        height: 20px;
    }

    body.dark-mode .theme-switch-thumb {
        transform: translateX(22px);
    }

    .theme-switch-thumb .theme-icon {
        width: 12px;
        height: 12px;
    }

    /* 标签组 */
    .channel-tag {
        column-gap: 6px;
        row-gap: 6px;
        margin: 10px 0;
        padding: 16px;
    }

    .channel-tag .channel-tag-title {
        font-size: 14px;
    }

    .channel-tag .tag a {
        padding: 4px 10px;
        font-size: 12px;
        max-width: 150px;
    }

    /* 当前频道卡片 */
    .sidebar-card.current-channel-card {
        max-width: 100%;
        padding: 16px 14px 14px;
        border-radius: 10px;
    }

    .channel-logo-large {
        height: 72px;
    }

    .channel-title {
        font-size: 1rem;
    }

    .meta-info-inline li {
        font-size: 0.8125rem;
    }

    /* 播放页 */
    .channel-title-box {
        gap: 10px;
    }

    .channel-logo-small {
        width: 48px;
        height: 34px;
    }

    .channel-title-text h1 {
        font-size: 15px;
    }

    .recommend-grid {
        grid-template-columns: 1fr;
    }

    /* 抽屉 */
    .drawer {
        width: 260px;
    }

    /* 弹层 */
    .modal-content {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .modal-title {
        font-size: 1.125rem;
    }

    .api-info {
        font-size: 0.8125rem;
        padding: 10px 12px;
    }

    .btn-primary {
        width: 100%;
        align-self: stretch;
    }

    /* 列表页头部 */
    .listpage-header {
        padding: 20px;
        border-radius: 10px;
    }

    .listpage-text h2 {
        font-size: 20px;
    }

    .listpage-text p {
        font-size: 13px;
    }

    .listpage-icon-box {
        width: 80px;
        height: 50px;
    }

    .video-wrapper {
        border-radius: 8px;
    }

    /* 赞助页 */
    .donate-hero {
        padding: 22px 18px 24px;
        padding-top: 56px;
        border-radius: 10px;
    }

    .donate-hero h1 {
        font-size: 20px;
    }

    .donate-method {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 16px;
        border-radius: 10px;
    }

    .donate-method-qr {
        width: 100%;
        height: 140px;
    }

    .donate-benefit {
        padding: 18px 16px;
        border-radius: 10px;
    }

    .donate-benefit-icon {
        width: 42px;
        height: 42px;
        border-radius: 10px;
        margin-bottom: 12px;
    }

    .donate-benefit-icon svg {
        width: 22px;
        height: 22px;
    }

    .donate-sponsors {
        padding: 16px;
        border-radius: 10px;
    }

    .donate-cta {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .donate-cta-actions {
        flex-direction: column;
    }

    .donate-cta-btn {
        width: 100%;
    }

    /* 免责声明 */
    .disclaimer-hero {
        padding: 22px 18px 24px;
        padding-top: 58px;
        border-radius: 10px;
    }

    .disclaimer-hero h1 {
        font-size: 20px;
    }

    .disclaimer-toc {
        padding: 16px;
    }

    .disclaimer-body {
        padding: 16px;
        border-radius: 10px;
    }

    .disclaimer-section h2 {
        font-size: 16px;
        gap: 8px;
    }

    .disclaimer-contact {
        padding: 14px;
        font-size: 13px;
    }

    /* 关于页 */
    .aboutpage-hero {
        padding: 22px 18px;
        border-radius: 10px;
    }

    .aboutpage-hero h1 {
        font-size: 20px;
    }

    .aboutpage-stat-num {
        font-size: 20px;
    }

    .aboutpage-intro-text {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .aboutpage-brand-card {
        padding: 24px 18px;
        border-radius: 10px;
    }

    .aboutpage-brand-logo {
        width: 96px;
        height: 96px;
        border-radius: 20px;
        margin-bottom: 16px;
    }

    .aboutpage-brand-name {
        font-size: 18px;
    }

    .aboutpage-value-card {
        padding: 18px 16px;
        border-radius: 10px;
    }

    .aboutpage-cta {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .aboutpage-cta-actions {
        flex-direction: column;
    }

    .aboutpage-cta-btn {
        width: 100%;
    }

    /* Logo历史页 */
    .logohistory-hero {
        padding: 22px 18px 24px;
        padding-top: 58px;
        border-radius: 10px;
    }

    .logohistory-hero h1 {
        font-size: 20px;
    }

    .logohistory-current {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .logohistory-current-logo {
        width: 110px;
        height: 110px;
        border-radius: 14px;
    }

    .logohistory-palette {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .logohistory-downloads {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .logohistory-card {
        padding: 16px 14px;
        border-radius: 10px;
    }

    .logohistory-do {
        padding: 16px 18px;
        border-radius: 10px;
    }

    .logohistory-cta {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .logohistory-cta-actions {
        flex-direction: column;
    }

    .logohistory-cta-btn {
        width: 100%;
    }

    /* 指南页 */
    .guide-hero {
        padding: 22px 18px 24px;
        padding-top: 58px;
        border-radius: 10px;
    }

    .guide-hero h1 {
        font-size: 20px;
    }

    .guide-step {
        padding: 16px;
    }

    .guide-step-icon {
        width: 40px;
        height: 40px;
    }

    .guide-step-icon svg {
        width: 18px;
        height: 18px;
    }

    .guide-cta {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .guide-cta-actions {
        flex-direction: column;
    }

    .guide-cta-btn {
        width: 100%;
    }

    /* 广告页 */
    .adpage-hero {
        padding: 22px 18px 24px;
        padding-top: 58px;
        border-radius: 10px;
    }

    .adpage-hero h1 {
        font-size: 20px;
    }

    .adpage-hero-actions {
        flex-direction: column;
    }

    .adpage-hero-btn {
        width: 100%;
        justify-content: center;
    }

    .adpage-stat-value {
        font-size: 20px;
    }

    .adpage-steps {
        grid-template-columns: 1fr;
    }

    .adpage-slot {
        padding: 16px;
        border-radius: 10px;
    }

    .adpage-slot-head {
        flex-wrap: wrap;
        gap: 8px;
    }

    .adpage-plan {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .adpage-plan-price-amount {
        font-size: 28px;
    }

    .adpage-cta {
        padding: 20px 18px;
        border-radius: 10px;
    }

    .adpage-cta-actions {
        flex-direction: column;
    }

    .adpage-cta-btn {
        width: 100%;
    }
}