: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;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 13px;
}

/* Header 样式 */
.header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e5e5e7;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo img {
    height: 140px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.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-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    position: relative;
}

.search-input {
    background-color: #f5f5f7;
    border: 2px solid #d2d2d7;
    border-radius: 6px;
    padding: 8px 35px 8px 12px;
    color: #1d1d1f;
    width: 280px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #ffffff;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6e6e73;
    cursor: pointer;
    font-size: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.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 样式 */
.main-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: 15px 10px;
    min-height: 50vh;
}

/* 分类标签 */
.category-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e5e7;
    padding-bottom: 10px;
}

.category-tabs-inner {
    display: flex;
    gap: 10px;
    flex: 1;
    flex-wrap: wrap;
}

.tab {
    background-color: transparent;
    color: #1d1d1f;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.tab:hover {
    background-color: #f5f5f7;
}

.tab.active {
    background-color: var(--primary-color);
    color: #fff;
}

.tag-filter-btn {
    background-color: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tag-filter-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.tag-filter-btn i {
    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;
}

/* 直播间列表 */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
    margin-bottom: 40px;
}

.room-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e5e7;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(29, 146, 197, 0.2);
}

.room-card:focus {
    outline: none;
}

.room-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 比例 */
    background-color: #f5f5f7;
    overflow: hidden;
}

.room-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--red);
    color: #fff;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.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: 10px;
}

.room-title {
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 600;
    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: 11px;
}

.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 样式 */
.footer {
    background-color: #ffffff;
    border-top: 1px solid #e5e5e7;
    margin-top: 60px;
}

.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: #1d1d1f;
    font-size: 16px;
    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: #6e6e73;
    text-decoration: none;
    font-size: 14px;
    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);
}

/* 侧边栏 Tag 样式 */
.tag-sidebar {
    position: fixed;
    top: 60px;
    right: -400px;
    width: 400px;
    height: calc(100vh - 60px);
    background-color: #ffffff;
    border-left: 2px solid var(--primary-color);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
}

.tag-sidebar.open {
    right: 0;
}

.tag-sidebar-header {
    padding: 20px;
    border-bottom: 2px solid #e5e5e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f7 100%);
}

.tag-sidebar-header h3 {
    color: #1d1d1f;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tag-sidebar-header h3 i {
    color: var(--primary-color);
    font-size: 20px;
}

.tag-sidebar-close {
    background: #f5f5f7;
    border: 1px solid #d2d2d7;
    color: #6e6e73;
    cursor: pointer;
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.tag-sidebar-close:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.tag-sidebar-search {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e7;
    background-color: #f5f5f7;
}

.tag-sidebar-search .search-input {
    width: 100%;
}

.tag-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    background-color: #ffffff;
}

.tag-sidebar-content::-webkit-scrollbar {
    width: 10px;
}

.tag-sidebar-content::-webkit-scrollbar-track {
    background: #f5f5f7;
}

.tag-sidebar-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

.tag-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #7d3bd4;
}

.tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-item:hover {
    background-color: #f5f5f7;
    border-left-color: var(--primary-color);
    padding-left: 25px;
}

.tag-name {
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 500;
}

.tag-count {
    background-color: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 35px;
    text-align: center;
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 15px;
    }

    .logo img {
        height: 100px;
    }

    .search-input {
        width: 200px;
    }

    .user-info .btn {
        padding: 7px 14px;
        font-size: 13px;
    }

    .username {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: nowrap;
        height: 60px;
        padding: 0 12px;
        gap: 8px;
        justify-content: space-between;
    }

    .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: 80px;
    }

    .header-right {
        flex: 1;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        min-width: 0;
        order: 2;
        justify-content: flex-end;
    }

    .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;
    }

    .search-btn {
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .user-info {
        display: flex;
        gap: 4px;
        flex-wrap: nowrap;
        flex-shrink: 0;
        order: 2;
        align-items: center;
    }

    .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;
    }

    .logo img {
        height: 80px;
    }

    .search-box {
        flex: 0 0 140px;
    }

    .search-input {
        font-size: 12px;
        padding: 6px 28px 6px 8px;
        height: 32px;
    }

    .search-btn {
        font-size: 13px;
        right: 6px;
        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: 80px;
    }

    .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;
    }

    .search-btn {
        font-size: 12px;
        right: 5px;
        height: 28px;
    }
}

@media (max-width: 768px) {
    .room-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 6px;
    }

    .category-tabs {
        flex-wrap: nowrap;
        gap: 5px;
        padding-bottom: 10px;
        border-bottom: 1px solid #e5e5e7;
        position: relative;
    }

    .category-tabs-inner {
        display: flex;
        gap: 5px;
        flex-wrap: nowrap;
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-right: 10px;
        margin-right: 5px;
        /* 隐藏滚动条但保留可滚动性（仅作用于本容器） */
        -ms-overflow-style: none; /* IE 和 Edge */
        scrollbar-width: none; /* Firefox */
    }

    /* WebKit 浏览器：将滚动条高度设为 0 从而隐藏 */
    .category-tabs-inner::-webkit-scrollbar {
        height: 0;
        width: 0;
    }

    .category-tabs-inner::-webkit-scrollbar-track {
        background: transparent;
    }

    .category-tabs-inner::-webkit-scrollbar-thumb {
        background: transparent;
        border-radius: 2px;
    }

    .tab {
        font-size: 13px;
        padding: 8px 14px;
        white-space: nowrap;
        flex-shrink: 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;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        padding: 5px 8px;
        font-size: 11px;
        min-width: 28px;
    }

    .pagination-btn span {
        display: none;
    }

    .pagination-controls {
        gap: 2px;
    }
}

/* 播放器容器样式 */
.player-container {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1d1d1f;
    z-index: 1000;
    overflow: hidden;
}

.player-container.active {
    display: flex;
}

.player-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #000;
    position: relative;
    min-height: 0;
    /* 允许收缩 */
    overflow: hidden;
    /* 防止溢出 */
}

.player-header {
    background: #f5f5f7;
    padding: 15px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-bottom: 2px solid #e5e5e7;
    height: 50px;
    /* 确保与聊天栏标题高度一致 */
    flex-shrink: 0;
    /* 防止被压缩 */
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
    /* 允许内容收缩 */
}

.player-info h2 {
    color: #1d1d1f;
    font-size: 15px;
    /* 从 20px 改为 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;
}

.player-close {
    background-color: #f5f5f7;
    border: 1px solid #e5e5e7;
    color: #1d1d1f;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 600;
}

.player-close i {
    font-size: 16px;
}

.player-close:hover {
    background-color: var(--red);
    color: #fff;
    border-color: var(--red);
}

.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;
    /* 透明度为0 */
}

video {
    visibility: hidden;
}

/* 开始播放时显示 */
.video-js video {
    visibility: visible;
    opacity: 1;
}

/* 视频信息栏 - 固定在底部 */
.video-info-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f7 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 2px solid #e5e5e7;
    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: #6e6e73;
    font-size: 13px;
}

.video-info-item i {
    color: var(--primary-color);
    font-size: 14px;
}

.video-info-item .count {
    color: #1d1d1f;
    font-weight: 600;
}

.video-info-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-action-btn {
    background: #ffffff;
    border: 1px solid #d2d2d7;
    color: #1d1d1f;
    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:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.video-action-btn.liked {
    background: var(--red);
    border-color: var(--red);
    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;
}

/* closeBtn 只在小屏可见，大屏隐藏 */
#closeBtn {
    display: none;
}

.chat-panel {
    width: 400px;
    background-color: #ffffff;
    border-left: 1px solid #e5e5e7;
    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;
}

.chat-header {
    background: #f5f5f7;
    padding: 15px 15px;
    border-bottom: 2px solid #e5e5e7;
    height: 50px;
}

.chat-header h3 {
    color: #1d1d1f;
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header h3 i {
    color: var(--primary-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f5f5f7;
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 8px;
}

.chat-time {
    font-size: 11px;
    color: #6e6e73;
    margin-bottom: 2px;
}

.chat-username {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.chat-text {
    color: #1d1d1f;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

/* Different message types */
.chat-message.chat {
    background-color: #f9f9f9;
    border-left-color: var(--primary-color);
}

.chat-message.chat .chat-username {
    color: var(--primary-color);
}

.chat-message.tip {
    background-color: #fff8e1;
    border-left-color: #ff8c00;
}

.chat-message.tip .chat-username {
    color: #ff8c00;
}

.chat-message.lovense {
    background-color: #fce4ec;
    border-left-color: #e91e63;
}

.chat-message.lovense .chat-username {
    color: #e91e63;
}

.chat-message.notice {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

.chat-message.notice .chat-username {
    color: #2196f3;
}

.chat-message.status {
    background-color: #f3e5f5;
    border-left-color: #9c27b0;
}

.chat-message.status .chat-username {
    color: #9c27b0;
}

.chat-message.log {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
}

.chat-message.log .chat-username {
    color: #4caf50;
}

.chat-message.raw {
    background-color: #fff3e0;
    border-left-color: #ff9800;
}

.chat-message.raw .chat-username {
    color: #ff9800;
}

.chat-message.goal {
    background-color: #f1f8e9;
    border-left-color: #8bc34a;
}

.chat-message.goal .chat-username {
    color: #8bc34a;
}

.chat-message.purchase {
    background-color: #e8f4fd;
    border-left-color: #03a9f4;
}

.chat-message.purchase .chat-username {
    color: #03a9f4;
}

.chat-message.thresholdGoal {
    background-color: #e8f5e9;
    border-left-color: #4caf50;
}

.chat-message.thresholdGoal .chat-username {
    color: #4caf50;
}

.chat-message.broadcast {
    background-color: #fff8e1;
    border-left-color: #ff9800;
}

.chat-message.broadcast .chat-username {
    color: #ff9800;
}

.chat-input-wrapper {
    padding: 5px;
    background-color: #ffffff;
    border-top: 1px solid #e5e5e7;
    height: 52px;
}

.chat-input-container {
    position: relative;
}

.chat-input {
    width: 100%;
    padding: 10px 50px 10px 10px;
    /* 右侧留空间给按钮 */
    border: 2px solid #d2d2d7;
    border-radius: 6px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-send-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-hover) 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    width: auto;
    min-width: auto;
}

.chat-send-btn span {
    display: none;
    /* 隐藏文字，只显示图标 */
}

.chat-send-btn:hover {
    background: linear-gradient(135deg, var(--orange-hover) 0%, #ff6600 100%);
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

/* 加载动画 */
.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 #f5f5f7;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #fff;
    margin-top: 15px;
    font-size: 14px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 清晰度按钮样式 */
.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;
        width: 100%;
        height: 100%;
        max-height: 100%;
        z-index: 1000;
    }

    .player-wrapper {
        flex: 0 0 auto;
        min-height: 0;
    }

    .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;
        min-height: 0;
        border-left: none;
        border-top: 1px solid #e5e5e7;
        overflow: hidden;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
    }

    .player-header {
        padding: 12px 15px;
        display: none;
    }

    .player-info h2 {
        font-size: 14px;
    }

    /* 小屏时 video-info-bar 只显示图标和数字，隐藏文字 */
    .video-info-bar {
        padding: 10px 15px;
    }

    .video-action-btn span {
        display: none;
    }

    .video-action-btn {
        padding: 6px 10px;
        min-width: auto;
    }

    /* 小屏时显示closeBtn */
    #closeBtn {
        display: flex;
    }

    /* 小屏时隐藏聊天区域的标题栏 */
    .chat-header {
        display: none;
    }
}

/* 自定义模态框样式 */
.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;
    border-top: 1px solid #f5f5f7;
}

.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 #d2d2d7;
    background: #ffffff;
    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;
    }
}

/* 搜索结果下拉框 */
.search-results.active {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 2px solid #d2d2d7;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: block;
    padding: 5px;
}

.search-results {
    display: none;
}

/* 搜索结果项 - 排一行，超出隐藏 */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    padding-top: 5px;
    cursor: pointer;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 性别图标彩色样式 */
.gender-icon {
    font-weight: 900;
    font-size: 16px;
    text-shadow: 0 0 1px currentColor;
    display: inline-block;
}

.gender-female {
    color: #ff69b4;
    /* 粉色 */
}

.gender-male {
    color: #1e90ff;
    /* 蓝色 */
}

.gender-couple {
    color: #ff1493;
    /* 深粉红 */
}

.gender-trans {
    color: #9370db;
    /* 紫色 */
}

/* 密码输入容器 */
.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;
}

/* 小屏幕上视觉隐藏整个文档的滚动条，但保留滚动能力（只影响显示，不改变 overflow 行为） */
@media (max-width: 768px) {
    html, body {
        /* Firefox */
        scrollbar-width: none;
        /* IE/Edge */
        -ms-overflow-style: none;
    }

    /* WebKit 浏览器：对 html 和 body 隐藏滚动条 */
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        width: 0;
        height: 0;
    }
}

.password-toggle i {
    font-size: 16px;
}