/* 全局重置 + 主题变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --theme-primary: #0071e3;
    --theme-primary-hover: #297eff;
    --theme-bg-dark: #0f0f0f;
    --theme-bg-light: #1a1a1c;
    --theme-bg-card: #1e1e20;
    --theme-bg-hover: #2a2a2d;
    --theme-bg-btn: #252528;
    --theme-border: #2a2a2d;
    --theme-border-light: #333333;
    --theme-text: #fff;
    --theme-text-strong: #eee;
    --theme-text-medium: #b0b0b3;
    --theme-text-light: #999;
    --theme-text-faint: #777;
    --theme-text-muted: #666;
    --theme-overlay: rgba(0,0,0,0.75);
    --theme-badge-overlay: rgba(0,0,0,0.55);
    --theme-btn-overlay: rgba(0,0,0,0.4);
    --theme-light-overlay: rgba(255,255,255,0.15);
    --theme-light-overlay-hover: rgba(255,255,255,0.25);
    --theme-transition: all 0.3s ease;
    --theme-transition-slow: all 0.35s ease;
}

html,
body {
    height: 100%;
    min-height: 100vh;
}

html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--theme-bg-dark);
    color: var(--theme-text);
    line-height: 1.4;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    padding-top: 60px;
}

@-webkit-keyframes masked-animation {
    0% {
        background-position: 0 0
    }
    to {
        background-position: -100% 0
    }
}

.text-cool {
    text-align: center;
    color: hsla(0, 0%, 100%, .65);
    font-weight: 800;
    background-image: -webkit-linear-gradient(left, #cddc39, #ff9800 25%, #cddc39 50%, #ff9800 75%, #cddc39);
    -webkit-text-fill-color: transparent;
    -webkit-background-clip: text;
    -webkit-background-size: 200% 100%;
    -webkit-animation: masked-animation 2s infinite linear;
}
.text-cool:hover {
    -webkit-animation: masked-animation 0.5s infinite linear;
}

.content-wrapper {
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

a {
    color: var(--theme-text);
    text-decoration: none !important;
}

a:hover {
    color: var(--theme-text-strong);
    text-decoration: none !important;
}

.icon {
    vertical-align: bottom;
    stroke-width: 1.5;
}

.container {
    max-width: 1360px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
}

/* 移动端菜单 */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: var(--theme-overlay);
    z-index: 290;
    opacity: 0;
    visibility: hidden;
    transition: var(--theme-transition-slow);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: var(--theme-bg-light);
    z-index: 300;
    transition: var(--theme-transition-slow);
    padding: 16px;
    overflow-y: auto;
    border-right: 1px solid var(--theme-border);
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.mobile-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--theme-text-strong);
}

.mobile-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--theme-bg-btn);
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--theme-text-medium);
}

.mobile-search {
    position: relative;
    margin-bottom: 12px;
}

.mobile-search input {
    width: 100%;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border-light);
    border-radius: 40px;
    padding: 8px 16px 8px 40px;
    outline: none;
    color: var(--theme-text-medium);
    font-size: 14px;
}

.mobile-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-text-muted);
}

.mobile-menu-item {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--theme-text-medium);
}

.mobile-menu-item i {
    color: var(--theme-text-light);
    width: 16px;
    text-align: center;
}

.mobile-menu-item:hover {
    color: var(--theme-text-strong);
}

.mobile-submenu {
    padding: 6px 0 6px 26px;
    display: none;
}

.mobile-submenu.active {
    display: block;
}

.mobile-subitem {
    padding: 6px 0;
    font-size: 13px;
    color: var(--theme-text-light);
}

.mobile-menu-arrow {
    margin-left: auto;
    font-size: 12px;
    color: var(--theme-text-muted);
    transition: var(--theme-transition);
}

.mobile-menu-arrow.rotate {
    transform: rotate(180deg);
}

/* 导航栏 */
.navbar {
    background: var(--theme-bg-light);
    border-bottom: 1px solid var(--theme-border);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    max-width: 1360px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 22px;
    color: var(--theme-text-strong);
    white-space: nowrap;
    background: -webkit-linear-gradient(right, var(--theme-primary), #dfdada);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo i {
    color: var(--theme-text-light);
    font-size: 24px;
}

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--theme-bg-btn);
    place-items: center;
    cursor: pointer;
    color: var(--theme-text-medium);
}

.nav-menu {
    display: flex;
    align-items: center;
    margin: 0 16px;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--theme-text-medium);
    cursor: pointer;
    transition: var(--theme-transition);
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--theme-text);
}

.nav-item i {
    color: var(--theme-text-light);
}

.more-dropdown {
    position: relative;
    cursor: pointer;
}

.more-arrow {
    font-size: 0.7rem;
    margin-left: 4px;
    color: var(--theme-text-muted);
    transition: var(--theme-transition);
    display: inline-block;
}

.more-dropdown.active .more-arrow {
    transform: rotate(180deg);
    color: var(--theme-text-medium);
}

.more-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 6px;
    width: 360px;
    background: var(--theme-bg-light);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: var(--theme-transition-slow);
    z-index: 99;
}

.more-dropdown.active .more-panel {
    opacity: 1;
    visibility: visible;
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.more-item {
    text-align: center;
    padding: 6px 2px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--theme-text-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.more-item:hover {
    background: var(--theme-bg-hover);
    color: var(--theme-text-strong);
}

.search-box {
    max-width: 360px;
    position: relative;
    margin-left: auto;
}

.search-input {
    width: 100%;
    background: var(--theme-bg-card);
    border: 1px solid var(--theme-border-light);
    padding: 7px 16px 7px 40px;
    border-radius: 40px;
    color: var(--theme-text-medium);
    font-size: 0.85rem;
    outline: none;
    transition: var(--theme-transition);
}

.search-input:focus {
    border-color: var(--theme-text-muted);
    background: var(--theme-bg-btn);
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-text-muted);
    font-size: 0.9rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
    position: relative;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--theme-bg-btn);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-light);
    cursor: pointer;
    transition: var(--theme-transition);
}

.nav-btn:hover {
    background: var(--theme-bg-hover);
    color: var(--theme-text-strong);
}

/* 用户下拉菜单 */
#user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: #1c1c1c;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    overflow: hidden;
    margin-top: 6px;
}

#user-menu div {
    padding: 9px 16px;
    color: #e5e5e5;
    cursor: pointer;
    font-size: 13px;
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.4;
}

#user-menu div:hover {
    background-color: #2a2a2a;
    color: #fff;
}

/* 隐藏上传头像按钮 */
#avatarInput {
    display: none;
}

/* 历史记录侧边栏 */
.history-overlay {
    position: fixed;
    inset: 0;
    background: var(--theme-overlay);
    z-index: 190;
    opacity: 0;
    visibility: hidden;
    transition: var(--theme-transition-slow);
}

.history-overlay.active {
    opacity: 1;
    visibility: visible;
}

.history-panel {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background: var(--theme-bg-light);
    border-left: 1px solid var(--theme-border);
    z-index: 200;
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
    padding: 16px 0; /* 关键：左右padding去掉，只留上下 */
    overflow-y: auto;
    opacity: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-border) var(--theme-bg-light);
}

.history-panel.active {
    right: 0;
    opacity: 1;
}

.history-panel::-webkit-scrollbar {
    width: 5px;
}
.history-panel::-webkit-scrollbar-track {
    background: var(--theme-bg-light);
}
.history-panel::-webkit-scrollbar-thumb {
    background: var(--theme-border);
    border-radius: 2px;
}
.history-panel::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-faint);
}

/* 头部：铺满宽度 + 底部边框全屏 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--theme-text-strong);
    padding: 0 16px 14px 16px;
    border-bottom: 1px solid var(--theme-border);
}

.history-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--theme-bg-btn);
    cursor: pointer;
    color: var(--theme-text-medium);
}

/* 列表项：铺满宽度 + hover效果 */
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px dashed var(--theme-border);
    transition: background 0.2s ease;
}

.history-item:hover {
    background: var(--theme-bg-btn);
}

.history-img {
    width: 46px;
    height: 64px;
    border-radius: 4px;
    object-fit: cover;
    background: var(--theme-bg-btn);
}

.history-info {
    flex: 1;
}

.history-title {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 2px;
    color: var(--theme-text-medium);
}

.history-time {
    font-size: 0.68rem;
    color: var(--theme-text-faint);
}

.history-delete {
    color: var(--theme-text-faint);
    cursor: pointer;
}

.history-delete:hover {
    color: var(--theme-text-medium);
}
/* 首页轮播 */
.top-row {
    display: flex;
    gap: 1rem;
    margin-top: 16px;
}

.banner {
    flex: 0 0 60%;
    height: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    touch-action: pan-x;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.banner-slide.active {
    opacity: 1;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    bottom: 12%;
    left: 5%;
    max-width: 500px;
    z-index: 10;
}

.banner-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
    color: var(--theme-text);
}

.banner-desc {
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    color: var(--theme-text-medium);
}

.banner-btns {
    display: flex;
    gap: 0.8rem;
}


.btn-large {
    padding: 0.4rem 1.5rem;
    border-radius: 4px;
    border: none;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: background var(--theme-transition);
}
.btn-primary {
    background: var(--theme-primary);
    color: var(--theme-text-strong);
}

.btn-primary:hover {
    background: var(--theme-primary-hover);
}

.btn-light {
    background: var(--theme-light-overlay);
    color: var(--theme-text-strong);
}

.btn-light:hover {
    background: var(--theme-light-overlay-hover);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: var(--theme-btn-overlay);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-medium);
    font-size: 14px;
    cursor: pointer;
    z-index: 12;
    opacity: 0;
    transition: opacity var(--theme-transition);
}

.banner:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow.left {
    left: 12px;
}

.banner-arrow.right {
    right: 12px;
}

/* 评论/视频列表 */
.latest-comments {
    flex: 1;
    height: 300px;
    background: var(--theme-bg-light);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    contain: layout;
}

.comment-tabs {
    display: flex;
    width: 100%;
    background: var(--theme-bg-card);
    border-bottom: 1px solid var(--theme-border);
}

.tab-item {
    flex: 1 1 auto;
    text-align: center;
    padding: 9px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--theme-text-medium);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.tab-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background: var(--theme-border);
}

.tab-item.active {
    color: #fff;
    background: var(--theme-bg-light);
}

.tab-item.active::after {
    display: none;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.comments-list .tab-pane {
    display: none;
}

.comments-list .tab-pane.active {
    display: block;
}

.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: var(--theme-bg-card);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: var(--theme-text-muted);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-light);
}

.comment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px dashed var(--theme-border);
    min-width: 0;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.comment-top {
    display: flex;
    justify-content: space-between;

}

.comment-user {
    font-size: 0.85rem;
    display: inline-flex;
    gap: 2px;
    align-items: end;
}

.comment-time {
    font-size: 0.7rem;
    color: #888;
}

.comment-content {
    font-size: 0.85rem;
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
}

.comment-content a {
    display: block !important;
    width: 100% !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 0.85rem;
    color: var(--theme-text-medium);
}

.comment-content a:hover {
    color: var(--theme-text-strong);
    text-decoration: none;
}

.video-item {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid var(--theme-border);
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    min-width: 0;
}

.video-item .link-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--theme-text-medium);
    text-decoration: none;
    padding-right: 6px;
}

.video-item .date {
    flex-shrink: 0;
    color: var(--theme-text-faint);
    font-size: 0.75rem;
    margin-left: auto;
}

.video-item:hover {
    background: var(--theme-bg-hover);
}

.video-item:hover .link-title {
    color: var(--theme-text-strong);
}

/* 分类导航 */
.secondary-nav {
    margin: 20px 0;
    border-bottom: 1px solid var(--theme-border);
    padding-bottom: 8px;
}

.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cat-item {
    padding: 5px 16px;
    border-radius: 40px;
    background: var(--theme-bg-card);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--theme-text-light);
    cursor: pointer;
    transition: var(--theme-transition);
}

.cat-item.active,
.cat-item:hover {
    background: var(--theme-bg-hover);
    color: var(--theme-text-strong);
}

.section-header-index {
    display: flex;
    justify-content: space-between;
    margin: 24px 0 12px;
}

.section-header-index h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--theme-text-strong);
}

.section-header {
    background: var(--theme-bg-light);
    border-bottom: 1px solid var(--theme-border);
    padding: 12px 16px;
    margin: 20px 0 0;
}

.section-header h2 {
     margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-text-strong);
}

/* 电影卡片网格 */
.movie-block {
    display: none;
}

.movie-block.active {
    display: block;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}

.movie-card {
    background: var(--theme-bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.episode-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 59, 59, 0.9);
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
    border-radius: 3px;
    z-index: 2;
}

.card-img {
    aspect-ratio: 2/2.5;
    display: block;
    cursor: pointer;
    position: relative;
    background-color: #202023;
    background-image: linear-gradient(110deg, #202023 8%, #27272b 18%, #202023 33%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s linear infinite;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}
.card-img img.lazy {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* 图片加载完成后淡入显示 */
.card-img img.fade-in {
    opacity: 1;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.rating-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--theme-badge-overlay);
    padding: 2px 7px;
    display: inline-flex;
    gap: 2px;
    font-size: 0.68rem;
    color: var(--theme-text-medium);
    border-radius: 16px;
}

.rating-badge svg {
    color: #ffcc00;
    flex-shrink: 0;
}

.card-info {
    padding: 8px;
}

.card-info h4 {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--theme-text-strong);
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.67rem;
    color: var(--theme-text-faint);
}

.view-more-wrap {
    text-align: center;
    margin: 18px 0 30px;
}

.view-more-wrap a {
    display: inline-block;
    color: var(--theme-text-light);
    font-size: 14px;
    padding: 6px 20px;
    border-radius: 30px;
    background: var(--theme-bg-card);
    transition: var(--theme-transition);
    text-decoration: none;
}

.view-more-wrap a:hover {
    color: var(--theme-text-strong);
    background: var(--theme-bg-hover);
}

/* 详情页样式 */
.movie-info {
    padding: 24px 0;
}

.movie-header {
    display: flex;
    gap: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

@media (min-width:768px) {
    .movie-header {
        background: linear-gradient(to right,rgba(15,23,42,.92) 40%,rgba(15,23,42,.75)),url('https://picsum.photos/800/320?random=6');
        background-size: cover;
        background-position: center;
        padding: 24px 20px;
        border-radius: 12px;
        backdrop-filter: blur(8px);
    }
}

.movie-poster {
    width: 220px;
    height: 100%;
    border-radius: 10px;
    flex-shrink: 0;
    overflow: hidden;
    /* 背景图 */
    background-size: cover;
    background-position: center;

    /* ====================================== */
    /* ✅ 核心：方形 四边直边模糊渐变（超大模糊范围） */
    /* ====================================== */
    -webkit-mask: linear-gradient(
      to bottom,
      transparent 0%,     /* 顶部透明开始 */
      black 12% 88%,      /* 中间清晰（12% - 88%） */
      transparent 100%     /* 底部透明结束 */
    ),
    linear-gradient(
      to right,
      transparent 0%,     /* 左边透明开始 */
      black 12% 88%,      /* 中间清晰 */
      transparent 100%     /* 右边透明结束 */
    );
    /* 两个渐变叠加 = 四边同时模糊透明 */
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}

.movie-poster img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.movie-details {
    flex: 1;
    min-width: 280px;
}

.movie-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--theme-text-strong);
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--theme-text-medium);
    flex-wrap: wrap;
}

/* 百分比五星评分样式 */
.douban-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--theme-text-medium);
}
.star-container {
    position: relative;
    font-size: 16px;
    line-height: 1;
    width: 85px;
    height: 16px;
}
.stars-bg,
.stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    letter-spacing: 2px;
    white-space: nowrap;
}
/* 灰色空心底星 */
.stars-bg {
    color: #444;
    z-index: 1;
}
/* 黄色填充星（百分比裁剪） */
.stars-fill {
    color: #ffcc00;
    z-index: 2;
    overflow: hidden;
    transition: width 0.3s ease;
}
.score-text {
    color: #ffcc00;
    font-weight: 600;
}
.info-list {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 6px 16px;
    margin-bottom: 12px;
}

.info-item {
    display: flex;
    font-size: 14px;
    align-items: center;
    width: 100%;
    overflow: auto hidden;
    white-space: nowrap;
    padding: 2px 0 5px;
    -webkit-overflow-scrolling: touch;
}

.info-item::-webkit-scrollbar {
    height: 3px;
}

.info-item::-webkit-scrollbar-track {
    background: transparent;
}

.info-item::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
    transition: background .2s ease;
}

.info-item:hover::-webkit-scrollbar-thumb {
    background: #666;
}

.info-label {
    width: 70px;
    color: var(--theme-text-light);
    flex-shrink: 0;
}

.info-value {
    color: var(--theme-text-medium);
    padding-right: 8px;
    white-space: nowrap;
}

.desc {
    line-height: 1.6;
    color: var(--theme-text-medium);
    font-size: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--theme-border);
}

/* 按钮组 */
.btn-group-table {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding: 0 16px 12px;
}

.btn {
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--theme-bg-btn);
    color: var(--theme-text-medium);
    border: none;
    cursor: pointer;
    font-size: 12px;
    transition: var(--theme-transition);
}

.btn:hover {
    background: var(--theme-bg-hover);
    color: var(--theme-text-strong);
}

.btn-primary {
    background: var(--theme-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--theme-primary-hover);
}

/* 播放列表 */
.play-wrapper {
    background: var(--theme-bg-card);
    padding: 12px 16px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.play-wrapper::-webkit-scrollbar {
    height: 4px;
}

.play-wrapper::-webkit-scrollbar-track {
    background: var(--theme-bg-light);
    border-radius: 2px;
}

.play-wrapper::-webkit-scrollbar-thumb {
    background: var(--theme-text-muted);
    border-radius: 2px;
}

.play-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-light);
}

.play-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.play-item {
    padding: 6px 12px;
    background: var(--theme-bg-btn);
    border-radius: 5px;
    font-size: 13px;
    color: var(--theme-text-medium);
    cursor: pointer;
    transition: var(--theme-transition);
    white-space: nowrap;
}

.play-item:hover {
    background: var(--theme-bg-hover);
    color: var(--theme-text-strong);
}

.play-item.active {
    background: var(--theme-primary);
    color: #fff;
}

/* 数据表格 */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--theme-bg-card);
    padding-bottom: 4px;
}

.table-wrap::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.table-wrap::-webkit-scrollbar-track {
    background: var(--theme-bg-light);
    border-radius: 2px;
}

.table-wrap::-webkit-scrollbar-thumb {
    background: var(--theme-text-muted);
    border-radius: 2px;
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--theme-text-light);
}

.table-wrap,
.table-wrap * {
    font-size: .75rem !important;
}

.table-wrap:not(.torrent-table) table th:first-child,
.table-wrap:not(.torrent-table) tr td:first-child {
    text-align: right;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

thead tr:nth-child(1) th {
    position: sticky;
    top: 0;
    z-index: 10;
}

th, td {
    padding: 9px 12px;
    text-align: left;
    white-space: nowrap;
}

th {
    background: var(--theme-bg-light);
    color: var(--theme-text-strong);
    border-bottom: 1px solid var(--theme-border);
}

td{
    color: var(--theme-text-medium);
}

tr {
    border-bottom: 1px solid var(--theme-border);
}

tr:last-child {
    border-bottom: none;
}

tr:hover td {
    background: var(--theme-bg-hover);
}

.table-right {
    text-align: right !important;
}

.torrent-table td:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

table a {
    color: var(--theme-text-medium) !important;
}

table a:hover {
    color: var(--theme-text-strong) !important;
}

.download-btn-bar {
    background: var(--theme-bg-card);
    padding: 12px 16px;
    border-top: 1px solid var(--theme-border);
    margin-top: -1px;
}

.torrent-table td {
    padding-left: 20px;
}

/* 复选框 */
input[type=checkbox] {
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid #444;
    border-radius: 3px;
    background: #1e1e20;
    cursor: pointer;
    position: relative;
    transition: all .2s ease;
}

input[type=checkbox]:checked {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
}

input[type=checkbox]:checked::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 3px;
    height: 6px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type=checkbox]:hover {
    border-color: #666;
}

/* 相关推荐 */
.related-grid {
    display: grid;
    grid-template-columns: repeat(9,1fr);
    gap: 10px;
    background: var(--theme-bg-card);
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 0 0 6px 6px;
}

/* 底部 */
footer {
    background: var(--theme-bg-light);
    border-top: 1px solid var(--theme-border);
    padding: 20px 12px;
    text-align: center;
    width: 100%;
    margin-top: auto;
}

.footer-inner {
    max-width: 1360px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 17px;
    font-weight: 700;
    color: var(--theme-text-strong);
    margin-bottom: 8px;
}

.footer-desc {
    font-size: 13px;
    color: var(--theme-text-light);
    margin-bottom: 6px;
}

.footer-copy {
    font-size: 12px;
    color: var(--theme-text-muted);
}

/* 评论区容器 */
.xl-comment-container {
    box-sizing: border-box;
    margin-bottom: 24px;
}

/* 标题栏 */
.xl-comment-header {
    background: var(--theme-bg-light);
    border-bottom: 1px solid var(--theme-border);
    padding: 12px 16px;
}

.xl-comment-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--theme-text-strong);
}

/* 评论列表外层 */
.xl-comment-list-wrapper {
    background: var(--theme-bg-card);
    overflow: visible;
}

/* 评论类型标题（豆瓣/本站） */
.xl-comment-type-title {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--theme-text-light);
    background: var(--theme-bg-btn);
}

/* 单条评论 */
.xl-comment-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* 评论头像 */
.xl-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
    border: 0;
    outline: none;
    box-shadow: none;
}

/* 评论内容容器 */
.xl-comment-content-wrap {
    flex: 1;
    min-width: 0;
}

/* 评论昵称 */
.xl-comment-nickname {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--theme-text);
    font-size: 14px;
}
.xl-comment-nickname span {
    display: inline-flex;
    gap: 4px;
    align-items: end;
}
.xl-comment-time-inline {
  margin-left: 8px;
  font-size: 12px;
  color: var(--theme-text-faint);
}
/* 管理员图标 */
.xl-admin-icon {
    flex-shrink: 0;
}

/* 评论时间 */
.xl-comment-time {
    font-size: 12px;
    color: var(--theme-text-faint);
    margin-top: 2px;
}

/* 评论内容外层 */
.xl-comment-text-wrapper {
    margin-top: 6px;
    line-height: 1.3;
}

/* 回复别人的盒子 */
.xl-comment-reply-box {
    background: -webkit-linear-gradient(left, #262525, #64606066);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    color: var(--theme-text-light);
    white-space: pre-wrap;
    margin: 6px 0 6px 0;
}

/* 评论文字 */
.xl-comment-text {
    font-size: 14px;
    color: var(--theme-text-medium);
}

/* 回复按钮 */
.xl-reply-btn {
    font-size: 12px;
    color: var(--theme-text-light);
    cursor: pointer;
}

/* 加载更多 */
.xl-comment-more {
    background: var(--theme-bg-light);
    text-align: center;
    padding: 8px 10px;
    color: var(--theme-text-light);
    cursor: pointer;
    border-top: 1px solid var(--theme-border);
    font-size: 13px; /* 文字缩小 */
}

/* 发表评论区域 */
.xl-comment-footer {
    background: var(--theme-bg-light);
    padding: 16px;
    border-top: 1px solid var(--theme-border);
}

/* 发表评论标签 */
.xl-comment-label {
    font-size: 14px;
    color: orange;
    margin-bottom: 8px;
    display: block;
}

/* 评论输入框 */
.xl-comment-textarea {
    width: 100%;
    background: var(--theme-bg-btn);
    border: 1px solid var(--theme-border-light);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--theme-text);
    min-height: 80px;
    max-height: 200px;
    resize: none;
    outline: none;
    box-shadow: none;
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-sizing: border-box;
}

/* 表单行 */
.xl-comment-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* 验证码文字 */
.xl-code-text {
    height: 32px;
    line-height: 32px;
    background: var(--theme-bg-btn);
    border: 1px solid var(--theme-border);
    color: var(--theme-text-medium);
    padding: 0 10px;
    border-radius: 4px;
    font-size: 14px;
}

/* 验证码输入框 */
.xl-code-input {
    height: 32px;
    width: 120px;
    background: var(--theme-bg-btn);
    border: 1px solid var(--theme-border);
    color: var(--theme-text);
    padding: 0 8px;
    outline: none;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: none;
    box-sizing: border-box;
}

/* 验证码图片 */
.xl-code-img {
    height: 32px;
    width: 150px;
    object-fit: contain;
    background: transparent;
    border: 0;
    outline: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    border-image: none;
    -webkit-appearance: none;
    display: none;
}

/* 提交评论按钮 */
.xl-comment-submit {
    height: 32px;
    line-height: 32px;
    background: var(--theme-primary);
    color: #fff;
    padding: 0 14px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    display: inline-block;
    box-sizing: border-box;
}
/* 回复按钮 hover */
.xl-reply-btn:hover {
  color: #ffffff !important;
  cursor: pointer;
}

/* 加载更多 hover */
.xl-comment-more:hover {
  background: #2a2a2a !important;
  color: #ffffff !important;
}

/* 求片留言页面专属样式 - xl-前缀 不冲突 */
.xl-gbook {
    margin-top: 24px !important;
}
.xl-request-card {
    background: var(--theme-bg-card);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}
.xl-request-body {
    padding: 20px;
}
.xl-request-title {
    margin-bottom: 16px;
    padding-bottom: 16px;
    font-size: 24px;
    border-bottom: 1px dashed var(--theme-border);
}
.xl-request-desc {
    color: var(--theme-text-medium);
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 14px;
}
.xl-request-warning {
    font-weight: 600;
    color: #ff3b3b !important;
}
.xl-request-subtitle {
    text-align: center;
    color: var(--theme-text-strong);
    margin: 24px 0 12px;
    font-size: 16px; }

/* 提交按钮 hover */
.xl-comment-submit:hover {
  filter: brightness(1.15);
  background: #444444 !important;
}

/* ====================== 搜索页面样式 xl- 前缀 ====================== */
.xl-search-bar {
  background: var(--theme-bg-light);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
}
.xl-search-bar h4 {
  font-size: 16px;
  color: var(--theme-text-strong);
  margin: 0 0 12px 0;
}
.xl-search-info {
  color: var(--theme-text-medium);
  font-size: 14px;
}
.xl-search-info span {
  color: #ff3b3b;
  font-weight: bold;
}

/* 验证码区域 */
.xl-code-wrap p {
  color: var(--theme-text-medium);
  margin-bottom: 12px;
}
.xl-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.xl-code-row img {
  height: 36px;
  cursor: pointer;
  background: #222;
  object-fit: cover;
}
.xl-code-row input {
  flex: 1;
  height: 38px;
  background: var(--theme-bg-btn);
  border: 1px solid var(--theme-border-light);
  border-radius: 4px;
  padding: 0 12px;
  color: var(--theme-text);
  outline: none;
}
.xl-code-row button {
  padding: 0 16px;
  height: 38px;
  background: var(--theme-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.xl-code-row button:hover {
  background: var(--theme-primary-hover);
}

/* 搜索结果列表 */
.xl-result-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.xl-result-item {
  display: flex;
  gap: 16px;
  background: var(--theme-bg-card);
  padding: 14px;
  transition: 0.2s;
  border-radius: 8px;
  -webkit-mask: linear-gradient(to bottom, transparent 0, black 12% 88%, transparent 100%), linear-gradient(to right, transparent 0, black 1% 99%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect
}

.xl-result-poster {
  width: 110px;
  flex-shrink: 0;
  overflow: hidden;
-webkit-mask: linear-gradient(to bottom, transparent 0%, black 1% 99%,  transparent 100% ), linear-gradient(to right, transparent 0%, black 12% 88%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
}
.xl-result-poster img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}
.xl-result-info {
  flex: 1;
  min-width: 0;
}
.xl-result-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--theme-text-medium);
  margin-bottom: 10px;
  display: block;
}
.xl-result-name:hover {
  color: var(--theme-text-strong);
}
.xl-result-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xl-result-meta p {
  margin: 0;
  font-size: 13px;
  color: var(--theme-text-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 分页 */
.xl-pagination {
  background: var(--theme-bg-light);
  border-radius: 8px;
  padding: 14px;
  margin: 20px 0;
}
.xl-pagination ul {
  display: flex;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.xl-pagination li.disabled {
  pointer-events: none;
}
.xl-pagination li a {
  display: block;
  padding: 6px 12px;
  background: var(--theme-bg-btn);
  color: var(--theme-text-medium);
  border-radius: 4px;
  font-size: 14px;
}
.xl-pagination li a:hover {
  background: var(--theme-bg-hover);
  color: var(--theme-text-strong);
}
.xl-pagination li.active a {
  background: var(--theme-primary);
  color: #fff;
}
.xl-pagination li.disabled a {
  opacity: 0.4;
  cursor: not-allowed;
}

.xl-filter-card,
.xl-list-card {
    margin: 20px 0;
    background: var(--theme-bg-light);
    border-radius: 8px;
    overflow: hidden;
}

/* 筛选栏紧凑样式 */
.xl-compact-filter {
    padding: 12px 16px;
}
.xl-compact-filter dl {
    display: flex;
    /* align-items: center;  已删除 */
    padding: 6px 0;
    margin: 0;
    gap: 10px;
    border-bottom: 1px dashed var(--theme-border);
}
.xl-compact-filter dl:last-child {
    border-bottom: none;
}
.xl-compact-filter dt {
    font-size: 12px;
    color: var(--theme-text-medium);
    min-width: 68px;
    font-weight: 500;
    white-space: nowrap;
}
.xl-compact-filter dd {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}
.xl-compact-filter dd a {
    border-radius: 0;
    font-size: 12px;
    background: transparent;
    color: var(--theme-text-light);
    white-space: nowrap;
}
.xl-compact-filter dd a:hover,
.xl-compact-filter dd a.active {
    background: transparent;
    color: var(--theme-text-strong);
    font-weight: bold;
}

.xl-grid-container {
    padding: 16px;
}

/* 一行8个影视卡片 */
.xl-movies-grid-8 {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}
@media (max-width: 1400px) {
    .xl-movies-grid-8 {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media (max-width: 768px) {
    .xl-movies-grid-8 {
        grid-template-columns: repeat(3, 1fr);
    }
    /* 移动端强制 dt + dd 同一行 */
    .xl-compact-filter dl {
        flex-direction: row !important;
        align-items: flex-start !important;
    }
}

.player-wrapper {
  margin-top: 12px;
  background: var(--theme-bg-card);
  border: none;
  border-radius: 8px;
  overflow: hidden;
}

/* 播放器容器 16:9 自适应 */
.player-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  background: #000;
}

.player-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--theme-bg-light);
  border-top: 1px solid var(--theme-border);
  font-size: 16px;
  color: var(--theme-text-strong);
  gap: 12px;
}

.player-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-title a {
  color: var(--theme-text-strong);
  text-decoration: none;
}

.player-ai-link {
  color: #ff3b3b !important;
  white-space: nowrap;
  text-decoration: none;
}
.play-item.active {
    background: var(--theme-primary, #009955) !important;
    color: #fff !important;
    border-color: var(--theme-primary, #009955) !important;
}
.modal-modal { display:none; position:fixed; left:0; top:0; width:100%; height:100%; z-index:9999; align-items:center; justify-content:center; }
.modal-modal.show { display:flex; }
.modal-backdrop { position:absolute; background:var(--theme-overlay); width:100%; height:100%; }
.modal-box { position:relative; background:var(--theme-bg-light); border:1px solid var(--theme-border); border-radius:10px; width:90%; max-width:460px; overflow:hidden; }
.modal-header { padding:16px; border-bottom:1px solid var(--theme-border); display:flex; justify-content:space-between; align-items:center; color:var(--theme-text-strong); }
.modal-body { padding:20px; }
.input-group { display:flex; gap:10px; align-items:center; }
.input-group span { color:var(--theme-text-medium); }
.input-group input { flex:1; background:var(--theme-bg-btn); border:1px solid var(--theme-border); color:var(--theme-text); padding:8px 12px; border-radius:6px; outline:none; }
.input-group img { height:38px; border-radius:6px; cursor:pointer; }
.modal-footer { padding:16px; border-top:1px solid var(--theme-border); display:flex; justify-content:flex-end; gap:10px; }
.btn-cancel { background:var(--theme-bg-btn); color:var(--theme-text-medium); border:none; padding:8px 16px; border-radius:6px; cursor:pointer; }
.btn-confirm { background:var(--theme-primary); color:#fff; border:none; padding:8px 16px; border-radius:6px; cursor:pointer; }
.modal-close { background:none; border:none; color:var(--theme-text-medium); font-size:20px; cursor:pointer; }
.ad-close-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10000;
    font-size: 14px;
}
.ad-close-btn:hover {
    background: rgba(200,0,0,0.7);
}

/* 响应式适配 */
@media (max-width: 1200px) {
    .related-grid {
        grid-template-columns: repeat(6,1fr);
    }
}

@media (min-width: 1275px) {
    .movie-poster {
        margin-top: -75px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: grid;
    }

    .nav-menu, .search-box, .user-dropdown {
        display: none !important;
    }

    .container {
        padding: 0 0.6rem !important;
    }

    .top-row {
        display: block;
    }

    .latest-comments {
        display: none !important;
    }

    .banner {
        height: 180px !important;
    }

    .banner-img {
        object-fit: cover !important;
        width: 100%;
        height: 100%;
    }

    .movies-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.7rem;
    }

    .movie-header {
        flex-direction: column;
        gap: 16px;
        background: none !important;
    }

    .movie-poster {
        width: 160px;
        margin: 0 auto;
    }

    .movie-title {
        font-size: 20px;
        text-align: center;
    }

    .movie-meta {
        justify-content: center;
    }

    .info-list {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(3,1fr);
        gap: 8px;
    }

    footer {
        padding: 16px 0.6rem;
    }

    .top-row {
        margin-top: 12px;
    }

    .table-wrap, .table-wrap * {
        font-size: 12px !important;
        font-family: 'Inter', monospace !important;
    }
  .xl-result-item {
    flex-direction: column;
  }
  .xl-result-poster {
    margin: 0 auto;
  }
  .xl-code-row {
    flex-wrap: wrap;
  }
}