/* style.css - 2026 Premium Edition */

/* ===== Variables & Reset ===== */
:root {
    --primary-color: #00d4ff;
    --primary-hover: #00b8e6;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-sec: #666666;
    --header-bg: #1a1a2e;
    --header-text: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    font-size: 14px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

input,
button {
    font-family: inherit;
}

/* ===== Layout ===== */
[class~="container"] {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===== Header ===== */
header {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

header [class~="header-inner"] {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header [class~="logo"] a {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(45deg, #00d4ff, #005bea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

header nav {
    display: flex;
    gap: 5px;
}

header nav a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s;
}

header nav a:hover,
header nav a[class~="active"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

header [class~="search-form"] {
    display: flex;
    position: relative;
    width: 260px;
}

header [class~="search-form"] input {
    width: 100%;
    padding: 9px 40px 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 14px;
    transition: background 0.3s;
}

header [class~="search-form"] input:focus {
    background: rgba(255, 255, 255, 0.15);
}

header [class~="search-form"] button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--primary-color);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

header [class~="search-form"] button:hover {
    background: var(--primary-hover);
}

/* ===== Main Content ===== */
main {
    margin: 30px auto;
    min-height: calc(100vh - 250px);
    display: flex;
    flex-direction: column;
}

section {
    background: var(--card-bg);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

section h2 {
    font-size: 22px;
    margin-bottom: 25px;
    padding-left: 12px;
    border-left: 5px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

section h2 [class~="more"] {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    padding: 4px 12px;
    border: 1px solid #eee;
    border-radius: 15px;
}

section h2 [class~="more"]:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ===== Page Header ===== */
[class~="page-header"] {
    text-align: center;
    padding: 30px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

[class~="page-header"] h1 {
    font-size: 32px;
    color: var(--text-main);
    margin-bottom: 10px;
}

[class~="page-subtitle"] {
    color: #999;
    font-size: 16px;
}

/* ===== Components ===== */
[class~="hot-search"] {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

[class~="hot-search"] span {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

[class~="hot-search"] span::before {
    content: '🔥';
    margin-right: 5px;
}

[class~="hot-search"] a {
    background: #f5f7fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

[class~="hot-search"] a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 212, 255, 0.3);
}

/* Movie Grid - class prefix compatible */
[class~="movie-grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px 20px;
    padding: 0;
    list-style: none;
}

/* 🔑 关键修复：嵌套Grid布局 - ul[class~="pic-list"] 跨越所有列 - class prefix compatible */
[class~="movie-grid"] ul[class~="pic-list"],
[class~="movie-grid"] [class~="pic-list"] {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    grid-column: 1 / -1 !important;
    gap: 20px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* li 项目强制覆盖Bootstrap类 - class prefix compatible */
[class~="movie-grid"] ul[class~="pic-list"] > li,
[class~="movie-grid"] [class~="pic-list"] > li,
[class~="movie-grid"] ul[class~="pic-list"] li {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

/* Move news section to the bottom of the homepage */
[class~="news-section"] {
    order: 90;
}

/* Ensure nested card media renders correctly - class prefix compatible */
[class~="movie-grid"] [class~="pic-list"] li [class~="pic-img"] {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 2/3 !important;
    overflow: hidden !important;
    border-radius: var(--radius-sm) !important;
    background: #eef !important;
    background-size: cover !important;
    background-position: center !important;
    display: block !important;
}

[class~="movie-grid"] [class~="pic-list"] li [class~="pic-img"] img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.5s ease !important;
}

[class~="movie-grid"] [class~="pic-list"] li:hover [class~="pic-img"] img {
    transform: scale(1.1) !important;
}

/* Target direct children (li or div) to ensure cards look right regardless of tag output - class prefix compatible */
[class~="movie-grid"]>*,
[class~="movie-card"] {
    background: transparent;
    border-radius: var(--radius-sm);
    overflow: visible;
    transition: transform 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Only apply hover to actual card items (li), not ul[class~="pic-list"] container - class prefix compatible */
[class~="movie-grid"]>ul[class~="pic-list"]>li:hover,
[class~="movie-grid"] [class~="pic-list"]>li:hover,
[class~="movie-card"]:hover {
    transform: translateY(-8px);
}

[class~="poster-wrapper"],
[class~="movie-grid"]>* img,
[class~="movie-grid"]>* [class~="img-block"] {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 2/3;
    box-shadow: var(--shadow-sm);
    background: #eef;
    width: 100%;
}

[class~="movie-grid"]>* img,
[class~="movie-card"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

[class~="movie-grid"]>ul[class~="pic-list"]>li:hover img,
[class~="movie-grid"] [class~="pic-list"]>li:hover img,
[class~="movie-card"]:hover img {
    transform: scale(1.1);
}

/* 🔑 关键修复：隐藏卡片内的重复标题（图片上的标题） - class prefix compatible */
[class~="movie-grid"] [class~="pic-list"] li [class~="pic-img"] [class~="title"],
[class~="movie-grid"] [class~="pic-img"] [class~="title"] {
    display: none !important;
}

/* 只显示卡片下方的标题 - class prefix compatible */
[class~="movie-grid"] [class~="pic-list"] li h3[class~="name"],
[class~="movie-grid"] h3[class~="name"] {
    display: block !important;
}

/* Score styling - support common class names - class prefix compatible */
[class~="score"],
[class~="movie-grid"]>* [class~="score"] {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 107, 53, 0.9);
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

/* Tips/Status badge - top-left - class prefix compatible */
[class~="tips"],
[class~="movie-grid"] [class~="pic-list"] li [class~="pic-img"] [class~="tips"],
[class~="movie-grid"]>* [class~="tips"] {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 212, 255, 0.85);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 5;
}

/* Remarks/Status styling - class prefix compatible */
[class~="remarks"],
[class~="state"],
[class~="movie-grid"]>* [class~="note"] {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    color: #fff;
    padding: 25px 8px 6px;
    font-size: 12px;
    text-align: right;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 4;
}

[class~="movie-grid"]>* [class~="info"],
[class~="movie-card"] [class~="info"] {
    padding: 10px 0 0;
}

/* Title styling - support .title and .name - class prefix compatible */
[class~="title"],
[class~="name"],
[class~="movie-grid"]>* h3 {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    color: var(--text-main);
    display: block;
}

[class~="desc"],
[class~="actor"] {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[class~="movie-grid"]>ul[class~="pic-list"]>li:hover [class~="title"],
[class~="movie-grid"]>ul[class~="pic-list"]>li:hover [class~="name"],
[class~="movie-grid"] [class~="pic-list"]>li:hover [class~="title"],
[class~="movie-grid"] [class~="pic-list"]>li:hover [class~="name"] {
    color: var(--primary-color);
}

/* ===== Play Page Layout ===== */
[class~="breadcrumb"] {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    background: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

[class~="breadcrumb"] a:hover {
    color: var(--primary-color);
}

[class~="play-page-layout"] {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

[class~="play-main-content"] {
    flex: 1;
    min-width: 0;
}

[class~="movie-detail"] {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

[class~="movie-poster"] {
    width: 260px;
    flex-shrink: 0;
    z-index: 2;
}

[class~="movie-poster"] img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

[class~="movie-info"] {
    flex: 1;
    z-index: 2;
}

[class~="movie-info"] h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #1a1a2e;
    font-weight: 700;
}

[class~="info-list"] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 30px;
    color: #555;
    margin-bottom: 25px;
    font-size: 15px;
}

[class~="info-list"] li {
    border-bottom: 1px dotted #eee;
    padding-bottom: 8px;
}

[class~="info-list"] strong {
    color: #1a1a2e;
    font-weight: 600;
}

[class~="synopsis"] {
    background: #f9f9fc;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.8;
    color: #666;
    border-left: 4px solid var(--primary-color);
}

/* ===== User Interaction Area ===== */
[class~="interaction-area"] {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: 20px 0;
}

[class~="interaction-rating"] {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

[class~="rating-label"] {
    font-weight: 600;
    color: #333;
}

[class~="rating-stars"] {
    display: flex;
    gap: 5px;
}

[class~="rating-stars"] [class~="star"] {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

[class~="rating-stars"] [class~="star"][class~="active"],
[class~="rating-stars"] [class~="star"]:hover {
    color: #ffc107;
}

[class~="rating-text"] {
    color: #999;
    font-size: 14px;
}

[class~="interaction-buttons"] {
    display: flex;
    gap: 15px;
}

[class~="interaction-btn"] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f5f7fa;
    border: 1px solid #eee;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

[class~="interaction-btn"]:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

[class~="interaction-btn"][class~="active"] {
    background: var(--primary-color);
    color: #fff;
}

[class~="interaction-btn"] [class~="icon"] {
    font-size: 16px;
}

[class~="interaction-btn"] [class~="count"] {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ===== Play Sidebar ===== */
[class~="play-sidebar"] {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

[class~="sidebar-card"] {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

[class~="sidebar-title"] {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

[class~="sidebar-title"] [class~="icon"] {
    font-size: 18px;
}

/* Monthly Ranking */
[class~="monthly-ranking"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

[class~="monthly-ranking"] a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

[class~="monthly-ranking"] a:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(4px);
}

[class~="monthly-ranking"] a i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #e0e0e0;
    color: #999;
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Top 3 special colors */
[class~="monthly-ranking"] a:nth-child(1) i {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

[class~="monthly-ranking"] a:nth-child(2) i {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
}

[class~="monthly-ranking"] a:nth-child(3) i {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
}

[class~="monthly-ranking"] [class~="name"] {
    flex: 1;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[class~="monthly-ranking"] a:hover [class~="name"] {
    color: var(--primary-color);
}

[class~="weekly-ranking"],
[class~="type-ranking"] {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 🔑 关键修复：侧边栏排行榜隐藏缩略图，只显示文本列表 */
[class~="play-sidebar"] [class~="weekly-ranking"] [class~="pic-list"],
[class~="play-sidebar"] [class~="type-ranking"] [class~="pic-list"],
[class~="play-sidebar"] [class~="weekly-ranking"] ul,
[class~="play-sidebar"] [class~="type-ranking"] ul {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* 隐藏排行榜中的图片和多余元素 */
[class~="play-sidebar"] [class~="weekly-ranking"] [class~="pic-list"] li [class~="pic-img"],
[class~="play-sidebar"] [class~="type-ranking"] [class~="pic-list"] li [class~="pic-img"],
[class~="play-sidebar"] [class~="weekly-ranking"] li img,
[class~="play-sidebar"] [class~="type-ranking"] li img {
    display: none !important;
}

/* 只显示标题链接 */
[class~="play-sidebar"] [class~="weekly-ranking"] [class~="pic-list"] li h3,
[class~="play-sidebar"] [class~="type-ranking"] [class~="pic-list"] li h3,
[class~="play-sidebar"] [class~="weekly-ranking"] li h3,
[class~="play-sidebar"] [class~="type-ranking"] li h3 {
    display: block !important;
    margin: 0 !important;
    padding: 8px 12px !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    transition: all 0.2s !important;
}

[class~="play-sidebar"] [class~="weekly-ranking"] [class~="pic-list"] li h3:hover,
[class~="play-sidebar"] [class~="type-ranking"] [class~="pic-list"] li h3:hover,
[class~="play-sidebar"] [class~="weekly-ranking"] li h3:hover,
[class~="play-sidebar"] [class~="type-ranking"] li h3:hover {
    background: rgba(0, 212, 255, 0.1) !important;
    transform: translateX(4px) !important;
}

[class~="play-sidebar"] [class~="weekly-ranking"] [class~="pic-list"] li h3 a,
[class~="play-sidebar"] [class~="type-ranking"] [class~="pic-list"] li h3 a,
[class~="play-sidebar"] [class~="weekly-ranking"] li h3 a,
[class~="play-sidebar"] [class~="type-ranking"] li h3 a {
    color: #666 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

[class~="play-sidebar"] [class~="weekly-ranking"] [class~="pic-list"] li h3 a:hover,
[class~="play-sidebar"] [class~="type-ranking"] [class~="pic-list"] li h3 a:hover,
[class~="play-sidebar"] [class~="weekly-ranking"] li h3 a:hover,
[class~="play-sidebar"] [class~="type-ranking"] li h3 a:hover {
    color: var(--primary-color) !important;
}

[class~="weekly-ranking"] *,
[class~="type-ranking"] * {
    font-size: 14px;
}

/* ===== Player Section ===== */
[class~="player-section-container"] {
    padding: 25px;
    margin-top: 30px;
}

#player {
    background: #000;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

[class~="player-placeholder"] {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

[class~="player-placeholder"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: blur(20px);
    transform: scale(1.1);
}

[class~="play-btn"] {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #005bea);
    border: none;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    z-index: 10;
    transition: transform 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

[class~="play-btn"]:hover {
    transform: scale(1.1);
}

[class~="play-btn"]::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #ffffff;
    margin-left: 5px;
}

[class~="play-sources-tabs"] {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 0;
}

[class~="source-tab"] {
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: #666;
    transition: all 0.3s;
}

[class~="source-tab"]::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

[class~="source-tab"][class~="active"] {
    color: var(--primary-color);
}

[class~="source-tab"][class~="active"]::after {
    width: 100%;
}

[class~="play-list"] {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

[class~="play-list"] a {
    flex: 0 0 calc(10% - 11px);
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    transition: all 0.2s;
}

[class~="play-list"] a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.15);
}

/* ===== News Module ===== */
[class~="news-section"] {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

[class~="news-grid"] {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

[class~="news-card"] {
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

[class~="news-card"]:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

[class~="news-pic"] {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0f0f0;
}

[class~="news-pic"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[class~="news-info"] {
    padding: 15px;
}

[class~="news-title"] {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[class~="news-meta"] {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

/* News List Page */
[class~="news-categories"] {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

[class~="news-categories"] a {
    padding: 8px 20px;
    background: #f5f7fa;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

[class~="news-categories"] a:hover,
[class~="news-categories"] a[class~="active"] {
    background: var(--primary-color);
    color: #fff;
}

[class~="news-list-full"] {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* News Detail */
[class~="news-detail-layout"] {
    display: flex;
    gap: 30px;
}

[class~="news-article"] {
    flex: 1;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

[class~="news-header"] {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

[class~="news-header"] h1 {
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #1a1a2e;
}

[class~="news-header-meta"] {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

[class~="category-tag"] {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
}

[class~="news-cover"] {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
}

[class~="news-cover"] img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

[class~="news-content"] {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

[class~="news-content"] p {
    margin-bottom: 18px;
}

[class~="news-content"] img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

[class~="news-tags"] {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

[class~="news-tags"] span {
    background: #f5f7fa;
    color: #999;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

[class~="news-source"] {
    margin-top: 25px;
    padding: 15px;
    background: #f9f9fc;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

[class~="news-source"] a {
    color: var(--primary-color);
}

/* News Sidebar */
[class~="news-sidebar"] {
    width: 300px;
    flex-shrink: 0;
}

[class~="sidebar-block"] {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

[class~="sidebar-block"] h3,
[class~="sidebar-title"] {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

[class~="news-list"] [class~="news-item"] {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

[class~="news-list"] [class~="news-item"]:last-child {
    border-bottom: none;
}

[class~="news-list"] [class~="news-thumb"] {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

[class~="news-list"] [class~="news-thumb"] img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

[class~="news-list"] [class~="news-title"] {
    font-size: 14px;
    margin-bottom: 5px;
}

[class~="news-list"] [class~="news-summary"] {
    display: none;
}

[class~="news-list"] [class~="news-meta"] {
    font-size: 12px;
}

/* News list desktop layout override */
@media (min-width: 992px) {
    [class~="news-list-full"] [class~="news-list"] [class~="news-item"] {
        gap: 20px;
        padding: 18px 0;
    }

    [class~="news-list-full"] [class~="news-thumb"] {
        width: 220px;
        height: 140px;
    }

    [class~="news-list-full"] [class~="news-summary"] {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #666;
        font-size: 14px;
        line-height: 1.6;
    }
}

/* Related News Section */
[class~="related-news-section"] {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-top: 30px;
}

[class~="related-news-section"] h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* ===== Pagination ===== */
[class~="pagination-wrapper"] {
    margin-top: 30px;
}

[class~="pagination"] {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

[class~="pagination"] a,
[class~="pagination"] span {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    transition: all 0.2s;
}

[class~="pagination"] a:hover,
[class~="pagination"] span[class~="active"] {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

[class~="pagination"] [class~="page-prev"],
[class~="pagination"] [class~="page-next"] {
    padding: 8px 20px;
}

[class~="pagination"] [class~="page-ellipsis"] {
    background: none;
    border: none;
}

/* ===== Footer ===== */
footer {
    background: #1a1a2e;
    color: #999;
    padding: 50px 0 30px;
    margin-top: 50px;
}

[class~="footer-inner"] {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

[class~="footer-section"] {
    flex: 1;
    min-width: 200px;
}

[class~="footer-section"] h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

[class~="footer-section"] p {
    margin-bottom: 10px;
    line-height: 1.6;
}

[class~="footer-links"] {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

[class~="footer-links"] a {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
}

[class~="footer-links"] a:hover {
    background: var(--primary-color);
    color: #fff;
}

[class~="partner-links"] {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

[class~="partner-links"] a {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 13px;
    transition: all 0.2s;
}

[class~="partner-links"] a:hover {
    background: var(--primary-color);
    color: #fff;
}

[class~="footer-bottom"] {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[class~="footer-bottom"] p {
    margin-bottom: 8px;
}

[class~="disclaimer"] {
    font-size: 12px;
    color: #666;
}

[class~="icp-info"] { color: rgba(255,255,255,0.4); font-size: 12px; text-align: center; margin-top: 4px; }
[class~="icp-info"] a { color: rgba(255,255,255,0.4); }
[class~="icp-info"] a:hover { color: rgba(255,255,255,0.7); }

/* ===== Back to Top ===== */
[class~="back-to-top"] { position: fixed; bottom: 30px; right: 30px; width: 46px; height: 46px; background: #ff6600; color: #fff; border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.3s ease; z-index: 9999; box-shadow: 0 4px 12px rgba(255,102,0,0.4); }
[class~="back-to-top"][class~="visible"] { opacity: 1; visibility: visible; transform: translateY(0); }
[class~="back-to-top"]:hover { opacity: 0.85; transform: translateY(-3px); }

/* ===== Lazy Load Effect ===== */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[class~="loaded"] {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    [class~="container"] {
        max-width: 1140px;
    }

    [class~="movie-grid"] ul[class~="pic-list"],
    [class~="movie-grid"] [class~="pic-list"] {
        grid-template-columns: repeat(5, 1fr) !important;
        grid-column: 1 / -1 !important;
    }

    /* 1200px 断点：缩小海报避免挤压内容 */
    [class~="movie-poster"] {
        width: 200px;
    }
}

@media (max-width: 1024px) {
    [class~="container"] {
        max-width: 960px;
    }

    [class~="movie-grid"] ul[class~="pic-list"],
    [class~="movie-grid"] [class~="pic-list"] {
        grid-template-columns: repeat(4, 1fr) !important;
        grid-column: 1 / -1 !important;
    }

    /* 1024px 断点：进一步缩小海报 */
    [class~="movie-poster"] {
        width: 180px;
    }
}

@media (max-width: 768px) {
    header [class~="header-inner"] {
        flex-direction: column;
        gap: 15px;
    }

    header nav {
        width: 100%;
        overflow-x: auto;
        padding: 5px 15px;
        -webkit-overflow-scrolling: touch;
    }

    header nav a {
        white-space: nowrap;
        padding: 6px 14px;
        font-size: 14px;
    }

    header [class~="search-form"] {
        width: 90%;
    }

    [class~="play-page-layout"] {
        flex-direction: column;
    }

    [class~="play-sidebar"] {
        width: 100%;
    }

    [class~="movie-detail"] {
        flex-direction: column;
        padding: 20px;
    }

    [class~="movie-poster"] {
        width: 160px;
        margin: 0 auto;
    }

    [class~="info-list"] {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    [class~="movie-info"] h1 {
        text-align: center;
        font-size: 24px;
    }

    [class~="play-list"] a {
        flex: 0 0 calc(20% - 10px);
    }

    [class~="movie-grid"] {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    /* 响应式：嵌套Grid修复 - class prefix compatible */
    [class~="movie-grid"] ul[class~="pic-list"],
    [class~="movie-grid"] [class~="pic-list"] {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-column: 1 / -1 !important;
    }

    [class~="news-grid"] {
        grid-template-columns: repeat(2, 1fr);
    }

    [class~="news-detail-layout"] {
        flex-direction: column;
    }

    [class~="news-sidebar"] {
        width: 100%;
    }

    [class~="footer-inner"] {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    [class~="movie-grid"] {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 响应式：嵌套Grid修复 - class prefix compatible */
    [class~="movie-grid"] ul[class~="pic-list"],
    [class~="movie-grid"] [class~="pic-list"] {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-column: 1 / -1 !important;
    }

    [class~="news-grid"] {
        grid-template-columns: 1fr;
    }

    [class~="play-list"] a {
        flex: 0 0 calc(25% - 9px);
        font-size: 12px;
    }

    section {
        padding: 15px;
    }

    section h2 {
        font-size: 18px;
    }

    [class~="interaction-buttons"] {
        flex-wrap: wrap;
    }

    [class~="interaction-btn"] {
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* ===== Template Copyright Style ===== */
/* Attribute selector for class prefix compatibility */
[class~="vt-template-copyright"] {
    margin-top: 36px;
    padding: 18px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 13px;
    line-height: 1.9;
    color: #8b949e;
    text-align: center;
}

/* ===== Sidebar Thumbnail Sizing ===== */
[class~="sidebar-card"] [class~="pic-img"],
[class~="monthly-ranking"] [class~="pic-img"] {
    position: relative !important;
    width: 100% !important;
    height: 0 !important;
    padding-bottom: 150% !important; /* 2:3 aspect ratio */
    overflow: hidden !important;
    background: #eef !important;
    border-radius: var(--radius-sm) !important;
}

[class~="sidebar-card"] [class~="pic-img"] img,
[class~="monthly-ranking"] [class~="pic-img"] img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* site-slogan: 随机口号展示栏 */
[class~="site-slogan"] {
    text-align: center;
    padding: 6px 16px;
    font-size: 13px;
    opacity: 0.65;
    background: transparent;
    pointer-events: none;
}
[class~="site-slogan"] p { margin: 0; line-height: 1.4; }


/* Logo text fallback */
[class~="logo-text"] {
    font-size: 1.5rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

/* ========== Detail Page Styles ========== */
[class~="detail-main"] { padding: 20px 0; }
[class~="detail-container"] { display: flex; gap: 30px; max-width: 1200px; margin: 0 auto; padding: 0 15px; flex-wrap: wrap; }
[class~="detail-poster"] { flex-shrink: 0; width: 200px; }
[class~="detail-poster"] img { width: 100%; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
[class~="detail-info"] { flex: 1; min-width: 280px; }
[class~="detail-title"] { font-size: 1.8rem; font-weight: bold; margin-bottom: 15px; line-height: 1.3; }
[class~="detail-meta"] { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; font-size: 14px; color: #999; }
[class~="meta-item"] strong { color: #ccc; }
[class~="detail-synopsis"] { margin-bottom: 20px; line-height: 1.8; }
[class~="detail-synopsis"] h3 { font-size: 1.1rem; font-weight: bold; margin-bottom: 8px; }
[class~="detail-play-btn"] { margin: 20px 0; }
[class~="btn-play-now"] { display: inline-block; padding: 12px 32px; background: #e53935; color: #fff !important; border-radius: 4px; text-decoration: none; font-size: 16px; font-weight: bold; transition: background 0.2s; }
[class~="btn-play-now"]:hover { background: #c62828; }
[class~="detail-episodes"] { max-width: 1200px; margin: 24px auto; padding: 0 15px; }
[class~="detail-episodes"] h3 { font-size: 1.1rem; font-weight: bold; margin-bottom: 12px; }
[class~="detail-related"] { max-width: 1200px; margin: 24px auto; padding: 0 15px; }
[class~="detail-related"] h3 { font-size: 1.1rem; font-weight: bold; margin-bottom: 12px; }
[class~="breadcrumb"] { max-width: 1200px; margin: 12px auto; padding: 0 15px; font-size: 13px; color: #888; }
[class~="breadcrumb"] a { color: #666; text-decoration: none; }
[class~="breadcrumb"] a:hover { text-decoration: underline; }
@media (max-width: 768px) {
    [class~="detail-container"] { flex-direction: column; }
    [class~="detail-poster"] { width: 140px; margin: 0 auto; }
    [class~="detail-title"] { font-size: 1.4rem; }
    [class~="btn-play-now"] { width: 100%; text-align: center; box-sizing: border-box; }
}
