/* 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 ===== */
.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 .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .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.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

header .search-form {
    display: flex;
    position: relative;
    width: 260px;
}

header .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 .search-form input:focus {
    background: rgba(255, 255, 255, 0.15);
}

header .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 .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 .more {
    font-size: 14px;
    color: #999;
    font-weight: normal;
    padding: 4px 12px;
    border: 1px solid #eee;
    border-radius: 15px;
}

section h2 .more:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.page-header h1 {
    font-size: 32px;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-subtitle {
    color: #999;
    font-size: 16px;
}

/* ===== Components ===== */
.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;
}

.hot-search span {
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
}

.hot-search span::before {
    content: '🔥';
    margin-right: 5px;
}

.hot-search a {
    background: #f5f7fa;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.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.pic-list 跨越所有列 - class prefix compatible */
[class~="movie-grid"] ul.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.pic-list > li,
[class~="movie-grid"] [class~="pic-list"] > li,
[class~="movie-grid"] ul.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 */
.news-section {
    order: 90;
}

/* Ensure nested card media renders correctly - class prefix compatible */
[class~="movie-grid"] [class~="pic-list"] li .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 .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 .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.pic-list container - class prefix compatible */
[class~="movie-grid"]>ul.pic-list>li:hover,
[class~="movie-grid"] [class~="pic-list"]>li:hover,
[class~="movie-card"]:hover {
    transform: translateY(-8px);
}

.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.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 .pic-img .title,
[class~="movie-grid"] .pic-img .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 .pic-img .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.pic-list>li:hover [class~="title"],
[class~="movie-grid"]>ul.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 ===== */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    background: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.play-page-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.play-main-content {
    flex: 1;
    min-width: 0;
}

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

.movie-poster {
    width: 260px;
    flex-shrink: 0;
    z-index: 2;
}

.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);
}

.movie-info {
    flex: 1;
    z-index: 2;
}

.movie-info h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #1a1a2e;
    font-weight: 700;
}

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

.info-list li {
    border-bottom: 1px dotted #eee;
    padding-bottom: 8px;
}

.info-list strong {
    color: #1a1a2e;
    font-weight: 600;
}

.synopsis {
    background: #f9f9fc;
    padding: 15px;
    border-radius: 8px;
    line-height: 1.8;
    color: #666;
    border-left: 4px solid var(--primary-color);
}

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

.interaction-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.rating-label {
    font-weight: 600;
    color: #333;
}

.rating-stars {
    display: flex;
    gap: 5px;
}

.rating-stars .star {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-stars .star.active,
.rating-stars .star:hover {
    color: #ffc107;
}

.rating-text {
    color: #999;
    font-size: 14px;
}

.interaction-buttons {
    display: flex;
    gap: 15px;
}

.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;
}

.interaction-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.interaction-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.interaction-btn .icon {
    font-size: 16px;
}

.interaction-btn .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ===== Play Sidebar ===== */
.play-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.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;
}

.sidebar-title .icon {
    font-size: 18px;
}

/* Monthly Ranking */
.monthly-ranking {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.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;
}

.monthly-ranking a:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(4px);
}

.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 */
.monthly-ranking a:nth-child(1) i {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
}

.monthly-ranking a:nth-child(2) i {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: white;
}

.monthly-ranking a:nth-child(3) i {
    background: linear-gradient(135deg, #cd7f32, #b8860b);
    color: white;
}

.monthly-ranking .name {
    flex: 1;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monthly-ranking a:hover .name {
    color: var(--primary-color);
}

.weekly-ranking,
.type-ranking {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

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

/* 只显示标题链接 */
.play-sidebar .weekly-ranking .pic-list li h3,
.play-sidebar .type-ranking .pic-list li h3,
.play-sidebar .weekly-ranking li h3,
.play-sidebar .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;
}

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

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

.play-sidebar .weekly-ranking .pic-list li h3 a:hover,
.play-sidebar .type-ranking .pic-list li h3 a:hover,
.play-sidebar .weekly-ranking li h3 a:hover,
.play-sidebar .type-ranking li h3 a:hover {
    color: var(--primary-color) !important;
}

.weekly-ranking *,
.type-ranking * {
    font-size: 14px;
}

/* ===== Player Section ===== */
.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);
}

.player-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.player-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    filter: blur(20px);
    transform: scale(1.1);
}

.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;
}

.play-btn:hover {
    transform: scale(1.1);
}

.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;
}

.play-sources-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 0;
}

.source-tab {
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: #666;
    transition: all 0.3s;
}

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

.source-tab.active {
    color: var(--primary-color);
}

.source-tab.active::after {
    width: 100%;
}

.play-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.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;
}

.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 ===== */
.news-section {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-card {
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-pic {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0f0f0;
}

.news-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-info {
    padding: 15px;
}

.news-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

/* News List Page */
.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;
}

.news-categories a {
    padding: 8px 20px;
    background: #f5f7fa;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
}

.news-categories a:hover,
.news-categories a.active {
    background: var(--primary-color);
    color: #fff;
}

.news-list-full {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

/* News Detail */
.news-detail-layout {
    display: flex;
    gap: 30px;
}

.news-article {
    flex: 1;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.news-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.news-header h1 {
    font-size: 28px;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #1a1a2e;
}

.news-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #999;
}

.category-tag {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 4px;
}

.news-cover {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
}

.news-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.news-content {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.news-content p {
    margin-bottom: 18px;
}

.news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.news-tags span {
    background: #f5f7fa;
    color: #999;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 13px;
}

.news-source {
    margin-top: 25px;
    padding: 15px;
    background: #f9f9fc;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
}

.news-source a {
    color: var(--primary-color);
}

/* News Sidebar */
.news-sidebar {
    width: 300px;
    flex-shrink: 0;
}

.sidebar-block {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.sidebar-block h3,
.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.news-list .news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-list .news-item:last-child {
    border-bottom: none;
}

.news-list .news-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.news-list .news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-list .news-title {
    font-size: 14px;
    margin-bottom: 5px;
}

.news-list .news-summary {
    display: none;
}

.news-list .news-meta {
    font-size: 12px;
}

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

    .news-list-full .news-thumb {
        width: 220px;
        height: 140px;
    }

    .news-list-full .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 */
.related-news-section {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-top: 30px;
}

.related-news-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* ===== Pagination ===== */
.pagination-wrapper {
    margin-top: 30px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

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

.pagination a:hover,
.pagination span.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.pagination .page-prev,
.pagination .page-next {
    padding: 8px 20px;
}

.pagination .page-ellipsis {
    background: none;
    border: none;
}

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

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

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

.footer-section p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.footer-links a:hover {
    background: var(--primary-color);
    color: #fff;
}

.partner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.partner-links a:hover {
    background: var(--primary-color);
    color: #fff;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 12px;
    color: #666;
}

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

img.loaded {
    opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }

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

    /* 1200px 断点：缩小海报避免挤压内容 */
    .movie-poster {
        width: 200px;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

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

    /* 1024px 断点：进一步缩小海报 */
    .movie-poster {
        width: 180px;
    }
}

@media (max-width: 768px) {
    header .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 .search-form {
        width: 90%;
    }

    .play-page-layout {
        flex-direction: column;
    }

    .play-sidebar {
        width: 100%;
    }

    .movie-detail {
        flex-direction: column;
        padding: 20px;
    }

    .movie-poster {
        width: 160px;
        margin: 0 auto;
    }

    .info-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .movie-info h1 {
        text-align: center;
        font-size: 24px;
    }

    .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.pic-list,
    [class~="movie-grid"] [class~="pic-list"] {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-column: 1 / -1 !important;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-detail-layout {
        flex-direction: column;
    }

    .news-sidebar {
        width: 100%;
    }

    .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.pic-list,
    [class~="movie-grid"] [class~="pic-list"] {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-column: 1 / -1 !important;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .play-list a {
        flex: 0 0 calc(25% - 9px);
        font-size: 12px;
    }

    section {
        padding: 15px;
    }

    section h2 {
        font-size: 18px;
    }

    .interaction-buttons {
        flex-wrap: wrap;
    }

    .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 ===== */
.sidebar-card .pic-img,
.monthly-ranking .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;
}

.sidebar-card .pic-img img,
.monthly-ranking .pic-img img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
