:root {
    --primary-color: #1d92c5;
    --primary-hover: #1680ad;
    --primary-light: #e8f4f9;

    --black: #1a1a1a;
    --red: #ff4444;
    --red-hover: #ff0000;
    --orange: #ff8c00;
    --orange-hover: #ff7700;

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --border-color: #e5e5e7;

    --success: #10b981;
    --warning: #ff8c00;
    --error: #ff4444;
    --info: #1d92c5;

    /* ── 播放器浮层层级令牌（2026-11-12）─────────────────────────────────
       控制条 / 预告面板 / 打赏弹窗同处 .player-container(z-index:1000;
       position:fixed) 创建的层叠上下文，直接比大小，顺序必须恒为：
           控制条 1000  <  预告面板 1050  <  打赏弹窗 1100
       ★ 面板不能 ≥ 弹窗：点「获得门票」时预告面板必须落在弹窗之下。
       ★ 不要给 .video-info-bar 加 z-index —— 会新建层叠上下文把面板困住。
       三处（本文件两处 + player-mmp.js 内联 cssText）统一引用这里的变量，
       避免以后改了控制条层级又把面板压回去。 */
    --sl-z-player-bar: 1000;
    --sl-z-announce: 1050;
    --sl-z-modal: 1100;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: #edf1f5;
    line-height: 1.6;
    font-size: 13px;
}

html,
body {
    scrollbar-gutter: stable;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE 10+ */
}

body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.header.header-mobile {
    background-color: white;
    border-bottom: 1px solid #e5e5e7;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); */
}

.header.header-mobile {
    position: sticky;
}

.header-container {
    /* max-width: 1920px; */
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* border-bottom: 4px solid #1680ade0; */
    background: radial-gradient(#ff8c0026, var(--bg-primary));
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo img {
    height: 50px;
    width: auto;
    padding-left: 10px;
}


.logo-text {
    font-size: 24px;
    font-weight: bold;
    color: #1d1d1f;
    letter-spacing: -0.5px;
}

.logo:hover .logo-text {
    color: var(--primary-color);
}

.nav-links {
    display: none;
}

.header-mobile .header-right {
    border: none;
    border-radius: 4px 4px 0 0;
    width: 300px;
}

.search-box {
    position: relative;
}

.search-input {
    /* background-color: #f5f5f7; */
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    padding: 8px 35px 8px 12px;
    color: #1d1d1f;
    width: 280px;
    font-size: 12px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
}


.user-info {
    display: flex;
    align-items: stretch;
    /* gap: 12px; */
    flex-direction: column;
}

.username {
    color: #1d1d1f;
    font-weight: 600;
    font-size: 14px;
}

.status-badge {
    padding: 6px 0px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge .status-text {
    margin-left: 5px;
}

.status-badge.basic {
    color: #6c757d;
}

.status-badge.platinum {
    color: #ff8c00;

}

@media screen and (min-width: 768px) {
    .user-info .status-badge {
        display: inline-block;
    }

    .user-info .username {
        display: inline-block;
    }
}

.btn {
    padding: 8px 18px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    justify-content: center;
}

.btn i {
    flex-shrink: 0;
}

.btn span {
    flex-shrink: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #e8e8ed;
    border-color: var(--primary-color);
}

.btn-orange {
    background-color: #ff6b35;
    color: #fff;
    border: none;
}

.btn-orange:hover {
    background-color: #ff8555;
}

.main-content {
    /* max-width: 1920px; */
    margin: 0 auto;
    padding-top: 10px;
    min-height: 50vh;
}

.category-tabs {
    display: flex;
    justify-content: space-between;
    /* padding: 15px 20px 0; */
    border-bottom: 1px solid rgba(143, 174, 206, 0.30);
    background-color: #f4f7fa;
    flex-wrap: wrap;
    gap: 10px;
    /* margin-bottom: 10px; */
    padding-top: 10px;
    align-items: flex-end;
    padding: 10px;
    padding-bottom: 0px;
    border-top: 3px solid var(--warning);
}

.header-desktop { display: none !important; }
.category-tabs-desktop { display: none !important; }

.header-mobile,
.category-tabs-mobile {
    display: block !important;
}

@media (min-width: 769px) {
    .profile-wrapper {
        border-top: 3px solid var(--warning);
    }

    .category-tabs-desktop {
        display: flex !important;
    }

    .category-tabs-mobile {
        display: none !important;
    }
}


.category-tabs-inner {
    display: flex;
    gap: 5px;
    flex: 1;
    flex-wrap: nowrap;
}

.tab {
    display: inline-block;
    padding: 3px 15px;
    text-decoration: none;
    color: #006699;
    font-weight: 400;
    font-size: 13px;
    border: 1px solid #1d92c540;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background-color: #6ea9c22b;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.tab:hover {
    background-color: #f7f7f7;
}

.tab.active {
    background-color: var(--bg-secondary);
    color: #ff6600;
    margin-bottom: -1px;
}


.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 10px;
}

.action-icon-btn {
    background: none;
    border: none;
    color: #006699;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.tag-filter-btn {
    background-color: transparent;
    border: 1px solid transparent;
    padding: 6px 12px;
    border-radius: 4px;
    color: #006699;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.tag-filter-btn.tag-filter-off {
    background-color: transparent;
    color: #006699;
    border-color: transparent;
    box-shadow: none;
}

@media screen and (max-width: 768px) {
    .tag-filter-btn {
        padding: 8px 14px;
        border-radius: 999px;
        font-size: 14px;
    }
}

.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-label {
    color: #6e6e73;
    font-size: 14px;
    font-weight: 600;
}

.filter-select {
    background-color: #ffffff;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
}

.main-body {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.left-content {
    flex: 1;
    min-width: 0;
    padding: 0 10px 10px;
}

.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 10px;
    margin-bottom: 40px;
}

.hot-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-hover) 100%);
    color: #fff;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}

.viewer-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.viewer-count.high {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-hover) 100%);
}

.room-info {
    padding: 5px;
}

.room-title {
    color: #0c6a93;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    flex-shrink: 0;
}


.room-streamer {
    color: #6e6e73;
    font-size: 12px;
}

.room-tags {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.tag {
    background-color: #f5f5f7;
    color: #6e6e73;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    border: 1px solid #e5e5e7;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    background-color: #ffffff;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.page-btn:hover {
    background-color: #f5f5f7;
    border-color: var(--primary-color);
}

.page-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.footer {
    background-color: #ffffff;
    border-top: 1px solid #e5e5e7;
}

.footer-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 40px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #1a1a1aab;
    font-size: 15px;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #6e6e73c2;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #e5e5e7;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-compliance {
    background-color: #f8f8fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.footer-compliance p {
    color: #6e6e73;
    font-size: 13px;
    margin: 5px 0;
    line-height: 1.4;
}

.footer-compliance a {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-certifications {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 15px;
    justify-content: center;
}

.footer-certifications img {
    max-height: 40px;
}

.footer-bottom p {
    color: #6e6e73;
    font-size: 13px;
    text-align: center;
}

.footer-disclaimer {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.footer-disclaimer p {
    color: #856404;
    font-size: 12px;
    margin: 5px 0;
    line-height: 1.4;
}

.footer-disclaimer a {
    color: #856404;
    text-decoration: underline;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-links a {
    color: #6e6e73;
    font-size: 20px;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--primary-color);
}

.right-sidebar {
    max-width: 15%;
    min-width: 300px;
    background: #f8f9fa;
    padding: 0;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
    padding: 10px;
    padding-right: 20px;
}


.right-sidebar.hidden {
    display: none;
}

.close-sidebar {
    display: flex;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    justify-content: flex-end;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section h3 {
    font-size: 12px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tags-container .tag {
    text-decoration: none;
    background-color: transparent;
    border: 1px solid var(--wl-filter-option-border-color, #e0eefb);
    border-radius: 4px;
    box-sizing: border-box;
    color: #0c6a93;
    cursor: pointer;
    display: inline-block;
    font-size: 1em;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 14px;
    margin: 0 5px 5px 0;
    max-width: 100%;
    overflow: hidden;
    padding: 4px 6px;
    text-align: left;
    text-overflow: ellipsis;
}

.tags-container .tag:hover {
    background-color: #e9e9e9
}

.tags-container .tag.active {
    color: white;
    background-color: #0c6a93;
    font-weight: 500;
}


.search-box {
    position: relative;
    /* margin-bottom: 10px; */
}

.search-box input {
    width: 100%;
    padding: 6px 30px 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.search-box i {
    /* position: absolute; */
    right: 10px;
    top: 8px;
    color: #006699;
}
.right-sidebar .search-box i {
    position: absolute;
    right: 10px;
    top: 8px;
    color: #006699;
}
.tag-pagination {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.tag-pagination a {
    color: #006699;
    text-decoration: none;
}

.room-card {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    transform: translateY(0);
}

.room-card:hover {
    transform: translateY(-2px);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
}

.room-thumbnail {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #dde1e7;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

/* ★ 2026-11-27：房间卡片封面占位浅灰斜光扫掠（方案 A，位于图片 z-index:1 之下，加载后自然覆盖） */
.room-thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    transform: translateX(-110%);
    background: linear-gradient(
        105deg,
        transparent 15%,
        rgba(255, 255, 255, 0.75) 48%,
        rgba(255, 255, 255, 0.25) 62%,
        transparent 85%
    );
    animation: slCardShimmer 1.5s ease-in-out infinite;
}

@keyframes slCardShimmer {
    0%   { transform: translateX(-110%); }
    100% { transform: translateX(110%); }
}

/* ★ 2026-11-30：关注页离线卡（暂未开播）没有封面图覆盖扫掠层，
   shimmer 会一直循环、看起来像在加载 —— 离线卡直接不渲染扫掠层。 */
.room-card.is-offline .room-thumbnail::after {
    content: none;
}

.room-thumb-blur {
    position: absolute;
    z-index: 1;
    inset: -14px;
    width: calc(100% + 28px);
    height: calc(100% + 28px);
    object-fit: cover;
    filter: blur(18px) brightness(0.55) saturate(1.2);
    transform: scale(1.1);
    display: none;
    pointer-events: none;
}

.room-thumb-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.28s ease;
}

.room-card:hover .room-thumb-img {
    transform: scale(1.04);
}

/* 竖屏主播：模糊背板 + 完整不裁切 */
.room-card.is-portrait .room-thumb-blur {
    display: block;
}

.room-card.is-portrait .room-thumb-img {
    object-fit: contain;
}

.room-info {
    padding: 6px 8px 7px;
}

.room-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    margin-bottom: 1px;
}

.room-streamer {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.25;
    color: #126b8e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}

.room-meta-right {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.room-viewers {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 10.5px;
    line-height: 1.2;
    color: #6e6e73;
    font-weight: 500;
    white-space: nowrap;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}

.room-age {
    font-size: 10.5px;
    line-height: 1.2;
    color: #6e6e73;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}

.room-title {
    font-size: 10px;
    font-weight: 400;
    color: #6e6e73;
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}
    .header-right {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        min-width: 0;
        order: 2;
        justify-content: flex-end;
    }

@media (min-width: 769px) {
    .search-box.expanded .search-input{
        width: 255px;
    }
    .header-right .search-btn{
        position: fixed;
    }
        
}
@media (max-width: 768px) {
    .search-box i {
        color: gray;
    }

    .header-container {
        flex-wrap: nowrap;
        height: 60px;
        padding: 0 12px;
        gap: 8px;
        justify-content: space-between;
    }

    .right-sidebar {
        min-width: 100%;
        max-width: 100%;
        width: 100%;
        background: #f8f9fa;
        padding: 0;
        position: relative;
        flex-shrink: 0;
        transition: all 0.3s ease;
        padding: 10px;
        min-height: 60vh;
    }

    .left-content.hidden {
        display: none;
    }

    .right-sidebar.show {
        display: none;
    }

    .logo {
        flex: 0 0 auto;
        transition: all 0.3s ease;
        order: 1;
    }

    .logo.hidden {
        opacity: 0;
        width: 0;
        overflow: hidden;
        margin: 0;
    }

    .logo img {
        height: 25px;
    }

    .search-box {
        flex: 0 0 180px;
        transition: flex 0.3s ease;
        order: 1;
        display: flex;
        align-items: center;
    }

    .search-box.expanded {
        flex: 1;
    }

    .search-input {
        width: 100%;
        font-size: 13px;
        padding: 7px 32px 7px 10px;
        height: 36px;
    }

    .user-info {
        display: flex;
        gap: 4px;
        flex-wrap: nowrap;
        flex-shrink: 0;
        order: 2;
        align-items: center;
        flex-direction: row;
    }

    .username {
        display: none;
    }

    .user-info .status-badge {
        padding: 7px 10px !important;
        /* font-size: 12px !important; */
        min-height: 36px !important;
        height: 36px !important;
        display: inline-flex;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
        /* border: 1px solid var(--border-color); */
    }

    .user-info .status-badge i {
        margin: 0 !important;
        font-size: 14px !important;
    }

    .user-info .status-badge .status-text,
    .user-info .status-badge span.status-text {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        position: absolute !important;
    }

    .user-info .btn {
        padding: 7px 10px;
        font-size: 12px;
        min-width: auto;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .user-info .btn span {
        display: none;
    }

    .user-info .btn i {
        font-size: 16px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
        gap: 6px;
        border-bottom: none;
        background: none;
    }

    .logo img {
        height: 25px;
    }

    .search-box {
        flex: 0 0 140px;
    }

    .search-input {
        font-size: 12px;
        padding: 6px 28px 6px 8px;
        height: 32px;
    }


    .user-info {
        gap: 3px;
    }

    .user-info .btn {
        padding: 6px 8px;
        font-size: 11px;
        min-width: auto;
        height: 32px;
    }

    .user-info .btn i {
        font-size: 14px;
    }

    .user-info .status-badge {
        padding: 6px 8px !important;
        height: 32px !important;
        min-height: 32px !important;
    }

    .user-info .status-badge i {
        font-size: 14px !important;
    }

    .user-info .status-badge .status-text,
    .user-info .status-badge span.status-text {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        position: absolute !important;
    }
}

@media (max-width: 360px) {
    .header-container {
        padding: 0 8px;
        gap: 4px;
    }

    .logo img {
        height: 25px;
    }

    .search-box {
        flex: 0 0 120px;
    }

    .user-info {
        gap: 2px;
    }

    .user-info .btn {
        padding: 5px 6px;
        font-size: 10px;
        height: 28px;
    }

    .user-info .btn i {
        font-size: 13px;
    }

    .user-info .status-badge {
        padding: 5px 6px !important;
        height: 28px !important;
        min-height: 28px !important;
        background-color: transparent !important;
    }

    .user-info .status-badge i {
        font-size: 13px !important;
    }

    .user-info .status-badge .status-text,
    .user-info .status-badge span.status-text {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        visibility: hidden !important;
        position: absolute !important;
    }

    .search-input {
        font-size: 11px;
        padding: 5px 26px 5px 6px;
        height: 28px;
    }
}



.player-container {
    display: none;
    position: fixed;
    top: 0px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1d1d1f;
    z-index: 1000;
    overflow: hidden;
}

.player-container.active {
    display:flex;
    flex-direction: column;
}

.player-wrapper {
    flex: 1;
    display: flex;
    flex-direction: row;
    background-color: #000;
    position: relative;
    min-height: 0;
    overflow: hidden;
}

.player-header {
    background: #1a1a1a;
    padding: 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    /* border-bottom: 2px solid #2a2a2a; */
    height: 50px;
    flex-shrink: 0;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.player-info h2 {
    color: #e0e0e0;
    font-size: 15px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.player-info .live-indicator {
    background-color: var(--red);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    /* font-size: 12px; */
    font-weight: 700;
    text-transform: uppercase;
    /* height: 26px; */
    /* width: 46px; */
}

.player-close {
    background-color: #252525;
    border: 1px solid #3a3a3a;
    color: #e0e0e0;
    cursor: pointer;
    /* font-size: 12px; */
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 700;
}

.player-close i {
    font-size: 16px;
}


.video-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--black);
    min-height: 0;
    overflow: hidden;
}

.video-container {
    flex: 1;
    position: relative;
    background-color: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.video-js {
    width: 100% !important;
    height: 100% !important;
}

.video-js video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    visibility: hidden;
    opacity: 0;
}

video {
    visibility: hidden;
}

.video-js video {
    visibility: visible;
    opacity: 1;
}

.video-info-bar {
    background: #141414;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* border-top: 2px solid #2a2a2a; */
    flex-shrink: 0;
    height: 52px;
}

.video-info-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.video-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888888;
    font-size: 13px;
}

.video-info-item i {
    color: #00d4ff;
    font-size: 14px;
}

.video-info-item .count {
    color: #e0e0e0;
    font-weight: 600;
}

.video-info-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-info-bar {
    position: relative;
}

.video-action-btn {
    background: #252525;
    border: 1px solid #3a3a3a;
    color: #e0e0e0;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.video-action-btn.liked {
    background: #ff006e;
    border-color: #ff006e;
    color: #ffffff;
}

.video-action-btn.followed {
    background: #fbbf24;
    border-color: #fbbf24;
    color: #ffffff;
}

.video-action-btn.followed:hover {
    background: #f59e0b;
    border-color: #f59e0b;
}

.video-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#proxy-accel-panel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: auto;
    max-width: 50%;
    flex-shrink: 0;
    padding: 4px 8px;
    border: 1px solid #d2d2d7;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: 38px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.proxy-content-expand {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

#proxy-accel-panel.collapsed {
    padding-right: 4px;
}

#proxy-accel-panel.collapsed .proxy-content-expand {
    width: 0;
    opacity: 0;
    margin: 0;
    visibility: hidden;
    pointer-events: none;
}

#proxy-accel-panel.collapsed .proxy-collapse-btn i {
    transform: rotate(180deg);
}

.proxy-toggle-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f7;
    color: #6e6e73;
    border: 1px solid #d2d2d7;
}

.proxy-toggle-btn::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.proxy-toggle-on::after {
    background: #4caf50;
    box-shadow: 0 0 8px rgb(46 104 49 / 80%);
}

/* ★ 2026-10-27：浏览器不支持 VIP 加速通道（无 Service Worker）时的置灰态。
   专线全靠 SW 拦截请求，没有 SW 开了也没用 —— 与其让用户点半天没反应，
   不如把按钮做成"明显不可用"，文案由 cn-proxy.js 的 refreshToggleUI() 给。 */
.proxy-toggle-disabled {
    opacity: .55;
    cursor: not-allowed;
    border-style: dashed;
    background: #f0f0f2;
    color: #9a9aa6;
}

.proxy-toggle-disabled::after {
    background: #c7c7cc;
    box-shadow: none;
}

.proxy-quota-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.proxy-quota-track {
    width: 80px;
    max-width: 100%;
    height: 5px;
    background: #e5e5e7;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
}

.proxy-quota-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: var(--primary-color, #ff6b35);
    transition: width 0.38s ease;
}

.proxy-quota-text {
    font-size: 11px;
    color: #6e6e73;
    font-weight: 500;
    white-space: nowrap;
}

.proxy-buy-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #d2d2d7;
    background: #ffffff;
    color: #6e6e73;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    display:none;
}

.proxy-buy-btn:hover {
    border-color: var(--primary-color, #ff6b35);
    color: var(--primary-color, #ff6b35);
}

.proxy-collapse-btn {
    background: transparent;
    border: none;
    color: #86868b;
    cursor: pointer;
    padding: 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s ease;
    height: 100%;
}

.proxy-collapse-btn i {
    transition: transform 0.3s ease;
}

@media (min-width: 1280px) {
    #proxy-accel-panel {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
    }
}

@media (max-width: 1279px) {
    #proxy-accel-panel {
        position: static;
        transform: none;
        min-width: 0;
        max-width: 52%;
        margin: 0 8px;
    }
}

#closeBtn {
    display: none;
}

.chat-panel {
    width: 400px;
    background-color: var(--player-layer);
    /* border-left: 1px solid #2a2a2a; */
    display: flex;
    flex-direction: column;
}

.chat-panel.connecting {
    opacity: 1;
}

.chat-panel.connecting .chat-input,
.chat-panel.connecting .chat-send-btn {
    pointer-events: none;
    opacity: 0.5;
}

/* ═══ 聊天面板：房间公告 + 连接态占位（2026-11-07）═══════════════════════════
   公告条钉在消息区上方，默认两行截断（点一下展开）；连接态是一条会自己消失的
   骨架提示 —— 取代原来刷在聊天流里的「已连接 / 正在订阅 / 已就绪」三条系统消息。 */
.chat-notice {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 10px 14px;
    background: rgba(0, 212, 255, 0.06);
    border-bottom: 1px solid rgba(0, 212, 255, 0.14);
    color: #c9d6dc;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
}

.chat-notice-icon {
    color: #00d4ff;
    font-size: 12px;
    margin-top: 3px;
    opacity: 0.85;
}

.chat-notice-text {
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.chat-notice.expanded .chat-notice-text {
    -webkit-line-clamp: unset;
    display: block;
}

.chat-conn-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    max-height: 40px;
    overflow: hidden;
    font-size: 12px;
    color: #7f8b93;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: opacity 0.22s ease, max-height 0.22s ease, padding 0.22s ease;
    flex: 0 0 auto;
}

.chat-conn-hint.leaving {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.chat-conn-hint.failed {
    color: #e0a4a4;
    cursor: pointer;
}

.chat-conn-hint.failed .chat-conn-dots {
    display: none;
}

.chat-conn-dots {
    display: inline-flex;
    gap: 3px;
    flex: 0 0 auto;
}

.chat-conn-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #00d4ff;
    opacity: 0.35;
    animation: chatConnBreathe 1.1s infinite ease-in-out;
}

.chat-conn-dots i:nth-child(2) { animation-delay: 0.15s; }
.chat-conn-dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatConnBreathe {
    0%, 100% { opacity: 0.2; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-1px); }
}

.chat-header {
    background: #1a1a1a;
    padding: 15px 15px;
    border-bottom: 2px solid #2a2a2a;
    height: 50px;
}

.chat-header h3 {
    color: #00d4ff;
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #121212;
}

/* 2026-11-12：桌面版聊天区去掉右侧滚动条（只隐藏视觉条，滚轮/触摸滚动照常可用）。
   ★ 不能改成 overflow:hidden —— 历史消息要能往上翻；三条浏览器路径都要覆盖：
     Firefox=scrollbar-width、旧 Edge/IE=-ms-overflow-style、Chrome/Safari=::-webkit-scrollbar。
   ★ 只作用于 >768px 桌面；小屏聊天是另一套「单行密度流」，不动它。 */
@media (min-width: 769px) {
    .chat-messages {
        scrollbar-width: none;       /* Firefox */
        -ms-overflow-style: none;    /* 旧 Edge / IE */
    }
    .chat-messages::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;               /* Chrome / Safari / 新版 Edge */
    }
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px;
    padding-left: 12px;
    background-color: #1e1e1e;
    border-radius: 8px;
    border-left: 3px solid #666666;
}

.chat-time {
    font-size: 11px;
    color: #888888;
    margin-bottom: 2px;
}

.chat-username {
    color: #00d4ff;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    padding-left:6px;
}

.chat-text {
    color: #d0d0d0;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Different message types - Dark theme with color harmony */
.chat-message.chat {
    background-color: #1a1d25;
}

.chat-message.chat .chat-username {
    color: #00d4ff;
    /* padding-left: 5px; */
}

.chat-message.tip {
    background-color: #252015;
}

.chat-message.tip .chat-username {
    color: #ffb81c;
}

.chat-message.lovense {
    background-color: #26161b;
}

.chat-message.lovense .chat-username {
    color: #fb7185;
}
.chat-lovense.lovense-icon{
    color: var(--orange);
}
.chat-message.notice {
    background-color: #1a2333;
}

.chat-message.notice .chat-username {
    color: #7c3aed;
}

.chat-message.status {
    background-color: #1a1a1e;
}

.chat-message.status .chat-username {
    color: #888888;
}

.chat-message.log {
    background-color: #1a2615;
}

.chat-message.log .chat-username {
    color: #10b981;
}

.chat-message.raw {
    background-color: #1f1815;
}

.chat-message.raw .chat-username {
    color: #ff9800;
}

.chat-message.goal {
    background-color: #1a2615;
}

.chat-message.goal .chat-username {
    color: #10b981;
}

.chat-message.purchase {
    background-color: #1f1a25;
}

.chat-message.purchase .chat-username {
    color: #9d4edd;
}

.chat-message.thresholdGoal {
    background-color: #1a2615;
}

.chat-message.thresholdGoal .chat-username {
    color: #10b981;
}

.chat-message.broadcast {
    background-color: #1f1815;
}

.chat-message.broadcast .chat-username {
    color: #ff9800;
}

.chat-input-wrapper {
    padding: 5px;
    background-color: #141414;
    /* border-top: 1px solid #2a2a2a; */
    height: 52px;
}

.chat-input-container {
    position: relative;
}

.chat-input {
    width: 100%;
    padding: 10px 100px 10px 10px;
    border: 2px solid #3a3a3c;
    border-radius: 6px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    background-color: #1e1e1e;
    color: #d0d0d0;
}

.chat-input::placeholder {
    color: #666666;
}


.chat-send-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #00d4ff 0%, #00a8cc 100%);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    min-width: auto;
    font-weight: 600;
}

.chat-send-btn span {
    display: none;
}

.chat-char-count {
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #a4a2a2;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 2;
    background: transparent;
    white-space: nowrap;
}

.chat-char-count.over-limit {
    color: #ff5252;
    font-weight: 600;
}


.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #c0c0c626;
    border-top-color: #717070f7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #fff;
    margin-top: 15px;
    font-size: 14px;
}

/* 播放失败 / 主播离线 提示浮层 */
.player-error-layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    box-sizing: border-box;
    text-align: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    color: #fff;
    animation: player-error-fade-in 0.25s ease;
}

@keyframes player-error-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.player-error-layer .player-error-icon {
    font-size: 40px;
    line-height: 1;
    color: #ff6b6b;
    opacity: 0.95;
}

.player-error-layer .player-error-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.player-error-layer .player-error-desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    max-width: 320px;
}

.player-error-layer .player-error-retry {
    margin-top: 4px;
    padding: 9px 22px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.player-error-layer .player-error-retry:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
}

.player-error-layer .player-error-retry:active {
    transform: scale(0.96);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.video-js .vjs-loading-spinner {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.video-js.vjs-spinner-delay-show.vjs-waiting .vjs-loading-spinner,
.video-js.vjs-spinner-delay-show.vjs-seeking .vjs-loading-spinner {
    display: flex !important;
    visibility: visible !important;
    opacity: 0.85 !important;
}

.vjs-quality-button {
    position: relative;
}

.vjs-quality-button .vjs-icon-placeholder:before {
    content: 'HD';
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.67;
}

.vjs-quality-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 8px;
    padding: 8px 0;
    margin-bottom: 10px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.vjs-quality-menu::before {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.9);
}

.vjs-quality-item {
    padding: 10px 16px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.vjs-quality-item:hover {
    background: rgba(145, 71, 255, 0.2);
}

.vjs-quality-item.selected {
    background: rgba(145, 71, 255, 0.3);
    color: var(--primary-color);
}

.vjs-quality-item .quality-label {
    flex: 1;
}

.vjs-quality-item i {
    color: var(--primary-color);
    font-size: 12px;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .player-container {
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        z-index: 1000;
    }

    .player-wrapper {
        flex: 1 1 auto;
        min-height: 0;
        flex-flow: column;
        height: 100%;
    }

    .video-wrapper {
        flex: 0 0 auto;
    }

    .video-container {
        width: 100vw;
        height: 56.25vw;
        flex: 0 0 auto;
        position: relative;
    }

    .video-js {
        width: 100vw !important;
        height: 56.25vw;
        position: relative;
    }

    .video-js video {
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
    }

    .chat-panel {
        width: 100%;
        flex: 1 1 auto;
        min-height: 0;
        border-left: none;
        border-top: 1px solid #e5e5e7;
        overflow: hidden;
    }

    .chat-messages {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
    }

    .player-header {
        padding: 12px 15px;
        display: none;
    }

    .player-info h2 {
        font-size: 14px;
    }

    .video-info-bar {
        padding: 10px 15px;
    }



    .video-action-btn span {
        display: none;
    }

    .video-action-btn {
        padding: 6px 10px;
        min-width: auto;
    }

    #closeBtn {
        display: flex;
    }

    .chat-header {
        display: none;
    }

    .video-info-bar {
        background: #141414;
        border-top-color: #2a2a2a;
    }

    .video-info-item {
        color: #888888;
    }

    .video-info-item i {
        color: #00d4ff;
    }

    .video-info-item .count {
        color: #e0e0e0;
    }

    .video-action-btn {
        background: #252525;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }

    .video-action-btn.followed {
        background: #252015;
        border-color: #3a3a3a;
        color: #ffb81c;
    }

    .video-action-btn.followed:hover {
        background: #ffb81c;
        border-color: #ffb81c;
        color: #000;
    }

    .video-action-btn.liked {
        background: #2a1528;
        border-color: #3a3a3a;
        color: #ff006e;
    }

    .chat-panel {
        /* background-color: #0f0f0f; */
        border-top-color: #1d1d1f;
    }

    .chat-messages {
        background-color: #121212;
    }

    .chat-message {
        background-color: #1e1e1e;
    }

    .chat-message.chat {
        background-color: #1a1d25;
    }

    .chat-message.chat .chat-username {
        color: #00d4ff;
    }

    .chat-message.tip {
        background-color: #252015;
    }

    .chat-message.tip .chat-username {
        color: #ffb81c;
    }

    .chat-message.lovense {
        background-color: #26161b;
    }

    .chat-message.lovense .chat-username {
        color: #fb7185;
    }

    .chat-message.notice {
        background-color: #1a2333;
    }

    .chat-message.notice .chat-username {
        color: #7c3aed;
    }

    .chat-message.status {
        background-color: #1a1a1e;
    }

    .chat-message.status .chat-username {
        color: #888888;
    }

    .chat-message.log {
        background-color: #1a2615;
    }

    .chat-message.log .chat-username {
        color: #10b981;
    }

    .chat-message.raw {
        background-color: #1f1815;
    }

    .chat-message.raw .chat-username {
        color: #ff9800;
    }

    .chat-message.goal {
        background-color: #1a2615;
    }

    .chat-message.goal .chat-username {
        color: #10b981;
    }

    .chat-message.purchase {
        background-color: #1f1a25;
    }

    .chat-message.purchase .chat-username {
        color: #9d4edd;
    }

    .chat-message.thresholdGoal {
        background-color: #1a2615;
    }

    .chat-message.thresholdGoal .chat-username {
        color: #10b981;
    }

    .chat-message.broadcast {
        background-color: #1f1815;
    }

    .chat-message.broadcast .chat-username {
        color: #ff9800;
    }

    .chat-time {
        color: #888888;
    }

    .chat-text {
        color: #d0d0d0;
    }

    .chat-input-wrapper {
        background-color: #0f0f0f;
        border-top-color: #2a2a2a;
    }

    .chat-input {
        background-color: #1e1e1e;
        border-color: #3a3a3c;
        color: #d0d0d0;
    }

    .chat-input:focus {
        border-color: #00d4ff;
        background-color: #242426;
    }

    .chat-input::placeholder {
        color: #666666;
    }
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.custom-modal-overlay.active {
    display: flex;
}

.custom-modal-box {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e5e5e7;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    color: #1d1d1f;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6e6e73;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f5f5f7;
    color: #1d1d1f;
}

.modal-body {
    padding: 25px;
    flex: 1;
    overflow-y: auto;
}

.modal-body p {
    margin: 0 0 15px 0;
    color: #6e6e73;
    font-size: 14px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e5e5e7;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 80px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-danger:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}



.follow-checkbox {
    margin-right: 10px;
}

.selected-count {
    font-size: 13px;
    color: #6e6e73;
    font-weight: 500;
}

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
}

.pagination-info {
    display: none;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: #f8fafc;
    color: #1d1d1f;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: #f5f5f7;
    border-color: var(--primary-color);
}

.pagination-btn:disabled {
    background: #f5f5f7;
    color: #c7c7cc;
    cursor: not-allowed;
    border-color: #e5e5e7;
}

.pagination-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.page-number {
    font-weight: 600;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: #6e6e73;
}

.loading-state i {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6e6e73;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #d2d2d7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}


.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    flex: 1;
    padding-right: 40px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #333;
}

@media (max-width: 768px) {

    html,
    body {
        /* Firefox */
        scrollbar-width: none;
        /* IE/Edge */
        -ms-overflow-style: none;
    }

    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
}

.password-toggle i {
    font-size: 16px;
}

@media (max-width: 768px) {
    .category-tabs-inner {
        display: flex;
        gap: 5px;
        flex: 1;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: scroll;
    }

    .tab {
        display: inline-block;
        padding: 3px 15px;
        text-decoration: none;
        color: #006699;
        font-weight: 400;
        font-size: 13px;
        border-top: 1px solid transparent;
        border-left: 1px solid transparent;
        border-right: 1px solid transparent;
        border-radius: 4px;
        background-color: transparent;
        cursor: pointer;
        transition: all 0.2s;
        position: relative;
        white-space: nowrap;
    }

    .tab:hover {
        background-color: #f7f7f7;
    }

    .tab.active {
        background-color: transparent;
        color: #ff6600;
        border-top: 1px solid transparent;
        border-left: 1px solid transparent;
        border-right: 1px solid transparent;
        padding: 3px;
    }

    .tab:not(.active) {
        border: 1px solid transparent;
        padding: 3px;
    }
}

@media (max-width: 768px) {
    .cn-proxy-active .video-info-left {
        display: none !important;
    }
}

@media (max-width: 768px) {

    .category-tabs-desktop {
        display: none !important;
    }

    .header-mobile {
        display: block !important;
    }

    .category-tabs-mobile {
        display: flex !important;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        /* overflow-x: scroll; */
    }

    .room-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .room-info {
        padding: 5px 7px 6px;
    }

    .room-streamer {
        font-size: 12px;
    }

    .room-viewers,
    .room-age {
        font-size: 10px;
    }

    .category-tabs-inner::-webkit-scrollbar {
        height: 0;
        width: 0;
    }

    .tab i {
        font-size: 12px;
    }

    .tag-filter-btn {
        font-size: 11px;
        padding: 6px 8px;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: auto;
        gap: 0;
    }

    .tag-filter-btn span {
        display: none;
    }

    .tag-filter-btn i {
        font-size: 14px;
        margin: 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .tag-sidebar {
        width: 100%;
        right: -100%;
    }

    .pagination-container {
        padding: 10px 0;
    }

    .pagination-controls {
        gap: 3px;
    }

    .pagination-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 32px;
    }

    .pagination-btn i {
        font-size: 10px;
    }

    .pagination-btn:not(.active):not(:disabled):nth-child(n+6):nth-last-child(n+4) {
        display: none;
    }

    #proxy-accel-panel {
        gap: 6px;
        padding: 4px 6px;
        min-width: auto;
        max-width: fit-content;
        border-color: #3a3a3c;
        background: #252527;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        height: 32px;
    }

    #proxy-accel-panel.collapsed {
        padding-right: 4px;
    }

    .proxy-toggle-btn {
        padding: 4px 10px;
        font-size: 11px;
        border-radius: 4px;
        background: #f5f5f7;
        color: #6e6e73;
        border-color: #d2d2d7;
    }

    .proxy-toggle-btn::after {
        width: 6px;
        height: 6px;
        background: #878789;
    }

    .proxy-toggle-on {
        background: #252527;
        color: #d0d0d4;
        border-color: #3a3a3c;
    }

    .proxy-toggle-on::after {
        background: #4caf50;
        box-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
        animation: proxy-dot-blink 1.5s infinite ease-in-out;
    }

    .proxy-toggle-off {
        background: #252527;
        color: #878789;
        border-color: #3a3a3c;
    }

    .proxy-quota-track {
        width: 48px;
        max-width: 48px;
        height: 4px;
        background: #3a3a3c;
    }

    .proxy-quota-text {
        font-size: 10px;
        color: #8a8a8e;
    }

    .proxy-buy-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
        border-color: #3a3a3c;
        background: #252527;
        color: #d0d0d4;
    }

    .proxy-collapse-btn {
        padding: 0 2px;
        font-size: 10px;
        color: #8a8a8e;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 28px;
    }

    .pagination-btn span {
        display: none;
    }

    .pagination-controls {
        gap: 2px;
    }
}

@media (min-width: 769px) {

    .right-sidebar.show {
        display: block;
    }

    .right-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {

    body {
        background-color: #f5f5f7;
        color: #111111;
    }

    .main-content {
        background-color: #f5f5f7;
    }

    .category-tabs-inner {
        display: flex;
        gap: 0;
        flex: 1;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .category-tabs-inner::-webkit-scrollbar {
        display: none;
    }

    /* ── Mobile Header ── */
    .header-mobile {
        background: #ffffff;
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    }

    .header-mobile .header-container {
        padding: 0 14px;
        height: 52px;
    }

    .header-mobile .logo img {
        height: 30px;
    }

    .header-mobile .search-box {
        position: relative;
        display: flex;
        align-items: center;
    }

    .header-mobile .search-input {
        background: #f0f0f2;
        border: 0.5px solid rgba(0, 0, 0, 0.08);
        border-radius: 20px;
        padding: 7px 12px 7px 32px;
        color: #111111;
        width: 100%;
        font-size: 13px;
        transition: border-color 0.2s, background 0.2s;
    }

    .header-mobile .search-input::placeholder {
        color: #aaaaaa;
    }

    .header-mobile .search-input:focus {
        background: #ffffff;
        border-color: rgba(0, 0, 0, 0.18);
        outline: none;
    }

    .header-mobile .search-btn {
        position: absolute;
        left: 10px;
        background: none;
        border: none;
        color: #aaaaaa;
        cursor: pointer;
        font-size: 13px;
        padding: 0;
        display: flex;
        align-items: center;
    }

    .header-mobile .user-info {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .header-mobile .btn-secondary:hover {
        background: #e8e8ea;
        border-color: rgba(0, 0, 0, 0.18);
    }

    .header-mobile .btn-orange {
        background: #e8440a;
        border: none;
        color: #fff;
        font-size: 12px;
        font-weight: 700;
        padding: 6px 14px;
        border-radius: 18px;
        letter-spacing: 0.2px;
        white-space: nowrap;
    }

    .header-mobile .btn-orange:hover {
        background: #c73a07;
    }

    /* ── Mobile Category Tabs ── */
    /* 2026-11-02：与 header 同时吸顶 —— sticky 吸在 header 下沿，
       top 取 --sl-header-h（index.html 内联脚本实时同步 header 实际高度） */
    .category-tabs-mobile {
        position: sticky;
        top: var(--sl-header-h, 56px);
        z-index: 999;
        background: #ffffff;
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
        padding: 0;
        gap: 0;
        flex-wrap: nowrap;
        align-items: center;
        display: flex;
        justify-content: space-between;
        border-top: none;
    }

    .category-tabs-mobile .category-tabs-inner {
        padding: 0 4px;
        flex: 1;
        min-width: 0;
    }

    .tab {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 12px 16px;
        text-decoration: none;
        color: #aaaaaa;
        font-weight: 500;
        font-size: 13px;
        border: none;
        border-radius: 0;
        background: transparent;
        cursor: pointer;
        transition: color 0.18s;
        position: relative;
        white-space: nowrap;
        letter-spacing: 0.1px;
    }

    .tab i {
        font-size: 12px;
        opacity: 0.7;
    }

    .tab:hover {
        background: transparent;
        color: #555555;
    }

    .tab.active {
        background: transparent;
        color: #111111;
        font-weight: 700;
        border: none;
        border-bottom: none;
        margin-bottom: 0;
        padding: 12px 16px;
    }

    .tab.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 24px;
        height: 2.5px;
        background: #e8440a;
        border-radius: 2px;
    }

    .tab:not(.active) {
        border: none;
        padding: 16px 8px;
    }

    .category-tabs-mobile .tag-filter-btn {
        background: transparent;
        border: none;
        border-left: 0.5px solid rgba(0, 0, 0, 0.08);
        color: #aaaaaa;
        font-size: 12px;
        font-weight: 500;
        padding: 10px 14px;
        border-radius: 0;
        gap: 5px;
        flex-shrink: 0;
        white-space: nowrap;
        transition: color 0.18s;
    }

    .category-tabs-mobile .tag-filter-btn.tag-filter-on {
        color: #555
    }

    .category-tabs-mobile .tag-filter-btn i {
        font-size: 12px;
    }

    .left-content {
        padding: 0 8px 8px;
        background-color: transparent;
    }



    .tag {
        background-color: #f0f0f2;
        color: #666666;
        border-color: rgba(0, 0, 0, 0.08);
    }

    .pagination-btn {
        background: #ffffff;
        border: 0.5px solid rgba(0, 0, 0, 0.12);
        color: #555555;
        border-radius: 8px;
    }

    .pagination-btn:hover:not(:disabled) {
        background: #f0f0f2;
        border-color: rgba(0, 0, 0, 0.18);
        color: #111111;
    }

    .pagination-btn:disabled {
        background: #f5f5f7;
        color: #cccccc;
        border-color: rgba(0, 0, 0, 0.06);
    }

    .pagination-btn.active {
        background: #e8440a;
        border-color: #e8440a;
        color: #fff;
        font-weight: 700;
    }

    .right-sidebar {
        background: #ffffff;
        border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    }

    .close-sidebar {
        color: #aaaaaa;
    }

    .close-sidebar:hover {
        color: #111111;
    }

    .filter-section h3 {
        color: #aaaaaa;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        font-weight: 600;
    }

    .tags-container .tag {
        background-color: #f0f0f2;
        color: #666666;
        border-color: rgba(0, 0, 0, 0.08);
        border-radius: 6px;
    }

    .tags-container .tag:hover {
        background-color: #e8e8ea;
        color: #111111;
    }

    .tags-container .tag.active {
        background-color: #e8440a;
        border-color: #e8440a;
        color: #fff;
        font-weight: 600;
    }

    .tag-pagination {
        color: #aaaaaa;
    }

    .tag-pagination a {
        color: #666666;
    }

    .tag-pagination a:hover {
        color: #111111;
    }

    .right-sidebar .search-box input {
        background: #f0f0f2;
        border-color: rgba(0, 0, 0, 0.08);
        color: #111111;
        border-radius: 8px;
    }

    .right-sidebar .search-box input::placeholder {
        color: #aaaaaa;
    }

    .right-sidebar .search-box input:focus {
        border-color: rgba(0, 0, 0, 0.18);
        outline: none;
    }

    .right-sidebar .search-box i {
        position: absolute;
        color: #aaaaaa;
    }

    .custom-modal-overlay {
        background: rgba(0, 0, 0, 0.45);
    }

    .custom-modal-box {
        background: #ffffff;
        border: 0.5px solid rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
        width: 92%;
        max-height: 85vh;
    }

    .modal-header {
        border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
        padding: 18px 20px;
    }

    .modal-header h3 {
        color: #111111;
        font-size: 16px;
    }

    .modal-close {
        color: #aaaaaa;
        background: #f0f0f2;
        border-radius: 50%;
        width: 28px;
        height: 28px;
    }

    .modal-close:hover {
        background: #e8e8ea;
        color: #111111;
    }

    .modal-body {
        padding: 18px 20px;
    }

    .modal-body p {
        color: #666666;
    }

    .modal-footer {
        border-top: 0.5px solid rgba(0, 0, 0, 0.08);
        padding: 14px 20px;
    }

    .modal-footer .btn-secondary {
        background: #f0f0f2;
        border-color: rgba(0, 0, 0, 0.10);
        color: #555555;
    }

    .modal-footer .btn-secondary:hover {
        background: #e8e8ea;
        border-color: rgba(0, 0, 0, 0.15);
    }

    .modal-footer .btn-danger {
        background: #e53e3e;
        border: none;
    }

    .modal-footer .btn-danger:hover {
        background: #c53030;
    }

    .follow-checkbox {
        accent-color: #e8440a;
    }

    .selected-count {
        color: #aaaaaa;
    }

    /* ── loading / empty state ── */
    .loading-state {
        color: #aaaaaa;
        background-color: #f5f5f7;
    }

    .loading-state i {
        color: #cccccc;
    }

    .empty-state {
        color: #aaaaaa;
        background-color: #f5f5f7;
    }

    .empty-state i {
        color: #dddddd;
    }

    /* ── footer ── */
    .footer {
        background-color: #ffffff;
        border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    }

    .footer-section h3 {
        color: #aaaaaa;
    }

    .footer-section ul li a {
        color: #bbbbbb;
    }

    .footer-section ul li a:hover {
        color: #555555;
    }

    .footer-bottom {
        border-top: 0.5px solid rgba(0, 0, 0, 0.06);
    }

    .footer-compliance {
        background-color: #f5f5f7;
    }

    .footer-compliance p,
    .footer-bottom p {
        color: #bbbbbb;
    }

    .footer-compliance a {
        color: #999999;
    }

    .footer-disclaimer {
        background-color: #fffaf5;
        border-color: rgba(232, 68, 10, 0.10);
    }

    .footer-disclaimer p {
        color: #c87040;
    }

    .footer-disclaimer a {
        color: #b05a28;
    }

    .social-links a {
        color: #cccccc;
    }

    .social-links a:hover {
        color: #666666;
    }
}

/* ===== Player Container Redesign ===== */
body[data-player-theme="metal-velvet"] {
    --player-bg: #100e12;
    --player-layer: #17141b;
    --player-layer-2: #1f1a24;
    --player-border: #342937;
    --player-text: #f5edf5;
    --player-muted: #b09fad;
    --player-accent: #d890ad;
    --player-accent-2: #f2c99f;
    --player-tip: #f6c66d;
    --player-lovense: #fb7185;
    --player-system: #93a0b7;
}

body[data-player-theme="noir-pulse"] {
    --player-bg: #0f0b0e;
    --player-layer: #191217;
    --player-layer-2: #261720;
    --player-border: #4a2439;
    --player-text: #f8ebf0;
    --player-muted: #b695a3;
    --player-accent: #d74674;
    --player-accent-2: #ff9070;
    --player-tip: #ffbb55;
    --player-lovense: #fb7185;
    --player-system: #8e95b1;
}

body[data-player-theme="slate-luxe"] {
    --player-bg: #0f1114;
    --player-layer: #181c21;
    --player-layer-2: #1f252c;
    --player-border: #394451;
    --player-text: #edf1f5;
    --player-muted: #9da8b6;
    --player-accent: #a8b3c2;
    --player-accent-2: #d8be98;
    --player-tip: #e7bf79;
    --player-lovense: #fb7185;
    --player-system: #8f9bb0;
}

body:not([data-player-theme]) {
    --player-bg: #100e12;
    --player-layer: #17141b;
    --player-layer-2: #1f1a24;
    --player-border: #342937;
    --player-text: #f5edf5;
    --player-muted: #b09fad;
    --player-accent: #d890ad;
    --player-accent-2: #f2c99f;
    --player-tip: #f6c66d;
    --player-lovense: #fb7185;
    --player-system: #93a0b7;
}

.player-container {
    background: radial-gradient(circle at 20% 0%, rgba(215, 144, 173, 0.12) 0%, rgba(16, 14, 18, 0) 32%),
        radial-gradient(circle at 90% 20%, rgba(242, 201, 159, 0.08) 0%, rgba(16, 14, 18, 0) 30%),
        var(--player-bg);
}

.player-header,
.video-info-bar,
.player-info h2,
.chat-username,
.chat-text,
.video-info-item .count,
.video-action-btn,
.player-close {
    color: var(--player-text);
}


.player-theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--player-border);
    background: var(--player-layer-2);
    border-radius: 999px;
    padding: 3px;
    margin-left: 6px;
}

.player-theme-switch button {
    border: none;
    background: transparent;
    color: var(--player-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 999px;
    padding: 4px 8px;
    cursor: pointer;
}

.player-theme-switch button.active {
    color: #201218;
    background: linear-gradient(120deg, var(--player-accent), var(--player-accent-2));
}

.player-close,
.video-action-btn,
.chat-send-btn,
.tip-submit-btn {
    font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
}

.video-info-item {
    color: var(--player-muted);
}

.video-info-item i {
    color: var(--player-accent-2);
}

.video-action-btn,
.player-close {
    background: #ff4444;
    border-color: var(--player-border);
}
.video-action-btn.followBtn{
    background-color: var(--player-border);
}
.video-action-btn.followBtn.followed{
    background-color: #fbbf24;
    color:black
}
.tip-trigger-btn {
    background: green;
    border-color: transparent;
    color: #d2d2d7;
}

.tip-trigger-btn {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

#proxy-accel-panel {
    border: 1px solid var(--player-border);
    background: var(--player-layer-2);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.proxy-toggle-btn,
.proxy-buy-btn {
    border-color: var(--player-border);
    background: #16131a;
    color: var(--player-muted);
}

.proxy-toggle-on {
    color: var(--player-text);
    background: #1e1822;
    border-color: #1d1d1f;
}

.proxy-quota-track {
    background: #2c2532;
    display: none;
}

.proxy-quota-fill {
    background: linear-gradient(90deg, var(--player-accent), var(--player-accent-2));
}

.proxy-quota-text,
.proxy-collapse-btn {
    color: var(--player-muted);
}


.chat-messages {
    background: var(--player-bg);
}

.chat-message {
    background: #19161d;
    border: 1px solid #2d2531;
    border-radius: 10px;
    padding: 9px 10px;
}

.chat-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.chat-time {
    color: var(--player-muted);
    font-size: 11px;
}

.chat-type-tag {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.chat-type-tag.type-chat {color: #e7dce7;background: #2c2532;border-color: #4c3f58;padding: 0;}
.chat-type-tag.type-tip { color: #2a1f0f; background: var(--player-tip); }
.chat-type-tag.type-lovense { color: #2b1021; background: var(--player-lovense); }
.chat-type-tag.type-status { color: #d8deef; background: #31384a; }
.chat-type-tag.type-notice {color: #dfd8f1;background: #3a2f53;padding: 0px;}
.chat-type-tag.type-log { color: #d6efd8; background: #28412b; }
.chat-type-tag.type-raw { color: #f0dfc8; background: #4f3528; }
.chat-type-tag.type-goal { color: #d8efd8; background: #2a4a2f; }
.chat-type-tag.type-purchase { color: #ead8f4; background: #4a2f5d; }

.chat-username {
    color: var(--player-accent-2);
}

.chat-text {
    color: #e5dee9;
}

.chat-highlight-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    border-radius: 8px;
    padding: 3px 8px;
    background: rgba(246, 198, 109, 0.15);
    border: 1px solid rgba(246, 198, 109, 0.4);
}

.chat-highlight-icon {
    color: var(--player-tip);
}

.chat-highlight-value {
    color: var(--player-tip);
    font-weight: 700;
    font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", sans-serif;
}

/* 打赏来自 Tip Menu 时，金额后面追加的「菜单项文案」胶囊（chat.js resolveTipMenuActivity） */
.chat-tip-menu {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    border-radius: 8px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #d8d1de;
    font-size: 12px;
    line-height: 1.4;
    max-width: 100%;
    word-break: break-word;
}

.chat-tip-menu i {
    color: var(--player-tip);
    font-size: 11px;
    flex: 0 0 auto;
}

.lovense-rich-text {
    font-size: 12px;
}

.lovense-device-row {
    color: var(--player-lovense);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.lovense-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 11px;
}

.lovense-grid-row span {
    color: var(--player-muted);
}

.lovense-grid-row b {
    color: var(--player-text);
}

.lovense-note {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid #393042;
}

.chat-input {
    background: #17141b;
    border: 1px solid #3a3042;
    color: var(--player-text);
}

.chat-input:focus {
    border-color: var(--player-accent);
    box-shadow: 0 0 0 2px rgba(216, 144, 173, 0.2);
}

.chat-send-btn {
    background: #ff9800;
    color: #f5f5f7;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.tip-modal {
    position: absolute;
    inset: 0;
    display: none;
    z-index: var(--sl-z-modal);   /* ★ 2026-11-12：1100 → 令牌（预告面板的上界） */
}

.tip-modal.open {
    display: block;
}

.tip-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 12, 0.62);
    backdrop-filter: blur(4px);
}

.tip-modal-dialog {
    position: absolute;
    right: 16px;
    bottom: 18px;
    width: min(400px, calc(100% - 24px));
    height: min(520px, 82vh);
    max-height: min(560px, 86vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: #1e1e22;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.6);
    animation: tip-modal-in 0.18s ease-out;
}

@keyframes tip-modal-in {
    from { transform: translateY(12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tip-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: none;
}

.tip-modal-header h3 {
    margin: 0;
    color: #f4f4f5;
    font-size: 14.5px;
    font-weight: 600;
}

.tip-modal-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.tip-balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.tip-balance-badge i {
    color: #fbbf24;
    font-size: 11px;
}

.tip-balance-val {
    color: #e4e4e7;
    font-weight: 600;
}

.tip-balance-val.is-low {
    color: #fb7185;
}

.tip-balance-recharge {
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #fcd34d;
    font-size: 11px;
    font-weight: 600;
    padding: 0 0 0 6px;
    cursor: pointer;
    font-family: inherit;
}

.tip-balance-recharge:hover {
    text-decoration: underline;
}

.tip-modal-close {
    border: none;
    background: transparent;
    color: rgba(244, 244, 245, 0.58);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.tip-modal-close:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.tip-modal-tabs {
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tip-tabs-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.tip-tab {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: rgba(244, 244, 245, 0.56);
    border-radius: 0;
    padding: 9px 10px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.14s ease, border-color 0.14s ease;
}

.tip-tab:hover {
    color: #e4e4e7;
}

.tip-tab.active {
    background: transparent;
    color: #fcd34d;
    border-bottom-color: #fbbf24;
}

.tip-modal.lovense-mode .tip-tab#tipTabLovense.active {
    background: transparent;
    color: #fda4af;
    border-bottom-color: #fb7185;
}

.tip-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 16px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.14) transparent;
}

.tip-modal-body::-webkit-scrollbar {
    width: 4px;
}

.tip-modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 99px;
}

.tip-pane-lovense,
.tip-modal.tip-mode .tip-pane-lovense,
.tip-modal.lovense-mode .tip-pane-tip {
    display: none;
}

.tip-modal.lovense-mode .tip-pane-lovense {
    display: block;
}

.tip-section-title {
    display: none;
}

.tip-menu-list,
.tip-quick-list,
.lovense-level-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    margin-bottom: 8px;
}

.tip-menu-item,
.tip-quick-item,
.lovense-level-item {
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.035);
    color: #f4f4f5;
    border-radius: 9px;
    padding: 10px 12px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.14s ease, border-color 0.14s ease;
}

.tip-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tip-quick-item:hover,
.lovense-level-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.lovense-level-list {
    gap: 0;
    border: none;
    border-radius: 0;
    overflow: visible;
    background: transparent;
}

.lovense-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 8px;
    text-align: left;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 7px;
}

.lovense-row:last-child {
    border-bottom-color: transparent;
}

.lovense-row:hover {
    background: rgba(255, 255, 255, 0.045);
}

.lovense-row-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1 1 auto;
}

.lovense-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
    flex: 0 0 auto;
}

.lovense-bar {
    width: 3px;
    border-radius: 1px;
    background: rgba(255, 255, 255, 0.16);
    transform-origin: bottom center;
}

.lovense-bar.on {
    background: #fb7185;
}

.lovense-row-title {
    color: #e4e4e7;
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lovense-row.active .lovense-row-title {
    color: #fff1f2;
    font-weight: 600;
}

.lovense-row-sub {
    color: rgba(244, 244, 245, 0.45);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}

.lovense-token {
    text-align: right;
    color: rgba(244, 244, 245, 0.58);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
}

.lovense-row.active {
    background: rgba(251, 113, 133, 0.15);
    border-bottom-color: transparent;
    box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.44);
    animation: lvRowGlow 1.3s ease-in-out infinite;
}

.lovense-row.active .lovense-token {
    color: #fda4af;
}

/* ★ 2026-11-28：Lovense 选中档位动感震动动画（方案3 蜜桃珊瑚粉） */
@keyframes lvBarWave {
    0%, 100% { transform: scaleY(0.35); opacity: 0.65; }
    50%      { transform: scaleY(1.12); opacity: 1; }
}
@keyframes lvVibeJitter {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-1px); }
    40%      { transform: translateX(1px); }
    60%      { transform: translateX(-0.8px); }
    80%      { transform: translateX(0.8px); }
}
@keyframes lvRowGlow {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.44), 0 0 0 rgba(0, 0, 0, 0); }
    50%      { box-shadow: inset 0 0 0 1px #fb7185, 0 0 12px rgba(251, 113, 133, 0.48); }
}
.lovense-row.active .lovense-bar.on {
    animation-name: lvBarWave;
    animation-duration: 0.72s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    box-shadow: 0 0 6px rgba(251, 113, 133, 0.48);
}
.lovense-row.active .lovense-bar.on:nth-child(1) { animation-delay: 0s; }
.lovense-row.active .lovense-bar.on:nth-child(2) { animation-delay: 0.11s; }
.lovense-row.active .lovense-bar.on:nth-child(3) { animation-delay: 0.22s; }
.lovense-row.active .lovense-bar.on:nth-child(4) { animation-delay: 0.33s; }
.lovense-row.active.lv-low   .lovense-bar.on { animation-duration: 1.05s; }
.lovense-row.active.lv-mid   .lovense-bar.on { animation-duration: 0.72s; }
.lovense-row.active.lv-high  .lovense-bar.on { animation-duration: 0.46s; }
.lovense-row.active.lv-ultra .lovense-bar.on { animation-duration: 0.28s; }
.lovense-row.active .lovense-bars {
    animation: lvVibeJitter 0.36s linear infinite;
}
.lovense-row.active.lv-low   .lovense-bars { animation-duration: 0.65s; }
.lovense-row.active.lv-mid   .lovense-bars { animation-duration: 0.42s; }
.lovense-row.active.lv-high  .lovense-bars { animation-duration: 0.28s; }
.lovense-row.active.lv-ultra .lovense-bars { animation-duration: 0.18s; }

.tip-quick-item.active {
    background: rgba(240, 178, 90, 0.16);
    border-color: rgba(240, 178, 90, 0.65);
    color: #fcd34d;
    font-weight: 700;
}

.tip-quick-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tip-input-label {
    display: block;
    color: var(--player-muted);
    margin-bottom: 6px;
    font-size: 12px;
}

#tipCustomAmountInput,
#tipMessageInput {
    width: 100%;
    border: 1px solid #3a3042;
    background: #17141b;
    color: var(--player-text);
    border-radius: 10px;
    padding: 10px;
}

#tipCustomAmountInput::-webkit-outer-spin-button,
#tipCustomAmountInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#tipCustomAmountInput {
    -moz-appearance: textfield;
    appearance: textfield;
}

.lovense-level-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.lovense-level-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    color: var(--player-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    .lovense-table-head,
    .lovense-row {
        grid-template-columns: 0.9fr 1.2fr 0.8fr;
        padding: 10px 10px;
    }

    .lovense-col {
        font-size: 14px;
    }

    .lovense-token {
        font-size: 14px;
    }
}

.tip-empty {
    border: 1px dashed #4b3d57;
    border-radius: 10px;
    color: var(--player-muted);
    padding: 12px;
    text-align: center;
}

.lovense-cb-info {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #1f1828 0%, #1a1422 100%);
    border: 1px solid #3a2d48;
    border-radius: 12px;
}

.lovense-cb-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lovense-cb-icon i {
    color: #fff;
    font-size: 20px;
}

.lovense-cb-text {
    flex: 1;
}

.lovense-cb-text p {
    margin: 0 0 5px 0;
    color: #b8afc4;
    font-size: 13px;
    line-height: 1.6;
}

.lovense-cb-text p strong {
    color: #e2d5f0;
    font-size: 15px;
}

.lovense-cb-text p:last-child {
    margin-bottom: 0;
}

.lovense-cb-switch-hint {
    margin-top: 10px !important;
    padding: 8px 12px;
    background: rgba(255, 171, 64, 0.10);
    border: 1px solid rgba(255, 171, 64, 0.20);
    border-radius: 8px;
    color: #e8c97a !important;
    font-size: 13px !important;
    text-align: center;
}

.lovense-cb-switch-hint strong {
    color: #f5a623 !important;
}

.tip-modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 0;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.tip-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    margin-bottom: 0;
}

.tip-summary-hint {
    color: rgba(244, 244, 245, 0.68);
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tip-summary-hint.is-low {
    color: #fb7185;
    font-weight: 600;
}

.tip-note-wrap {
    display: flex;
    align-items: center;
    width: 100%;
}

.tip-submit-btn {
    width: 100%;
    border: none;
    border-radius: 9px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    background: #fbbf24;
    color: #18181b;
    cursor: pointer;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    transition: background 0.14s ease;
}

.tip-submit-btn:hover:not(:disabled) {
    background: #fcd34d;
}

.tip-submit-btn.is-lovense {
    background: #f43f5e;
    color: #fff;
}

.tip-submit-btn.is-lovense:hover:not(:disabled) {
    background: #fb7185;
}

.tip-submit-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

@media (max-width: 900px) {
    .player-theme-switch {
        display: none;
    }

    .tip-modal-dialog {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
        height: min(460px, 74vh);
        max-height: 78vh;
    }

    .tip-quick-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .tip-modal {
        position: fixed;
    }

    .tip-modal-dialog {
        left: 0;
        right: 0;
        bottom: 0;
        height: min(460px, 76vh);
        max-height: 86%;
        width: 100%;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    #proxy-accel-panel {
        background: #1b161f;
        border-color: #3a3042;
    }
}
.insufficient-balance-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 12, 0);
    backdrop-filter: blur(0px);
    transition: background 0.25s ease, backdrop-filter 0.25s ease;
}
.insufficient-balance-overlay.insufficient-balance-visible {
    background: rgba(8, 8, 12, 0.65);
    backdrop-filter: blur(6px);
}
.insufficient-balance-overlay.insufficient-balance-closing {
    background: rgba(8, 8, 12, 0);
    backdrop-filter: blur(0px);
}
.insufficient-balance-dialog {
    width: min(380px, calc(100% - 32px));
    background: linear-gradient(160deg, #1e1822, #19141e);
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    transform: translateY(12px) scale(0.96);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.insufficient-balance-visible .insufficient-balance-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}
.insufficient-balance-closing .insufficient-balance-dialog {
    transform: translateY(8px) scale(0.97);
    opacity: 0;
}
.insufficient-balance-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #2a2a2a;
}
.insufficient-balance-header h3 {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #f5f5f7;
}
.insufficient-balance-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #3a3a3c;
    border-radius: 8px;
    background: #1e1822;
    color: #999;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.insufficient-balance-close:hover {
    color: #e0e0e0;
    border-color: #555;
}
.insufficient-balance-body {
    padding: 18px 20px;
}
.insufficient-balance-msg {
    margin: 0 0 8px;
    font-size: 14px;
    color: #d2d2d7;
    line-height: 1.6;
}
.insufficient-balance-hint {
    margin: 0;
    font-size: 12px;
    color: #888;
}
.insufficient-balance-footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid #2a2a2a;
}
.insufficient-balance-cancel {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #3a3a3c;
    border-radius: 10px;
    background: transparent;
    color: #999;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.insufficient-balance-cancel:hover {
    color: #e0e0e0;
    border-color: #555;
}
.insufficient-balance-recharge {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
}
.insufficient-balance-recharge:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.insufficient-balance-recharge:active {
    transform: translateY(0);
}

.header-username {
    display: none;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.header-mobile .btn .btn-text,
.header-mobile .header-token-badge .btn-text {
    display: none;
}

@media (min-width: 769px) {
    .header-username { display: inline; }
    .header-mobile .btn .btn-text,
    .header-mobile .header-token-badge .btn-text { display: inline; }
    .header-mobile .header-right { width: auto; }
    .header-mobile .search-input { width: 220px; }
    .header-mobile .user-info { flex-direction: row; align-items: center; gap: 8px; }
}

/* Token badge */
.header-token-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(251,191,36,0.12);
    border: 1px solid rgba(251,191,36,0.35);
    border-radius: 18px;
    padding: 5px 10px;
    color: #d97706;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
}
.header-token-badge.low-balance {
    background: rgba(255,68,68,0.1);
    border-color: rgba(255,68,68,0.35);
    color: #dc2626;
}
.header-token-buy {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0 2px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    opacity: 0.8;
}
.header-token-buy:hover { opacity: 1; }

/* Header redesign: glass-ribbon */
.header-container[data-header-theme] {
    --header-frame: linear-gradient(180deg, rgba(245, 250, 255, 0.92) 0%, rgba(239, 245, 252, 0.94) 100%);
    --header-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.58) 0%, rgba(235, 243, 252, 0.52) 100%);
    --header-border: rgba(152, 180, 210, 0.34);
    --header-shadow: 0 14px 34px rgba(25, 44, 74, 0.07);
    --status-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.56) 0%, rgba(229, 239, 250, 0.45) 100%);
    --status-border: rgba(147, 178, 212, 0.3);
    --status-shadow: 0 10px 22px rgba(37, 58, 90, 0.07);
    --search-surface: rgba(255, 255, 255, 0.62);
    --search-border: rgba(98, 125, 170, 0.16);
    /* --search-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9); */
    --search-icon: #7f8ea3;
    --bridge-tint: rgba(228, 238, 248, 0.92);
    --bridge-border: rgba(255, 140, 0, 0.16);
    position: relative;
    z-index: 2;
    margin: 0 auto;
    min-height: 60px;
    padding: 8px 18px;
    display: grid;
    grid-template-columns: auto minmax(24px, 1fr) auto;
    align-items: center;
    gap: 14px;
    background:
        radial-gradient(420px 120px at 8% 20%, rgba(255, 140, 0, 0.12), transparent 70%),
        radial-gradient(520px 140px at 88% 15%, rgba(29, 146, 197, 0.14), transparent 72%),
        var(--header-surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 4px 18px rgba(37, 58, 90, 0.06);
    backdrop-filter: blur(14px);
    overflow: visible;
    box-sizing: border-box;
}

.header-mobile.header-themed {
    background: var(--header-frame);
    border-bottom: none;
    box-shadow: none;
}

.header-mobile.header-themed.profile-open .header-search-box {
    display: none !important;
}

.header-container[data-header-theme] .header-brand {
    display: inline-flex;
    align-items: center;
    grid-column: 1;
    flex: 0 0 auto;
    min-width: 0;
    gap: 0;
    position: relative;
    z-index: 1002;
    transition: opacity 0.24s ease, transform 0.24s ease, max-width 0.3s ease, margin 0.3s ease;
}

.header-container[data-header-theme] .logo img {
    height: 36px;
    padding-left: 0;
}

.header-container[data-header-theme] .header-status-zone {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    grid-column: 3;
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 0;
    position: relative;
    z-index: 1002;
    transition: opacity 0.24s ease, transform 0.24s ease, max-width 0.3s ease, margin 0.3s ease;
}

.header-container[data-header-theme] .header-status-panel {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    padding: 6px 8px 6px 10px;
    overflow: visible;
}

.header-container[data-header-theme] .header-member-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding-right: 2px;
}

.header-container[data-header-theme] .header-username {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1f2937;
    font-size: 12px;
}

.header-container[data-header-theme] .header-search-box {
    position: relative;
    justify-self: auto;
    width: clamp(320px, 34vw, 420px);
    min-width: 300px;
    max-width: 420px;
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    z-index: 1003;
    margin-right: 4px;
    transform: none;
    transition: flex-basis 0.32s ease, max-width 0.32s ease, transform 0.26s ease, opacity 0.26s ease;
}

.header-container[data-header-theme] .header-status-panel > .header-search-box {
    order: -1;
}

.header-container[data-header-theme] .header-search-trigger {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(138, 170, 204, 0.32);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, rgba(231, 240, 249, 0.76) 100%);
    color: #54708f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 10px 20px rgba(62, 98, 142, 0.08);
    cursor: pointer;
}

.header-container[data-header-theme] .header-search-shell {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 0 12px 0 42px;
    border-radius: 999px;
    border: 1px solid var(--search-border);
    background: var(--search-surface);
    box-shadow: var(--search-shadow), 0 12px 28px rgba(76, 107, 149, 0.08);
    transition: box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, opacity 0.22s ease, transform 0.22s ease;
}

.header-container[data-header-theme] .header-search-leading {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--search-icon);
    font-size: 15px;
    z-index: 1;
    pointer-events: none;
}

.header-container[data-header-theme] .search-input {
    width: 100%;
    height: 42px;
    padding: 0 34px 0 0;
    border: none;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    position: relative;
    z-index: 1;
}

.header-container[data-header-theme] .search-input::placeholder {
    color: #8b97a9;
}

.header-container[data-header-theme] .search-input:focus {
    outline: none;
}

/* 隐藏浏览器原生的搜索清除按钮，避免与自定义关闭按钮重复 */
.header-container[data-header-theme] .search-input::-webkit-search-cancel-button {
    display: none;
}

.header-container[data-header-theme] .header-search-shell:focus-within {
    border-color: rgba(110, 149, 205, 0.44);
    background: var(--search-surface);
    box-shadow: var(--search-shadow), 0 12px 28px rgba(76, 107, 149, 0.08);
}

.header-container[data-header-theme] .header-search-close {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    color: var(--search-icon);
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.18s ease, background 0.18s ease;
}

.header-container[data-header-theme].search-active .header-search-close,
.header-mobile.search-active .header-search-close {
    opacity: 1;
    pointer-events: auto;
}

.header-container[data-header-theme] .header-search-close:hover {
    background: rgba(226, 236, 246, 0.9);
}

.header-container[data-header-theme] .btn {
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 12px;
}

.header-container[data-header-theme] .btn-secondary {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(112, 137, 176, 0.16);
    color: #48556a;
}

.header-container[data-header-theme] .btn-orange {
    background: linear-gradient(135deg, #ff8a3c 0%, #ff6526 100%);
    border: 1px solid rgba(255, 101, 38, 0.18);
    color: #fff;
    box-shadow: 0 8px 16px rgba(255, 101, 38, 0.16);
}

.header-container[data-header-theme] .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
}

.header-container[data-header-theme] .status-badge.basic {
    color: #6f7a8a;
}

.header-container[data-header-theme] .status-badge.platinum {
    color: #ff8c00;
    background: rgba(255, 140, 0, 0.1);
}

.header-container[data-header-theme] .header-token-badge {
    gap: 6px;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 202, 122, 0.14);
    border-color: rgba(255, 166, 31, 0.26);
    color: #d97706;
    font-size: 11px;
}

.header-container[data-header-theme] .header-token-buy {
    width: 20px;
    height: 20px;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
}

.header-mobile.header-themed .header-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(235, 243, 252, 0.08);
    backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    z-index: 1000;
}

.header-mobile.search-active .header-search-overlay {
    opacity: 1;
    pointer-events: auto;
}

.header-container[data-header-theme] .search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    display: block;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    z-index: 2004;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.header-container[data-header-theme] .search-results.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    /* z-index: 2000; */
}

.header-container[data-header-theme] .search-results-panel {
    overflow: hidden;
    border: 1px solid rgba(143, 174, 206, 0.36);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 246, 252, 0.98) 100%);
    box-shadow: 0 20px 48px rgba(25, 44, 74, 0.18);
    backdrop-filter: blur(18px);
}

.header-container[data-header-theme] .search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: linear-gradient(180deg, rgba(244, 248, 253, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-bottom: 1px solid rgba(143, 174, 206, 0.22);
}

.header-container[data-header-theme] .search-results-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #254a70;
    letter-spacing: 0.02em;
}

.header-container[data-header-theme] .search-results-count {
    font-size: 11px;
    font-weight: 600;
    color: #1d92c5;
    background: rgba(29, 146, 197, 0.10);
    padding: 2px 8px;
    border-radius: 999px;
}

.header-container[data-header-theme] .search-results-body {
    max-height: min(56vh, 460px);
    overflow-y: auto;
    padding: 6px;
    background: #f4f7fb;
}

.header-container[data-header-theme] .search-results-body::-webkit-scrollbar {
    width: 6px;
}

.header-container[data-header-theme] .search-results-body::-webkit-scrollbar-thumb {
    background: rgba(141, 164, 191, 0.45);
    border-radius: 999px;
}

.header-container[data-header-theme] .search-result-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 7px 9px;
    margin-bottom: 5px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.header-container[data-header-theme] .search-result-item:last-child {
    margin-bottom: 0;
}

.header-container[data-header-theme] .search-result-item:hover,
.header-container[data-header-theme] .search-result-item:active,
.header-container[data-header-theme] .search-result-item:focus-visible {
    background: linear-gradient(135deg, #ffffff 0%, #eef6fd 100%);
    border-color: rgba(29, 146, 197, 0.34);
    box-shadow: 0 6px 16px rgba(29, 146, 197, 0.12);
    transform: translateY(-1px);
    outline: none;
}

.header-container[data-header-theme] .search-result-thumb {
    position: relative;
    width: 76px;
    height: 57px;
    flex-shrink: 0;
    border-radius: 7px;
    overflow: hidden;
    background: #1b1f26;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container[data-header-theme] .search-result-thumb-blur {
    position: absolute;
    inset: -8px;
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    object-fit: cover;
    filter: blur(10px) brightness(0.55);
    display: none;
    pointer-events: none;
}

.header-container[data-header-theme] .search-result-thumb-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-container[data-header-theme] .search-result-item.is-portrait .search-result-thumb-blur {
    display: block;
}

.header-container[data-header-theme] .search-result-item.is-portrait .search-result-thumb-img {
    object-fit: contain;
}

.header-container[data-header-theme] .search-result-icon {
    position: relative;
    z-index: 1;
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.header-container[data-header-theme] .search-result-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.header-container[data-header-theme] .search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.header-container[data-header-theme] .search-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.header-container[data-header-theme] .search-result-name-group {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex: 1;
}

.header-container[data-header-theme] .search-result-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.22);
    flex-shrink: 0;
}

.header-container[data-header-theme] .search-result-name {
    font-weight: 700;
    font-size: 13px;
    color: #126b8e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-container[data-header-theme] .search-result-right {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.header-container[data-header-theme] .search-result-viewers {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.header-container[data-header-theme] .search-result-arrow {
    color: #94a3b8;
    font-size: 11px;
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

.header-container[data-header-theme] .search-result-item:hover .search-result-arrow {
    color: #1d92c5;
    transform: translateX(2px);
}

.header-container[data-header-theme] .search-result-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
    overflow: hidden;
    white-space: nowrap;
}

.header-container[data-header-theme] .search-result-flag {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.header-container[data-header-theme] .search-result-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(29, 146, 197, 0.10);
    color: #126b8e;
    font-size: 10.5px;
    font-weight: 600;
}

.header-container[data-header-theme] .search-result-age {
    color: #64748b;
    font-size: 11px;
}

.header-container[data-header-theme] .search-result-status {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 140, 0, 0.12);
    color: #d96500;
    font-size: 10px;
    font-weight: 600;
}

.header-container[data-header-theme] .search-result-topic {
    font-size: 11px;
    color: #6e7f94;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header-container[data-header-theme] .search-result-thumb {
        width: 64px;
        height: 48px;
    }
}

.header-container[data-header-theme] .search-state {
    padding: 28px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    color: #6b7d92;
}

.header-container[data-header-theme] .search-state i {
    font-size: 18px;
    color: #6d8fb4;
}

.header-container[data-header-theme] .search-state-title {
    font-size: 13px;
    font-weight: 700;
    color: #35557a;
}

.header-container[data-header-theme] .search-state-copy {
    font-size: 12px;
    color: #728396;
}

.header-mobile.header-themed ~ .category-tabs {
    background-image:
        radial-gradient(360px 80px at 14% 0%, rgba(255, 140, 0, 0.07), transparent 70%),
        linear-gradient(180deg, rgba(232, 241, 250, 0.96) 0%, rgba(244, 248, 252, 0.98) 65%, #edf1f5 100%);
    border-top: 2px solid rgba(255, 140, 0, 0.28);
    border-bottom: 1px solid rgba(143, 174, 206, 0.34);
    box-shadow: 0 4px 14px rgba(37, 58, 90, 0.04);
    padding-top: 8px;
}

.header-mobile.header-themed ~ .category-tabs .category-tabs-inner {
    gap: 8px;
}

.header-mobile.header-themed ~ .category-tabs .tab {
    padding: 7px 14px;
    border: 1px solid rgba(143, 174, 206, 0.36);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(226, 237, 248, 0.74) 100%);
    color: #25648a;
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.header-mobile.header-themed ~ .category-tabs .tab:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(234, 243, 252, 0.92) 100%);
    color: #165275;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 10px rgba(29, 146, 197, 0.09);
}

.header-mobile.header-themed ~ .category-tabs .tab.active {
    background: linear-gradient(180deg, #ffffff 0%, #f5f9fd 100%);
    color: #e65c12;
    font-weight: 600;
    border-color: rgba(246, 135, 51, 0.40);
    box-shadow: inset 0 2.5px 0 #ff8c00, 0 6px 16px rgba(29, 146, 197, 0.10);
}

.header-mobile.header-themed ~ .category-tabs .tag-filter-btn {
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(236, 243, 250, 0.85) 100%);
    border: 1px solid rgba(143, 174, 206, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 6px rgba(37, 58, 90, 0.04);
    transition: all 0.16s ease;
}

.header-mobile.header-themed ~ .category-tabs .tag-filter-btn:hover {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(29, 146, 197, 0.12);
}

.header-mobile.header-themed ~ .category-tabs .tag-filter-btn.tag-filter-on {
    background: linear-gradient(135deg, #1d92c5 0%, #1680ad 100%);
    color: #ffffff;
    border-color: #1680ad;
    box-shadow: 0 4px 12px rgba(29, 146, 197, 0.24);
}

.header-mobile.header-themed ~ .category-tabs .tag-filter-btn.tag-filter-active:not(.tag-filter-on) {
    position: relative;
    color: #126b8e;
    border-color: rgba(29, 146, 197, 0.55);
    background: linear-gradient(180deg, #ffffff 0%, #e8f4fb 100%);
    box-shadow: 0 2px 8px rgba(29, 146, 197, 0.14);
}

.header-mobile.header-themed ~ .category-tabs .tag-filter-btn.tag-filter-active:not(.tag-filter-on)::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff8c00;
    box-shadow: 0 0 0 1.5px #ffffff;
}

.active-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 8px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 6px;
    font-family: -apple-system, 'PingFang SC', sans-serif;
}

.active-filter-info {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.active-filter-label {
    font-size: 11.5px;
    font-weight: 500;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.active-filter-label i {
    font-size: 10px;
    color: #1d92c5;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(29, 146, 197, 0.10);
    color: #126b8e;
    font-size: 11.5px;
    font-weight: 600;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-filter-count {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.active-filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #64748b;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.active-filter-clear:hover {
    background: rgba(29, 146, 197, 0.08);
    color: #126b8e;
}

@media (max-width: 768px) {
    .active-filter-bar {
        margin: -10px -8px 8px;
        padding: 6px 12px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        background: rgba(255, 255, 255, 0.9);
    }
}

@media (min-width: 769px) {
    .header-container[data-header-theme] .btn .btn-text,
    .header-container[data-header-theme] .header-token-badge .btn-text {
        display: inline;
    }

    .header-container[data-header-theme] .header-status-panel {
        min-width: 0;
        transition: width 0.26s ease, max-width 0.26s ease, padding 0.26s ease;
    }

    .header-container[data-header-theme].search-active .header-status-zone {
        width: min(920px, calc(100vw - 96px));
        max-width: min(920px, calc(100vw - 96px));
    }

    .header-container[data-header-theme].search-active .header-search-box {
        flex: 1 1 auto;
        width: min(640px, calc(100vw - 280px));
        max-width: 640px;
        min-width: 360px;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .header-container[data-header-theme] {
        height: 56px;
        padding: 8px 10px 8px;
        display: flex;
        gap: 8px;
        /* border-radius: 0 0 18px 18px; */
        min-height: 56px;
    }

    .header-container[data-header-theme] .header-brand {
        order: 1;
        z-index: 1002;
    }

    .header-container[data-header-theme] .logo img {
        height: 28px;
    }

    .header-container[data-header-theme] .header-search-box {
        flex: 0 0 auto;
        min-width: 40px;
        max-width: none;
        width: 40px;
        margin-right: 0;
        transform: none;
    }

    .header-container[data-header-theme] .header-search-trigger {
        display: inline-flex;
    }

    .header-container[data-header-theme] .header-search-shell {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        min-height: 40px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-50%) scale(0.98);
    }

    .header-container[data-header-theme].search-active .header-search-box {
        position: relative;
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .header-container[data-header-theme].search-active .header-search-shell {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(-50%) scale(1);
    }

    .header-container[data-header-theme].search-active .header-search-trigger {
        opacity: 0;
        pointer-events: none;
    }

    .header-container[data-header-theme].search-active .header-status-panel > :not(.header-search-box) {
        opacity: 0;
        pointer-events: none;
        transform: translateX(8px);
        max-width: 0;
        min-width: 0;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
        overflow: hidden;
    }

    .header-container[data-header-theme] .header-status-zone {
        order: 2;
        flex: 0 1 auto;
        min-width: 0;
        margin-left: auto;
    }

    .header-container[data-header-theme] .header-status-panel {
        position: relative;
        width: auto;
        max-width: calc(100vw - 84px);
        gap: 5px;
        padding: 5px 7px 5px 9px;
        overflow: hidden;
    }

    .header-container[data-header-theme] .header-status-panel > .header-search-box {
        margin-right: 2px;
    }

    .header-container[data-header-theme] .header-member-summary {
        padding-right: 0;
    }

    .header-container[data-header-theme] .header-username {
        display: none;
    }

    .header-container[data-header-theme] .header-token-badge {
        min-height: 32px;
        height: 32px;
        padding: 0 10px;
        font-size: 11px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-container[data-header-theme] .status-badge,
    .header-container[data-header-theme] .btn {
        min-height: 32px;
        height: 32px;
        min-width: 32px;
        padding: 0 10px;
        font-size: 12px;
    }

    .header-container[data-header-theme] .header-search-trigger {
        width: 32px;
        height: 32px;
        min-width: 32px;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 6px 14px rgba(62, 98, 142, 0.08);
    }

    .header-container[data-header-theme] .header-search-trigger i,
    .header-container[data-header-theme] .header-token-badge > i,
    .header-container[data-header-theme] .status-badge > i,
    .header-container[data-header-theme] .btn > i,
    .header-container[data-header-theme] .header-token-buy > i {
        font-size: 13px;
        line-height: 1;
    }

    .header-container[data-header-theme] .header-token-buy {
        width: 18px;
        height: 18px;
    }

    .header-container[data-header-theme] .btn .btn-text,
    .header-container[data-header-theme] .header-token-badge .btn-text {
        display: none;
    }

    .header-container[data-header-theme] .search-input {
        height: 40px;
        padding-right: 34px;
    }

    .header-container[data-header-theme] .search-results {
        top: calc(100% + 5px);
    }

    .header-container[data-header-theme].search-active .header-status-panel {
        width: 100%;
        padding-right: 6px;
        overflow: visible;
    }

    .header-container[data-header-theme].search-active .header-status-zone {
        flex: 1 1 auto;
        width: calc(100vw - 96px);
        max-width: calc(100vw - 96px);
    }

}

@media (max-width: 480px) {
    .header-container[data-header-theme] {
        padding: 7px 8px 7px;
    }

    .header-container[data-header-theme] .header-status-panel {
        justify-content: flex-end;
    }

    .header-container[data-header-theme] .header-token-badge {
        padding: 4px 7px;
    }

    .header-container[data-header-theme] .btn,
    .header-container[data-header-theme] .status-badge {
        padding: 4px 7px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   购票表演预告控件（P0/P1，2026-10-31；2026-11-02 照官方重设计）
   ──────────────────────────────────────────────────────────────────────────
   结构照 SP 官方 `group-show-control`：折叠按钮常驻控制栏，点击向上展开面板。

   ★ 官方样式对照（broadcastPage_dark 采集，2026-11-02）：
     - 折叠按钮 group-show-btn--new：实心 #feb601 + border:transparent，字 #101010 700
     - 已购态 --purchased：透明底 + 2px #feb601 描边，字 #f8f8f8
     - 面板 GroupShowAnnounce：无外框，header #2e2e2e / body #262626 各自圆角
     - 购票按钮 btn-v2-gold-outline-ds：透明底 2px 金描边，hover 反填金底黑字
     - 图标底 GroupShowIcon__overlay：圆形橙金对角渐变

   ★★★ 2026-11-12 正式上线（取消隐藏）★★★
   控件常驻 DOM，**只在「有预告」时显示**：JS 依旧只填内容 + 写 `data-state`
   （`none` / `upcoming` / `paid`），**绝不写 display**；CSS 用
   `#gsAnnounce[data-state="none"]` 把「无预告 / 已开演 / 终局」收起，
   避免控制栏挂一个没有数据的空按钮。
   ══════════════════════════════════════════════════════════════════════════ */

.gs-announce {
    /* ★ 2026-11-11：全局 static —— 面板不再挂在按钮上（按钮位置随文案宽度漂移，
       以它居中必然一端出界），统一以上层的 .video-info-bar（position:relative，
       宽 = 整条控制栏）为定位基准。 */
    position: static;
    display: inline-flex;
    align-items: center;
}
#gsAnnounce[data-state="none"] {
    display: none;            /* ← 唯一显隐开关：无预告时收起（勿加 !important） */
}

/* ── 折叠按钮：官方实心金橙，视觉无边框 ──
   ★ 2026-11-11：高度必须与 #tipOpenBtn（.video-action-btn + .fas 图标）逐像素一致。
     浏览器实测（同源加载线上 FA 字体）：原 4px padding + 2px border + 14px 图标
     比打赏按钮高；只把 padding/border 对齐仍差 2px —— 14px 图标把内容行盒撑到
     14px，而打赏按钮的图标继承 12px × line-height:1 = 12px。
     所以三处全部对齐：padding 6px / border 1px / 图标 12px，两个按钮盒模型完全一致，
     不写死 height（响应式里 .video-action-btn 只改左右 padding，上下仍是 6px）。 */
.gs-announce-btn {
    background: #feb601;
    border: 1px solid transparent;    /* 2px → 1px，与 .video-action-btn 一致 */
    color: #101010;
    padding: 6px 13px 6px 10px;       /* 上下 4px → 6px；左右保持官方观感 */
    font-weight: 700;
    cursor: pointer;
}
.gs-announce-btn i { font-size: 12px; }   /* 与 #tipOpenBtn 的图标同字号，内容行高才会相同 */
.gs-announce-btn .pale { opacity: 1; font-weight: 500; }
.gs-announce-btn .gs-timer { font-variant-numeric: tabular-nums; letter-spacing: 0.3px; }
/* 窄屏短标签：桌面隐藏，只在 ≤768px 的媒体查询里显示（与完整文案二选一） */
.gs-announce-btn .gs-ann-short { display: none; }
.gs-announce-btn:hover,
.gs-announce-btn:active {
    background: #fbc932;
    border-color: transparent;
    color: #101010;
}
/* 已购态：官方 --purchased —— 透明底 + 金描边 */
.gs-announce-btn.is-paid {
    background: transparent;
    border-color: #feb601;
    color: #f8f8f8;
    font-weight: 600;
    /* border 从 2px 降到 1px 后，用内阴影补回官方 2px 金描边的观感，不占布局高度 */
    box-shadow: inset 0 0 0 1px #feb601;
}
.gs-announce-btn.is-paid i { color: #feb601; }

/* ── 面板：官方 GroupShowAnnounce —— 无外框双色块 ──
   ★ 2026-11-11：定位基准 = .video-info-bar（position:relative），
     右缘与控制栏对齐（right:0）而不是居中于按钮 —— 按钮文字再短，
     面板右缘也不会越过控制栏/视口，任何端都完整显示。
     max-width 按定位基准（bar）宽算，极窄时自动收，两侧各留 12px。
   ★ 2026-11-11 下午：right 0 → 12px，右缘留出间距不紧贴右边元素
     （与 max-width 预留的 12px 左右边距对称）。 */
.gs-announce-panel {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 12px;
    transform: translateY(4px);
    width: 322px;
    max-width: calc(100% - 24px);
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s, transform 0.16s, visibility 0.16s;
    /* ★ 2026-11-12：60 → 1050。原值被 .mmp-control-bar 的内联 z-index:1000
       压住 —— 鼠标移进视频区时控制条由 hidden 变 visible，就遮住面板下半部。
       上界是 .tip-modal(--sl-z-modal:1100)，不能 ≥ 1100。 */
    z-index: var(--sl-z-announce);
    text-align: left;
}
.gs-announce-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ── 聊天窗口顶部固定预告购票条（展开：无渐变磨砂卡片；收起：极简通栏单行条） ── */
.chat-gs-ann-banner {
    flex: 0 0 auto;
    margin: 8px 8px 4px;
    padding: 10px 11px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
}
.chat-gs-ann-banner.is-paid {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.30);
}
.chat-gs-ann-expanded {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-gs-ann-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.chat-gs-ann-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.chat-gs-ann-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.25;
    background: rgba(251, 191, 36, 0.18);
    color: #fcd34d;
    flex: 0 0 auto;
}
.chat-gs-ann-banner.is-paid .chat-gs-ann-badge {
    background: rgba(52, 211, 153, 0.18);
    color: #6ee7b7;
}
.chat-gs-ann-time {
    font-size: 11px;
    color: rgba(244, 244, 245, 0.62);
    white-space: nowrap;
}
.chat-gs-ann-topic {
    color: #f4f4f5;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}
.chat-gs-ann-toggle {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: rgba(244, 244, 245, 0.58);
    cursor: pointer;
    padding: 0;
    transition: background 90ms ease, color 90ms ease;
}
.chat-gs-ann-toggle:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}
.chat-gs-ann-toggle i {
    font-size: 11px;
}
.chat-gs-ann-actions {
    display: flex;
    align-items: center;
}
.chat-gs-ann-banner .chat-gs-ann-btn {
    width: 100%;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 7px;
    border: none;
    background: #fbbf24;
    color: #18181b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}
.chat-gs-ann-banner .chat-gs-ann-btn:hover:not(:disabled) {
    background: #fcd34d;
    color: #18181b;
}
.chat-gs-ann-banner .chat-gs-ann-btn.is-paid {
    background: rgba(52, 211, 153, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.28);
    color: #6ee7b7;
    font-weight: 600;
    cursor: default;
}
.chat-gs-ann-banner .chat-gs-ann-btn.is-closed {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(244, 244, 245, 0.55);
    font-weight: 600;
    cursor: default;
}

/* 收起态：方案 A 极简通栏单行条 */
.chat-gs-ann-compact {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
}
.chat-gs-ann-compact-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}
.chat-gs-ann-compact-icon {
    color: #fbbf24;
    font-size: 11.5px;
    flex: 0 0 auto;
}
.chat-gs-ann-banner.is-paid .chat-gs-ann-compact-icon {
    color: #6ee7b7;
}
.chat-gs-ann-compact-topic {
    color: #fef3c7;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-gs-ann-banner.is-paid .chat-gs-ann-compact-topic {
    color: #a7f3d0;
}
.chat-gs-ann-compact-time {
    color: rgba(244, 244, 245, 0.58);
    font-size: 11px;
    white-space: nowrap;
    flex: 0 0 auto;
}
.chat-gs-ann-compact-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.chat-gs-ann-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    background: #fbbf24;
    color: #18181b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.chat-gs-ann-pill:hover {
    background: #fcd34d;
}
.chat-gs-ann-pill.is-paid {
    background: rgba(52, 211, 153, 0.18);
    border: 1px solid rgba(52, 211, 153, 0.30);
    color: #6ee7b7;
    font-weight: 600;
    cursor: default;
}
.chat-gs-ann-pill.is-closed {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(244, 244, 245, 0.58);
    font-weight: 600;
    cursor: default;
}
.chat-gs-ann-banner.is-collapsed {
    margin: 0;
    padding: 7px 10px;
    border-radius: 0;
    background: rgba(254, 182, 1, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-bottom: 1px solid rgba(254, 182, 1, 0.22);
    box-shadow: none;
}
.chat-gs-ann-banner.is-collapsed.is-paid {
    background: rgba(52, 211, 153, 0.08);
    border-bottom-color: rgba(52, 211, 153, 0.22);
}
.chat-gs-ann-banner.is-collapsed .chat-gs-ann-expanded {
    display: none;
}
.chat-gs-ann-banner.is-collapsed .chat-gs-ann-compact {
    display: flex;
}

/* ── 独立轻量预告购票确认框（方案 1 · 极简磨砂卡片，无渐变，解耦打赏弹窗） ── */
.gs-ann-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--sl-z-modal);
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.gs-ann-confirm-card {
    width: 100%;
    max-width: 340px;
    background: #202024;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: #f4f4f5;
}
.gs-ann-confirm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gs-ann-confirm-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.gs-ann-confirm-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.20);
    color: #fcd34d;
    flex: 0 0 auto;
}
.gs-ann-confirm-title {
    font-size: 14px;
    font-weight: 600;
    color: #f4f4f5;
}
.gs-ann-confirm-close {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: rgba(244, 244, 245, 0.58);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.gs-ann-confirm-close:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}
.gs-ann-confirm-box {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gs-ann-confirm-topic {
    font-size: 12.5px;
    font-weight: 500;
    color: #f4f4f5;
    line-height: 1.4;
    word-break: break-word;
}
.gs-ann-confirm-sub {
    font-size: 11px;
    color: rgba(244, 244, 245, 0.58);
}
.gs-ann-confirm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.gs-ann-confirm-price-row {
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.gs-ann-confirm-label {
    font-size: 12px;
    color: rgba(244, 244, 245, 0.62);
}
.gs-ann-confirm-price {
    font-size: 14px;
    font-weight: 700;
    color: #fcd34d;
    font-variant-numeric: tabular-nums;
}
.gs-ann-confirm-bal {
    font-size: 11.5px;
    color: #d4d4d8;
    font-variant-numeric: tabular-nums;
}
.gs-ann-confirm-bal.is-low {
    color: #fb7185;
    font-weight: 600;
}
.gs-ann-confirm-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.gs-ann-confirm-cancel,
.gs-ann-confirm-ok {
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    font-size: 12.5px;
    cursor: pointer;
    font-family: inherit;
    transition: background 90ms ease;
}
.gs-ann-confirm-cancel {
    background: rgba(255, 255, 255, 0.07);
    color: #e4e4e7;
    font-weight: 500;
}
.gs-ann-confirm-cancel:hover {
    background: rgba(255, 255, 255, 0.13);
}
.gs-ann-confirm-ok {
    background: #fbbf24;
    color: #18181b;
    font-weight: 700;
}
.gs-ann-confirm-ok:hover {
    background: #fcd34d;
}

/* ── 聊天窗口预告购票卡片（桌面 + 移动端通用，移动端在 ≤768px 下收紧） ── */
.chat-message.gs-announce-card {
    background: rgba(254, 182, 1, 0.08);
    border: 1px solid rgba(254, 182, 1, 0.32);
    border-left: 3px solid #feb601;
    border-radius: 6px;
    padding: 8px 10px;
}
.chat-message.gs-announce-card.is-paid {
    background: rgba(143, 208, 169, 0.08);
    border-color: rgba(143, 208, 169, 0.32);
    border-left-color: #8fd0a9;
}
.chat-gs-ann-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.chat-gs-ann-text {
    flex: 1 1 180px;
    min-width: 0;
    color: #f4ead6;
    font-size: 12px;
    line-height: 1.45;
}
.chat-gs-ann-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding: 4px 10px;
    border-radius: 5px;
    border: 1.5px solid #feb601;
    background: rgba(254, 182, 1, 0.14);
    color: #feb601;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    font-family: inherit;
    transition: background 90ms ease, color 90ms ease;
}
.chat-gs-ann-btn:hover:not(:disabled) {
    background: #feb601;
    color: #101010;
}
.chat-gs-ann-btn .chat-gs-ann-price {
    font-variant-numeric: tabular-nums;
}
.chat-gs-ann-btn.is-paid {
    border-color: rgba(143, 208, 169, 0.55);
    background: rgba(143, 208, 169, 0.12);
    color: #8fd0a9;
    cursor: default;
}
.chat-gs-ann-btn.is-closed {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(248, 248, 248, 0.55);
    cursor: default;
}
@media (max-width: 768px) {
    .chat-gs-ann-banner {
        margin: 6px 6px 2px;
        padding: 8px 9px;
    }
    .chat-gs-ann-topic {
        font-size: 11.5px;
        line-height: 1.35;
    }
    .chat-gs-ann-banner .chat-gs-ann-btn {
        padding: 6px 10px;
        font-size: 11.5px;
    }
    .chat-gs-ann-banner.is-collapsed {
        padding: 5px 8px;
    }
    .chat-gs-ann-pill {
        padding: 3px 8px;
        font-size: 10.5px;
    }
    .chat-messages .chat-message.gs-announce-card {
        height: auto;
        min-height: 30px;
        padding: 5px 6px;
        white-space: normal;
        flex-wrap: wrap;
        background: rgba(254, 182, 1, 0.09);
        border: 1px solid rgba(254, 182, 1, 0.28);
        border-radius: 5px;
        margin: 2px 0;
    }
    .chat-messages .chat-message.gs-announce-card .chat-text {
        white-space: normal;
        overflow: visible;
        line-height: 1.35;
    }
    .chat-messages .chat-message.gs-announce-card .chat-gs-ann-body {
        gap: 6px;
    }
    .chat-messages .chat-message.gs-announce-card .chat-gs-ann-text {
        font-size: 11px;
        flex: 1 1 130px;
    }
    .chat-messages .chat-message.gs-announce-card .chat-gs-ann-btn {
        padding: 3px 8px;
        font-size: 10.5px;
    }
}

.gs-announce-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(248, 248, 248, 0.4);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    z-index: 1;
}
.gs-announce-close:hover { color: rgba(248, 248, 248, 0.8); }
.gs-announce-close i { font-size: 12px; }

/* header：官方 GroupShowAnnounceHeader */
.gs-announce-head {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 13px 20px;
    padding-right: 40px;
    min-height: 72px;
    background: #2e2e2e;
}
/* 图标底：官方 GroupShowIcon__overlay（橙金对角渐变圆） */
.gs-announce-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(254, 125, 33, 0.25) 0%, rgba(251, 201, 50, 0.12) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: #feb601;
}
.gs-announce-icon i { font-size: 18px; }
.gs-announce-topic {
    font-size: 13px;
    line-height: 1.55;
    color: #f8f8f8;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* divider：官方 = 背景条内嵌 1px 线，两端留白 */
.gs-announce-divider {
    display: flex;
    padding: 0 20px;
    background: #2e2e2e;
}
.gs-announce-divider::after {
    content: "";
    border-bottom: 1px solid #424242;
    flex: 1;
}

/* body：官方 GroupShowAnnounceBody */
.gs-announce-body {
    background: #262626;
    padding: 14px 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── 购票按钮：官方 btn-v2-gold-outline-ds —— 2px 描边，hover 反填 ── */
.gs-announce-buy {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 2px solid #feb601;
    color: #f8f8f8;
    padding: 8px 17px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background 90ms ease-in-out, color 90ms ease-in-out;
}
.gs-announce-buy:hover {
    background: #feb601;
    color: #101010;
}
.gs-announce-buy .gs-price { color: #feb601; font-weight: 700; transition: color 90ms ease-in-out; }
.gs-announce-buy:hover .gs-price { color: #101010; }
.gs-announce-buy .gs-unit { font-size: 11px; font-weight: 500; opacity: 0.75; margin-left: 1px; }
.gs-announce-buy.is-paid {
    border-color: rgba(254, 182, 1, 0.5);
    color: rgba(248, 248, 248, 0.6);
    background: transparent;
    cursor: default;
    font-weight: 600;
}
.gs-announce-buy.is-paid .gs-price { display: none; }

.gs-announce-hint {
    font-size: 12px;
    color: rgba(248, 248, 248, 0.6);
    margin-top: 9px;
    line-height: 1.5;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════════
   移动端（≤768px）2026-11-11 —— 从整条 .video-info-bar 布局出发
   ──────────────────────────────────────────────────────────────────────────
   ★ 小屏「观看中 / 时长」是隐藏的，整条控制栏实际只剩右侧操作组。
     预告按钮按自然 DOM 顺序排在 关注(followBtn) 与 打赏(tipOpenBtn) 中间，
     只允许它自身收缩（flex:0 1 auto + ellipsis），兄弟按钮一个不被挤。
   ② 面板定位基准已全局改为 .video-info-bar 右缘对齐（见 .gs-announce-panel），
     移动端 bar 宽 = 视口 → 面板天然不出界，这里不再需要额外覆盖。
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* 左侧信息位小屏不占位（与线上一致），整条 bar 交给操作组 */
    .video-info-left { display: none; }
    .video-info-bar { gap: 0; }
    .video-info-right {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-end;
    }

    /* 预告控件排在关注/打赏中间（自然 DOM 顺序），是唯一可收缩的元素 */
    #gsAnnounce {
        flex: 0 1 auto;
        min-width: 0;
        max-width: 100%;
    }
    #gsAnnounceBtn { max-width: 100%; min-width: 0; }
    .video-info-right > .video-action-btn { flex: 0 0 auto; }

    /* 恢复文字（全局 `.video-action-btn span{display:none}` 会把它抹掉），并按宽度截断 */
    #gsAnnounceBtn #gsAnnounceText {
        display: inline-block;
        flex: 0 1 auto;
        /* ★ 文字恢复后不能把按钮撑高：压到 12px 内容行高，与纯图标按钮同高 */
        line-height: 1;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: middle;
    }
    /* 两个 id 打底，特异性必须压过 `.video-action-btn span{display:none}` */
    #gsAnnounceBtn #gsAnnounceText > span { display: inline; }
    #gsAnnounceBtn #gsAnnounceText .gs-ann-full { display: none; }
    #gsAnnounceBtn #gsAnnounceText .gs-ann-short { display: inline; }
}

/* 空间够（≥360px）就显示完整文案；更窄才退回「短标签 + 倒计时」 */
@media (min-width: 360px) and (max-width: 768px) {
    #gsAnnounceBtn #gsAnnounceText .gs-ann-full { display: inline; }
    #gsAnnounceBtn #gsAnnounceText .gs-ann-short { display: none; }
}

/* ══════════════════════════════════════════════════════════════════════════
   小屏聊天消息「单行密度流」（方案 A，2026-11-12）
   ──────────────────────────────────────────────────────────────────────────
   ★ 用户口径：不要左侧 border —— border-left 与左侧渐变色带一律不用。
   ★ 类型区分（2026-11-12 二次改版，用户选 F）：整行文字按消息类型染色，不再铺整行底色；
     等级 / 身份 / 类型点 / 金额 / 菜单图标改用各自语义的实色小徽章（亮底深字），
     脱离行色当锚点；时间保持中性灰。
   ★ 桌面（>768px）完全保持原多行卡片；本区块放在文件末尾，
     选择器带 .chat-messages 前缀以压过 3455 段起的 --player-* 主题覆盖。
   ★ DOM 结构不变（.chat-meta-row / .chat-highlight-row / .chat-tip-menu / .chat-text
     全部保留），只是重排成一行；因此既有前端单测对 innerHTML 的断言不受影响。
   ★ 长正文省略，点击行切换 .chat-expanded 恢复多行（chat.js 全局委托，仅小屏生效）。
   ══════════════════════════════════════════════════════════════════════════ */

/* 徽章容器：桌面隐藏，只有小屏排进单行 */
.chat-badges { display: none; }

@media (max-width: 768px) {
    .chat-messages { padding: 5px 6px; }

    .chat-messages .chat-message {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 4px;
        height: 25px;
        min-height: 25px;
        margin: 0;
        padding: 0 3px;
        background: transparent;
        border: 0;                       /* ★ 无左边框 */
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.045);
        overflow: hidden;
        white-space: nowrap;
    }

    /* ── F：整行按消息类型染色，零底色 ──
       .chat-text / .chat-username 在基础样式里有显式 color（且按类型覆盖过多次），
       必须强制继承行色；时间保持中性灰；徽章/图标有自己的实色，不跟随行色。 */
    .chat-messages .chat-message { color: var(--player-text); }
    .chat-messages .chat-message .chat-text,
    .chat-messages .chat-message .chat-username { color: inherit !important; }
    .chat-messages .chat-message.tip { color: var(--player-tip); }
    .chat-messages .chat-message.purchase,
    .chat-messages .chat-message.ticket,
    .chat-messages .chat-message.goal,
    .chat-messages .chat-message.thresholdGoal { color: #8fd0a9; }
    .chat-messages .chat-message.lovense { color: var(--player-lovense); }
    .chat-messages .chat-message.notice { color: #c3adff; }
    .chat-messages .chat-message.status,
    .chat-messages .chat-message.log,
    .chat-messages .chat-message.raw,
    .chat-messages .chat-message.broadcast { color: var(--player-muted); }

    .chat-messages .chat-message > * { flex: 0 0 auto; min-width: 0; }

    .chat-messages .chat-meta-row {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        flex: 0 0 auto !important;
        margin: 0;
        justify-content: flex-start;
    }
    .chat-messages .chat-meta-left {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
    }
    .chat-messages .chat-time {
        margin: 0;
        font-size: 10px;
        color: var(--player-muted);
        font-variant-numeric: tabular-nums;
    }
    .chat-messages .chat-username {
        display: inline-block;
        max-width: 92px;
        margin: 0;
        padding: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        font-weight: 650;
        line-height: 1;
    }

    /* 类型标签压成小色点：F 下非普通消息都显示，按类型上色 + 同色光晕 */
    .chat-messages .chat-type-tag {
        flex: 0 0 6px;
        width: 6px;
        height: 6px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        font-size: 0;
        line-height: 0;
        overflow: hidden;
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.07);
    }
    .chat-messages .chat-type-tag.type-chat { display: none; }
    .chat-messages .chat-type-tag.type-tip { background: var(--player-tip); }
    .chat-messages .chat-type-tag.type-lovense { background: var(--player-lovense); }
    .chat-messages .chat-type-tag.type-purchase,
    .chat-messages .chat-type-tag.type-goal,
    .chat-messages .chat-type-tag.type-log { background: #8fd0a9; }
    .chat-messages .chat-type-tag.type-notice { background: #c3adff; }
    .chat-messages .chat-type-tag.type-status,
    .chat-messages .chat-type-tag.type-raw { background: var(--player-muted); }

    /* 打赏金额：去掉外框，金币图标与数字胶囊间留 4px 间距 */
    .chat-messages .chat-highlight-row {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
    }
    /* 金币图标恢复并上色；金额改实色胶囊（亮底深字），不跟随行色 */
    .chat-messages .chat-highlight-icon {
        display: inline-flex;
        align-items: center;
        font-size: 9px;
        line-height: 1;
        color: var(--player-tip);
    }
    .chat-messages .chat-highlight-icon i { font-size: 9px; }
    .chat-messages .chat-highlight-value {
        display: inline-flex;
        align-items: center;
        height: 15px;
        padding: 0 4px;
        border-radius: 4px;
        background: var(--player-tip);
        color: #2a1f0f;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
        font-variant-numeric: tabular-nums;
    }

    /* Tip Menu 项：小胶囊、超长省略 */
    .chat-messages .chat-tip-menu {
        display: inline-flex;
        align-items: center;
        gap: 0;
        height: 16px;
        max-width: 84px;
        margin: 0;
        padding: 0 4px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.05);
        color: var(--player-accent-2);
        font-size: 10px;
        line-height: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .chat-messages .chat-tip-menu i {
        display: inline-block;
        margin-right: 3px;
        font-size: 9px;
        color: var(--player-accent-2);
    }
    .chat-messages .chat-tip-menu span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 正文吃掉剩余宽度，超出省略 */
    .chat-messages .chat-text {
        flex: 1 1 auto !important;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11.5px;
        line-height: 1;
    }
    .chat-messages .chat-text br { display: none; }
    .chat-messages .chat-text > div { display: inline; }
    .chat-messages .chat-text img,
    .chat-messages .chat-text .emoticon-img {
        max-height: 14px;
        width: auto;
        vertical-align: middle;
    }

    /* 玩具震动：正文里已有「来自 用户名」，隐藏前缀用户名，且整行内垂直居中对齐 */
    .chat-messages .chat-message.lovense .chat-meta-left .chat-username {
        display: none;
    }
    .chat-messages .chat-message.lovense .chat-text {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    .chat-messages .chat-message.lovense .chat-text > span {
        line-height: 1.2;
    }
    .chat-messages .chat-message.lovense .chat-lovense.lovense-icon {
        flex: 0 0 auto;
        line-height: 1.2;
    }
    .chat-messages .chat-message.lovense .chat-lovense.chat-username {
        flex: 0 1 auto;
        min-width: 0;
        line-height: 1.2;
    }
    .chat-messages .chat-message.lovense.chat-expanded .chat-text {
        flex-wrap: wrap;
    }

    /* 徽章：等级联盟 / 身份 / 粉丝团（桌面隐藏，这里才显示） */
    .chat-messages .chat-badges {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        flex: 0 0 auto;
    }
    /* 图标独立配色：亮实底 + 深字，从彩色行文字里跳出来当固定锚点 */
    .chat-messages .chat-badge-rank {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 14px;
        min-width: 15px;
        padding: 0 3px;
        border-radius: 4px;
        background: #cfd8e3;
        border: 1px solid transparent;
        color: #1a1d22;
        font-size: 9px;
        font-weight: 900;
        line-height: 1;
        font-variant-numeric: tabular-nums;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10);
    }
    .chat-messages .chat-badge-rank.league-royal { background: #ff9ee0; color: #3a1030; }
    .chat-messages .chat-badge-rank.league-diamond { background: #7cc4ff; color: #0c2438; }
    .chat-messages .chat-badge-rank.league-gold { background: #ffd166; color: #3a2a05; }
    .chat-messages .chat-badge-rank.league-silver { background: #cfd8e3; color: #1a1d22; }
    .chat-messages .chat-badge-rank.league-bronze { background: #f0a97f; color: #3a1f10; }
    .chat-messages .chat-badge-id {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 14px;
        min-width: 14px;
        padding: 0 2px;
        border-radius: 4px;
        background: #ffd166;
        color: #3a2a05;
        font-size: 9px;
        font-weight: 900;
        line-height: 1;
    }
    .chat-messages .chat-badge-id[title="骑士"] { background: #7cc4ff; color: #0c2438; }
    .chat-messages .chat-badge-id.badge-admin { background: #8fd0a9; color: #10301f; }
    .chat-messages .chat-badge-id.badge-ultimate { background: #b7a8f0; color: #241a45; }
    .chat-messages .chat-badge-fan {
        display: inline-flex;
        align-items: center;
        height: 14px;
        padding: 0 3px;
        border-radius: 4px;
        background: #f0a9c7;
        border: 1px solid #f0a9c7;
        color: #3a1425;
        font-size: 9px;
        font-weight: 800;
        line-height: 1;
    }

    /* 公告条也收紧成一行（点击展开的既有逻辑保持不变） */
    .chat-notice { padding: 5px 8px; gap: 6px; align-items: center; }
    .chat-notice-icon { margin-top: 0; }
    .chat-notice-text { -webkit-line-clamp: 1; }

    /* 点击展开态：恢复多行，把被省略的正文完整显示 */
    .chat-messages .chat-message.chat-expanded {
        height: auto;
        min-height: 25px;
        flex-wrap: wrap;
        white-space: normal;
        padding: 5px 3px;
        border-bottom-color: rgba(255, 255, 255, 0.10);
    }
    .chat-messages .chat-message.chat-expanded .chat-text {
        flex: 1 1 100% !important;
        white-space: pre-wrap;
        overflow: visible;
        font-size: 12px;
        line-height: 1.5;
    }
    .chat-messages .chat-message.chat-expanded .chat-username { max-width: none; }
    .chat-messages .chat-message.chat-expanded .chat-tip-menu { max-width: 100%; }
}

/* 窄屏字段降级：先丢粉丝团月数/菜单长度，再丢身份标记，正文始终保留 */
@media (max-width: 375px) {
    .chat-messages .chat-badge-fan { display: none; }
    .chat-messages .chat-tip-menu { max-width: 56px; }
    /* 图标上色后多占约 14px，窄屏先丢两个装饰图标，正文始终保留 */
    .chat-messages .chat-tip-menu i,
    .chat-messages .chat-highlight-icon { display: none; }
    .chat-messages .chat-username { max-width: 76px; }
}
@media (max-width: 340px) {
    .chat-messages .chat-badge-id { display: none; }
    .chat-messages .chat-time { font-size: 9px; }
    .chat-messages .chat-username { max-width: 66px; }
    .chat-messages .chat-tip-menu { max-width: 44px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Desktop 播放器与聊天区重设计（2026-11-27，用户定稿：LiveJasmin 暗奢 + DM Sans）
   ★ 仅作用于 >768px 桌面端；不动 ≤768px 移动端规则、不给 .video-info-bar 加 z-index、
     .video-info-right 按钮保持线上原版样式。
   ═══════════════════════════════════════════════════════════════════════════ */

/* 震动波浪线动画（全局可用，桌面与移动端均可正常渲染） */
.chat-lovense.lovense-icon {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.2;
}
.lovense-wave {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 12px;
    flex-shrink: 0;
}
.lovense-wave i {
    display: block;
    width: 2px;
    height: 4px;
    border-radius: 1px;
    background: currentColor;
    transform-origin: center;
    opacity: 0.72;
}
.lovense-wave i:nth-child(1) { height: 4px; }
.lovense-wave i:nth-child(2) { height: 8px; }
.lovense-wave i:nth-child(3) { height: 11px; }
.lovense-wave i:nth-child(4) { height: 7px; }
.lovense-wave i:nth-child(5) { height: 5px; }
/* 仅实时震动在对应秒数内带 .is-playing 播动画，到点移除即静止 */
.lovense-wave.is-playing i {
    animation: lovenseWave 1.05s ease-in-out infinite;
}
.lovense-wave.is-playing i:nth-child(1) { animation-delay: 0s; }
.lovense-wave.is-playing i:nth-child(2) { animation-delay: 0.14s; }
.lovense-wave.is-playing i:nth-child(3) { animation-delay: 0.28s; }
.lovense-wave.is-playing i:nth-child(4) { animation-delay: 0.42s; }
.lovense-wave.is-playing i:nth-child(5) { animation-delay: 0.56s; }
.lovense-wave.is-playing.pwr-low i { animation-duration: 1.4s; opacity: 0.85; }
.lovense-wave.is-playing.pwr-medium i { animation-duration: 0.95s; }
.lovense-wave.is-playing.pwr-high i { animation-duration: 0.65s; }
.lovense-wave.is-playing.pwr-ultra i { animation-duration: 0.45s; }

@keyframes lovenseWave {
    0%, 100% { transform: scaleY(0.35); opacity: 0.55; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* 移动端隐藏桌面专用 LIVE 徽章（移动端 header 本身 display:none，加一层保险） */
.header-live-pill { display: none; }

/* 移动端主播徽章兜底样式 */
@media (max-width: 768px) {
    .chat-messages .chat-badge-model {
        display: inline-flex;
        align-items: center;
        height: 14px;
        padding: 0 4px;
        border-radius: 4px;
        background: #c9a66b;
        color: #111113;
        font-size: 9px;
        font-weight: 800;
        line-height: 1;
    }
}

@media (min-width: 769px) {
    .player-container {
        background: #0c0c0d;
        color: #e8e6e1;
        font-family: "DM Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    }

    /* ── 顶栏 Header ── */
    .player-header {
        height: 46px;
        padding: 0 18px;
        background: #111113;
        border-bottom: 1px solid #222226;
        gap: 16px;
    }
    .player-info {
        gap: 10px;
    }
    .header-live-pill {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.1em;
        color: #c9a66b;
        background: #1a1815;
        border: 1px solid #362f23;
        padding: 2px 7px;
        border-radius: 3px;
        flex-shrink: 0;
        line-height: 1.4;
    }
    .header-live-pill::before {
        content: "";
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: #c94040;
    }
    .player-info h2 {
        font-size: 14px;
        font-weight: 500;
        color: #efede8;
        letter-spacing: 0.01em;
    }
    .player-close {
        width: 30px;
        height: 30px;
        padding: 0;
        border-radius: 4px;
        background: transparent;
        border: 1px solid #26262a;
        color: #8c8a85;
        justify-content: center;
    }
    .player-close:hover {
        background: #1d1d21;
        color: #ffffff;
    }
    .player-close i {
        font-size: 13px;
    }

    /* ── 底部信息栏（不设 z-index；.video-info-right 按钮保留线上原版） ── */
    .video-info-bar {
        height: 52px;
        padding: 0 18px;
        background: #111113;
        border-top: 1px solid #222226;
    }
    .video-info-left {
        gap: 18px;
    }
    .video-info-item {
        gap: 6px;
        font-size: 12px;
        color: #85837e;
        font-variant-numeric: tabular-nums;
    }
    .video-info-item i {
        font-size: 11.5px;
        color: #615f5b;
    }
    .video-info-item .count {
        color: #e8e6e1;
        font-weight: 600;
    }

    /* VIP 专线面板融入暗奢中性色 */
    #proxy-accel-panel {
        height: 30px;
        padding: 0 7px;
        gap: 6px;
        border-radius: 4px;
        background: #161619;
        border: 1px solid #26262b;
        box-shadow: none;
    }
    .proxy-toggle-btn {
        height: 22px;
        padding: 0 8px;
        border-radius: 3px;
        background: transparent;
        border: none;
        color: #8f8d88;
        font-size: 11.5px;
        gap: 5px;
    }
    .proxy-toggle-btn::after {
        width: 5px;
        height: 5px;
        background: #4a4a50;
    }
    .proxy-toggle-on {
        color: #e8e6e1;
        background: transparent;
        border-color: transparent;
    }
    .proxy-toggle-on::after {
        background: #65a36c;
        box-shadow: none;
    }
    .proxy-quota-text {
        font-size: 11px;
        color: #74726d;
    }
    .proxy-collapse-btn {
        color: #615f5b;
        font-size: 10.5px;
    }

    /* ── 聊天面板 ── */
    .chat-panel {
        width: 355px;
        background: #111113;
        border-left: 1px solid #222226;
    }
    .chat-notice {
        padding: 9px 14px;
        background: #161514;
        border-bottom: 1px solid #222226;
        color: #a8a49c;
        font-size: 12px;
        line-height: 1.5;
    }
    .chat-notice-icon {
        color: #c9a66b;
        font-size: 11px;
        margin-top: 3px;
    }
    .chat-conn-hint {
        padding: 6px 12px;
        font-size: 11px;
        color: #7c7a75;
        background: transparent;
        border-bottom: 1px solid #1e1e22;
    }
    .chat-conn-dots i {
        width: 3px;
        height: 3px;
        background: #c9a66b;
    }

    .chat-messages {
        padding: 8px 12px;
        background: #111113;
    }
    .chat-message {
        margin-bottom: 1px;
        padding: 5px 6px;
        border-radius: 4px;
        background: transparent;
        border: none;
        font-size: 12.5px;
        line-height: 1.48;
        transition: background 0.12s ease;
    }
    .chat-message:hover {
        background: rgba(255, 255, 255, 0.025);
    }

    /* 普通聊天：紧凑行内流 */
    .chat-message.chat {
        background: transparent;
    }
    .chat-message.chat .chat-meta-row,
    .chat-message.chat .chat-meta-left,
    .chat-message.chat .chat-text {
        display: inline;
        margin-bottom: 0;
    }
    .chat-message.chat .chat-username::after {
        content: "  ";
    }
    .chat-time {
        font-size: 10.5px;
        color: #52504c;
        margin-right: 6px;
        margin-bottom: 0;
        font-variant-numeric: tabular-nums;
        vertical-align: middle;
    }
    .chat-username {
        font-size: 12px;
        font-weight: 600;
        color: #d6cbb8;
        padding-left: 0;
        margin-bottom: 0;
    }
    .chat-message.chat .chat-username {
        color: #d6cbb8;
    }
    .chat-text {
        color: #d0cec9;
        font-size: 12.5px;
        line-height: 1.48;
        word-break: break-word;
    }
    .chat-type-tag {
        display: none;
    }

    /* 桌面端完整用户信息徽章（对齐移动端 5 档段位 + 4 类身份 + 粉丝团 + 主播） */
    .chat-badges {
        display: inline-flex;
        align-items: center;
        gap: 3px;
        margin-right: 5px;
        vertical-align: middle;
        position: relative;
        top: -1px;
    }
    .chat-badge-rank {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 16px;
        min-width: 18px;
        padding: 0 4px;
        border-radius: 3px;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 1;
        font-variant-numeric: tabular-nums;
        background: #1d1f23;
        color: #b8bec9;
        border: 1px solid #333740;
    }
    .chat-badge-rank.league-royal { background: #261a20; color: #d9a7be; border-color: #4d313e; }
    .chat-badge-rank.league-diamond { background: #172029; color: #93bcd9; border-color: #2e4254; }
    .chat-badge-rank.league-gold { background: #231d13; color: #d4b172; border-color: #4a3c24; }
    .chat-badge-rank.league-silver { background: #1d1f23; color: #b8bec9; border-color: #353942; }
    .chat-badge-rank.league-bronze { background: #231a15; color: #c4987a; border-color: #453328; }
    .chat-badge-id {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 16px;
        min-width: 16px;
        padding: 0 3px;
        border-radius: 3px;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 1;
        background: #231d13;
        color: #d4b172;
        border: 1px solid #4a3c24;
    }
    .chat-badge-id[title="骑士"] { background: #172029; color: #93bcd9; border-color: #2e4254; }
    .chat-badge-id.badge-admin { background: #18241d; color: #8bc4a3; border-color: #2c4536; }
    .chat-badge-id.badge-ultimate { background: #201c29; color: #b4a6d6; border-color: #3c344f; }
    .chat-badge-fan {
        display: inline-block;
        padding: 1px 4px;
        border-radius: 3px;
        font-size: 9.5px;
        font-weight: 600;
        line-height: 12px;
        background: #22191d;
        color: #cfa0b2;
        border: 1px solid #422e36;
    }

    /* 主播发言特殊标记 */
    .chat-badge-model {
        display: inline-block;
        padding: 2px 5px;
        border-radius: 3px;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 12px;
        letter-spacing: 0.03em;
        background: #c9a66b;
        color: #111113;
    }
    .chat-message.chat.is-model {
        margin: 4px 0;
        padding: 5px 8px;
        border-radius: 0 4px 4px 0;
        background: rgba(201, 166, 107, 0.09);
        border-left: 2px solid #c9a66b;
    }
    .chat-message.chat.is-model:hover {
        background: rgba(201, 166, 107, 0.13);
    }
    /* 主播发言直接以「主播」徽章标识，不重复显示主播姓名 */
    .chat-message.chat.is-model .chat-username { display: none; }
    .chat-message.chat.is-model .chat-badges { margin-right: 6px; }
    .chat-message.chat.is-model .chat-text { color: #f6f4ef; }

    /* 打赏消息：无额外留言时自动单行，有留言自动换行 */
    .chat-message.tip {
        margin: 6px 0;
        padding: 7px 10px;
        border-radius: 4px;
        background: #181612;
        border: 1px solid #3a3224;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 3px 6px;
    }
    .chat-message.tip .chat-meta-row {
        display: contents;
        margin-bottom: 0;
    }
    .chat-message.tip .chat-meta-left {
        display: inline-flex;
        align-items: center;
        order: 1;
    }
    .chat-message.tip .chat-username {
        color: #efe5d1;
    }
    .chat-message.tip .chat-highlight-row {
        order: 2;
        margin: 0;
        padding: 0;
        background: transparent;
        border: none;
        gap: 5px;
        color: #d9b87c;
        font-weight: 700;
        font-size: 12.5px;
    }
    .chat-message.tip .chat-highlight-icon,
    .chat-message.tip .chat-highlight-value {
        color: #d9b87c;
    }
    .chat-message.tip .chat-tip-menu {
        order: 3;
        margin: 0;
        padding: 1px 6px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.08);
        color: #9c968b;
        font-size: 11px;
        gap: 4px;
    }
    .chat-message.tip .chat-tip-menu i {
        color: #c9a66b;
        font-size: 10px;
    }
    .chat-message.tip .chat-type-tag {
        display: inline-block;
        order: 4;
        margin-left: auto;
        font-size: 9.5px;
        font-weight: 600;
        color: #c9a66b;
        background: transparent;
        border: 1px solid #4a3d27;
        padding: 1px 5px;
        border-radius: 2px;
        line-height: 1.3;
    }
    .chat-message.tip .chat-text {
        order: 5;
        flex: 1 0 100%;
        margin-top: 2px;
        color: #e2dfd7;
        font-size: 12.5px;
    }
    .chat-message.tip .chat-text:empty {
        display: none;
    }

    /* 玩具震动：Lovense 蜜桃珊瑚粉单行条 + 波浪线动画（与打赏面板方案3统一） */
    .chat-message.lovense {
        margin: 5px 0;
        padding: 6px 10px;
        border-radius: 4px;
        background: #211418;
        border: 1px solid rgba(251, 113, 133, 0.34);
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 2px 6px;
    }
    .chat-message.lovense .chat-meta-row {
        display: contents;
        margin-bottom: 0;
    }
    .chat-message.lovense .chat-meta-left {
        display: inline-flex;
        align-items: center;
        order: 1;
    }
    .chat-message.lovense .chat-meta-left .chat-username,
    .chat-message.lovense .chat-meta-left .chat-badges {
        display: none;
    }
    .chat-message.lovense .chat-text {
        order: 2;
        flex: 1 1 auto;
        min-width: 0;
        display: inline-flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 4px;
        font-size: 12px;
        color: #f5dce0;
    }
    .chat-message.lovense .chat-type-tag {
        display: inline-block;
        order: 3;
        margin-left: auto;
        font-size: 9.5px;
        font-weight: 600;
        color: #fb7185;
        background: rgba(251, 113, 133, 0.12);
        border: 1px solid rgba(251, 113, 133, 0.38);
        padding: 1px 5px;
        border-radius: 2px;
        line-height: 1.3;
    }
    .chat-message.lovense .chat-lovense.lovense-icon {
        color: #fb7185;
        font-weight: 600;
        margin-right: 2px;
    }
    .chat-message.lovense .chat-lovense.chat-username {
        color: #fff1f2;
        margin-left: 2px;
    }

    /* 购买门票：哑光翡翠绿高亮单行条 */
    .chat-message.ticket,
    .chat-message.purchase {
        margin: 5px 0;
        padding: 6px 10px;
        border-radius: 4px;
        background: #132019;
        border: 1px solid #2b4d3a;
        border-left: 3px solid #63c18c;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .chat-message.ticket .chat-meta-row,
    .chat-message.purchase .chat-meta-row {
        display: contents;
    }
    .chat-message.ticket .chat-meta-left,
    .chat-message.purchase .chat-meta-left {
        display: inline-flex;
        align-items: center;
        order: 1;
    }
    .chat-message.ticket .chat-time,
    .chat-message.purchase .chat-time {
        color: #5b806b;
        margin-right: 0;
    }
    .chat-message.ticket .chat-type-tag,
    .chat-message.purchase .chat-type-tag {
        display: inline-block;
        order: 2;
        padding: 2px 6px;
        border-radius: 3px;
        font-size: 9.5px;
        font-weight: 700;
        line-height: 12px;
        background: #63c18c;
        color: #0e1c14;
        border: none;
        flex-shrink: 0;
    }
    .chat-message.ticket .chat-text,
    .chat-message.purchase .chat-text {
        order: 3;
        display: inline;
        font-size: 12px;
        font-weight: 500;
        color: #bfe8cf;
    }
    .chat-message.ticket .chat-username,
    .chat-message.purchase .chat-username {
        color: #f4faf6;
        font-weight: 700;
        margin-right: 2px;
    }

    /* 目标 / 系统 / 通知 / 日志 / 广播 */
    .chat-message.goal,
    .chat-message.thresholdGoal,
    .chat-message.status,
    .chat-message.notice,
    .chat-message.log,
    .chat-message.raw,
    .chat-message.broadcast {
        margin: 4px 0;
        padding: 4px 8px;
        border-radius: 0;
        background: transparent;
        border-left: 2px solid #2e2d2b;
        font-size: 11.5px;
        color: #85837e;
    }
    .chat-message.goal .chat-meta-row,
    .chat-message.thresholdGoal .chat-meta-row,
    .chat-message.status .chat-meta-row,
    .chat-message.notice .chat-meta-row,
    .chat-message.log .chat-meta-row,
    .chat-message.raw .chat-meta-row,
    .chat-message.broadcast .chat-meta-row {
        display: inline;
        margin-right: 5px;
    }
    .chat-message.goal .chat-text,
    .chat-message.thresholdGoal .chat-text,
    .chat-message.status .chat-text,
    .chat-message.notice .chat-text,
    .chat-message.log .chat-text,
    .chat-message.raw .chat-text,
    .chat-message.broadcast .chat-text {
        display: inline;
        font-size: 11.5px;
        color: #9e9b94;
    }

    /* ── 底部输入栏 ── */
    .chat-input-wrapper {
        height: auto;
        padding: 10px 12px;
        background: #111113;
        border-top: 1px solid #222226;
    }
    .chat-input-container {
        position: relative;
        display: flex;
        align-items: center;
    }
    .chat-input {
        height: 36px;
        padding: 0 76px 0 12px;
        border-radius: 4px;
        border: 1px solid #2a2a2f;
        background: #161619;
        color: #efede8;
        font-size: 12.5px;
    }
    .chat-input::placeholder {
        color: #5c5a56;
    }
    .chat-input:focus {
        border-color: #6b5a3c;
        box-shadow: none;
    }
    .chat-char-count {
        right: 42px;
        font-size: 10.5px;
        color: #5c5a56;
        font-variant-numeric: tabular-nums;
    }
    .chat-send-btn {
        right: 4px;
        width: 28px;
        height: 28px;
        padding: 0;
        border-radius: 3px;
        background: #232220;
        color: #c9a66b;
        box-shadow: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
    }
    .chat-send-btn:hover {
        background: #c9a66b;
        color: #111113;
    }
}


/* ═══ 聊天双向实时翻译（2026-11-28） ═══════════════════════════════════ */
.chat-input-wrapper {
    position: relative;
    height: auto !important;
    min-height: 48px;
    padding: 6px 8px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    flex-shrink: 0;
}
.chat-input-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 42px;
    padding: 3px;
    box-sizing: border-box;
    background: #1a1a1c;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.chat-input-container:focus-within {
    border-color: rgba(254, 182, 1, 0.45);
    box-shadow: 0 0 0 1px rgba(254, 182, 1, 0.12);
}
.chat-input-container .chat-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 34px;
    line-height: 34px;
    box-sizing: border-box;
    padding: 0 4px !important;
    border: none !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    outline: none;
    color: #f1f1f3;
    font-size: 13.5px;
}
.chat-input-container .chat-input::placeholder {
    color: #66666d;
}
/* 右侧大图标发送按钮（46×34px）：0 字无框融入，有字金黄激活 */
.chat-input-container .chat-send-btn {
    position: static;
    transform: none;
    flex-shrink: 0;
    width: 46px;
    height: 34px;
    padding: 0;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    color: #5a5a60;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: not-allowed;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}
.chat-input-container .chat-send-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: transparent;
    color: #5a5a60;
}
.chat-input-container .chat-send-btn.is-active {
    background: #feb601;
    border-color: transparent;
    color: #141414;
    box-shadow: 0 2px 10px rgba(254, 182, 1, 0.30);
    cursor: pointer;
}
.chat-input-container .chat-send-btn.is-active:hover {
    background: #ffc633;
    border-color: transparent;
    color: #141414;
}
.chat-input-container .chat-send-btn.is-active:active {
    transform: scale(0.95);
}
.chat-input-container .chat-char-count {
    position: static;
    transform: none;
    flex-shrink: 0;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: #6e6e73;
    padding: 0 2px;
    line-height: 1;
    user-select: none;
}
.chat-input-container .chat-char-count.has-text {
    color: #a1a1aa;
}
.chat-input-container .chat-char-count.near-limit,
.chat-input-container .chat-char-count.over-limit {
    color: #f59e0b;
}
.chat-tr-ctrl {
    position: static;
    transform: none;
    flex-shrink: 0;
    z-index: 3;
    height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #232220;
    box-sizing: border-box;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.chat-tr-ctrl.is-on {
    background: #262420;
    border-color: rgba(201, 166, 107, 0.30);
}
.chat-tr-btn,
.chat-tr-menu-btn {
    border: none;
    background: transparent;
    color: #8e8e93;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    height: 32px;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.14s ease, color 0.14s ease;
}
.chat-tr-btn {
    padding: 0 8px;
    white-space: nowrap;
}
.chat-tr-menu-btn {
    padding: 0 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.10);
    font-size: 10px;
}
.chat-tr-btn:hover,
.chat-tr-menu-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.chat-tr-btn.is-on {
    background: transparent;
    color: #feb601;
}
.chat-tr-menu-btn.is-on {
    background: transparent;
    color: #c9a66b;
}
.chat-tr-popover {
    position: fixed;
    left: 10px;
    bottom: 60px;
    width: 228px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #1e1e24;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.68);
    z-index: 1200;
    color: #f4f4f5;
    font-size: 12px;
}
.chat-tr-pop-head {
    font-size: 12.5px;
    font-weight: 700;
    color: #fcd34d;
    margin-bottom: 8px;
}
.chat-tr-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    cursor: pointer;
    color: #e4e4e7;
    font-size: 11.5px;
}
.chat-tr-switch-row input {
    accent-color: #f0b25a;
    cursor: pointer;
}
.chat-tr-lang-label {
    margin-top: 8px;
    margin-bottom: 5px;
    font-size: 11px;
    color: rgba(244, 244, 245, 0.55);
}
.chat-tr-lang-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}
.chat-tr-lang-pill {
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
    color: #d4d4d8;
    border-radius: 6px;
    padding: 4px 2px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: all 0.12s ease;
}
.chat-tr-lang-pill:hover {
    background: rgba(255, 255, 255, 0.10);
}
.chat-tr-lang-pill.active {
    background: rgba(240, 178, 90, 0.22);
    border-color: rgba(240, 178, 90, 0.65);
    color: #fcd34d;
    font-weight: 700;
}
.chat-tr-guide {
    position: fixed;
    left: 10px;
    right: auto;
    bottom: 60px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 10px;
    background: #232028;
    border: 1px solid rgba(240, 178, 90, 0.48);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
    z-index: 1190;
    animation: tip-modal-in 0.18s ease-out;
}
.chat-tr-guide-text {
    font-size: 11.5px;
    line-height: 1.45;
    color: #f4f4f5;
    flex: 1 1 auto;
}
.chat-tr-guide-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.chat-tr-guide-go {
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11.5px;
    font-weight: 700;
    background: #fbbf24;
    color: #18181b;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}
.chat-tr-guide-go:hover {
    background: #fcd34d;
}
.chat-tr-guide-close {
    border: none;
    background: transparent;
    color: rgba(244, 244, 245, 0.55);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
}
.chat-tr-preview {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: calc(100% + 4px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(24, 24, 30, 0.96);
    border: 1px solid rgba(240, 178, 90, 0.32);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    z-index: 50;
    font-size: 11.5px;
    color: #e4e4e7;
}
.chat-tr-prev-text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-tr-prev-act {
    border: none;
    border-radius: 5px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    background: #fbbf24;
    color: #18181b;
    cursor: pointer;
    flex: 0 0 auto;
    font-family: inherit;
}
.chat-tr-prev-raw {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 10.5px;
    background: transparent;
    color: #a1a1aa;
    cursor: pointer;
    flex: 0 0 auto;
    font-family: inherit;
}
.chat-tr-prev-raw:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}
.chat-tr-prev-x {
    border: none;
    background: transparent;
    color: #a1a1aa;
    font-size: 14px;
    cursor: pointer;
    padding: 0 3px;
}
.chat-tr-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    cursor: pointer;
}
.chat-tr-zh {
    animation: chatTrFade 0.2s ease-out;
}
.chat-tr-orig {
    display: block;
    font-size: 10.5px;
    line-height: 1.3;
    color: rgba(244, 244, 245, 0.45);
    word-break: break-word;
}
.chat-tr-orig.is-hidden {
    display: none;
}
.chat-tr-line {
    width: 100%;
    font-size: 11.5px;
    color: #fde68a;
    margin-top: 2px;
    animation: chatTrFade 0.2s ease-out;
}
@keyframes chatTrFade {
    from { opacity: 0.2; }
    to { opacity: 1; }
}

.chat-tr-src {
    display: inline-block;
    margin-left: 5px;
    padding: 0 4px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
    opacity: 0.82;
}
.chat-tr-src.src-native {
    background: rgba(74, 222, 128, 0.16);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
}
.chat-tr-src.src-cache {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}
.chat-tr-src.src-ai {
    background: rgba(251, 191, 36, 0.16);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
}
.chat-tr-stats {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 10.5px;
    color: rgba(244, 244, 245, 0.55);
}

/* 移动端开启「保留原文」时解除单行 25px 高度裁切，确保译文与原文双行完整显示 */
@media (max-width: 768px) {
    .chat-messages .chat-message.has-tr-orig {
        height: auto;
        min-height: 36px;
        padding: 4px 3px;
        align-items: flex-start;
        white-space: normal;
        overflow: visible;
    }
    .chat-messages .chat-message.has-tr-orig .chat-meta-row {
        margin-top: 2px;
    }
    .chat-messages .chat-message.has-tr-orig .chat-text {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.35;
    }
}

.chat-message.chat-tr-pending {
    display: none !important;
}
.chat-message.chat-tr-reveal {
    animation: chatTrFade 0.2s ease-out;
}

/* ═══ 翻译开关专属轻量磨砂胶囊提示 + 端侧引擎进度展示（2026-11-29） ═════ */
.chat-tr-toast {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translate(-50%, 6px);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(22, 22, 26, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(254, 182, 1, 0.34);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.48);
    color: #f4f4f5;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    z-index: 1210;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.chat-tr-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}
.chat-tr-toast.is-off {
    border-color: rgba(255, 255, 255, 0.14);
    color: #a1a1aa;
}
.chat-tr-toast-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #feb601;
    box-shadow: 0 0 8px rgba(254, 182, 1, 0.75);
    flex-shrink: 0;
}
.chat-tr-toast.is-off .chat-tr-toast-dot {
    background: #71717a;
    box-shadow: none;
}
.chat-tr-stat-line {
    font-size: 10.5px;
    color: rgba(244, 244, 245, 0.62);
    margin-bottom: 4px;
}
.chat-tr-native-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 10.5px;
    color: #e4e4e7;
    line-height: 1.35;
}
.chat-tr-native-row.is-ready {
    color: #4ade80;
}
.chat-tr-native-row.is-dl {
    color: #feb601;
}
.chat-tr-native-row.is-dim {
    color: rgba(244, 244, 245, 0.50);
}
.chat-tr-native-meta {
    font-size: 10px;
    color: rgba(244, 244, 245, 0.52);
    white-space: nowrap;
}
.chat-tr-native-bar {
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    margin-top: 4px;
    overflow: hidden;
}
.chat-tr-native-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #feb601);
    transition: width 0.2s ease;
}
.chat-tr-native-dl {
    border: 1px solid rgba(254, 182, 1, 0.45);
    background: rgba(254, 182, 1, 0.14);
    color: #feb601;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
}
.chat-tr-native-dl:hover {
    background: #feb601;
    color: #141414;
}
