/* ========== 全局变量与重置 ========== */
:root {
    --bg: #f5f1e8;
    --card: #faf7f1;
    --line: #e5ddd0;
    --text: #1d1d1d;
    --sub: #857967;
    --accent: #4da3ff;
    --gold: #a88452;
    --dark-bg: #0a0c14;
    --dark-card: #121620;
    --dark-text: #eef2ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    background-image: radial-gradient(rgba(0, 0, 0, .015) 1px, transparent 1px);
    background-size: 4px 4px;
}

/* ========== 容器布局 ========== */
.container {
    max-width: 1260px;
    margin: auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    padding: 0 20px;
}

.main-body {
    max-width: 1260px;
    margin: auto;
    padding: 0 20px;
}

.mainarea {
    max-width: 1260px;
    margin: auto;
    padding: 0 20px;
}

/* ========== 头部 ========== */
.site-header {
    background: #000;
    margin-bottom: 50px;
}

.header-inner {
    max-width: 1260px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 20px;
    color: #fff;
}

/* LOGO区域 */
.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.logo-wrap img {
    height: 60px;
}

.logo-mark {
    width: 26px;
    height: 26px;
    border: 2px solid #fff;
    position: relative;
}

.logo-mark::before {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1px solid var(--gold);
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo-sub {
    font-size: 11px;
    color: #999;
    letter-spacing: 3px;
    margin-top: 2px;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    padding: 0;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #f0f3fa;
    border-radius: 4px;
    transition: 0.2s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* 导航菜单 */
.header-nav {
    display: flex;
    gap: 34px;
}

.header-nav a {
    text-decoration: none;
    color: #999;
    font-size: 14px;
    transition: .25s;
}

.header-nav a:hover {
    color: #fff;
}

/* 搜索框 */
.search-box {
    width: 240px;
    height: 42px;
    background: #2b2b2b;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    border-radius: 20px;
}

.search-box svg {
    width: 16px;
    height: 16px;
    stroke: #8a7b68;
    stroke-width: 2;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: none;
    font-size: 14px;
    color: #fff;
}

.search-box input::placeholder {
    color: #9d907f;
}

/* ========== 侧边菜单 ========== */
.side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 80%;
    height: 100%;
    background: linear-gradient(145deg, #0c1020 0%, #090c16 100%);
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 8px 0 28px rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(245, 197, 66, 0.2);
    overflow-y: auto;
    padding: 24px 0 40px 0;
}

.side-menu.open {
    left: 0;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.menu-overlay.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.menu-header {
    padding: 0 24px 20px 24px;
    border-bottom: 1px solid rgba(245, 197, 66, 0.25);
    margin-bottom: 20px;
}

.menu-header h3 {
    color: #f5e7c8;
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 1px;
}

.menu-header p {
    color: #8f9bb3;
    font-size: 12px;
    margin-top: 8px;
}

.menu-nav {
    list-style: none;
    padding: 0;
}

.menu-nav li {
    margin: 0;
}

.menu-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    color: #eef2ff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.menu-nav a:hover {
    background: rgba(245, 197, 66, 0.12);
    border-left-color: #f5c542;
    color: #ffecb3;
}

.menu-nav svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

.menu-footer {
    margin-top: 48px;
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #6b7a93;
}

/* ========== 侧边栏 ========== */
.sidebar {
    position: sticky;
    top: 30px;
    height: fit-content;
}

.side-box {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 28px;
}

/* ========== 电影详情页 ========== */
.mini-title {
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--sub);
    margin-bottom: 14px;
    text-transform: uppercase;
}

.main-name {
    display: flex;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.exname {
    font-size: 1.5rem;
    color: var(--text);
}

.main-title {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 28px;
}

.main-name-title {
    font-size: 2rem;
}

.poster {
    overflow: hidden;
    margin-bottom: 26px;
}

.poster img {
    width: 100%;
    display: block;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.score-line {
    flex: 1;
    height: 2px;
    background: #ddd3c4;
    position: relative;
}

.score-line span {
    position: absolute;
    left: 0;
    top: 0;
    width: 82%;
    height: 100%;
    background: var(--gold);
}

.stars {
    position: relative;
    display: inline-block;
    color: #ddd3c4;
    letter-spacing: 2px;
    font-size: 1.4rem;
}

.stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 1.4rem;
    color: gold;
    letter-spacing: 2px;
}

.score {
    font-size: 2rem;
    font-weight: 700;
}

.meta {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 28px;
}

.meta-item {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.meta-label {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--sub);
    margin-bottom: 5px;
}

.meta-value {
    font-size: 15px;
    font-weight: 600;
}

/* 右侧内容 */
.content {
    min-width: 0;
}

/* 顶部导航选项卡 */
.top-nav {
    display: flex;
    gap: 42px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 55px;
    padding-bottom: 18px;
    flex-wrap: wrap;
}

.top-nav a {
    text-decoration: none;
    color: var(--sub);
    font-size: 15px;
    position: relative;
}

.top-nav a.active {
    color: var(--text);
    font-weight: 600;
}

.top-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -19px;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

/* 章节 */
.section {
    margin-bottom: 70px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 26px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
}

.section-title h1 {
    font-size: 1.2rem;
}

.section-en {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--sub);
    margin-top: 8px;
}

.section-en-l {
    font-size: 1rem;
}

.genre-link {
    color: var(--text);
    text-decoration: none;
}

/* 剧情简介 */
.story {
    max-width: 980px;
    font-size: 15px;
    color: #4b4338;
    text-align: justify;
    columns: 2;
    column-gap: 55px;
}

/* ========== 网格布局统一 ========== */
.item-grid,
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 26px;
}

.ex-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* 电影卡片 */
.movie-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.movie-cover {
    position: relative;
    overflow: hidden;
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    transition: transform 0.3s;
}

.movie-card:hover .movie-cover img {
    transform: scale(1.05);
}

.movie-title {
    padding: 12px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-title span:first-child {
    font-size: 1rem;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    font-weight: 700;
}

.movie-year {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
}

.movie-rating {
    padding: 0 12px 12px;
    font-size: 13px;
    color: #ff6600;
}

.movie-sub {
    padding: 0px 12px 12px 12px;
    font-size: 12px;
    color: var(--sub);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.c-link {
    text-decoration: none;
    color: var(--text);
}

/* 人物卡片 */
.person-card {
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s;
}

.person-card:hover {
    transform: translateY(-5px);
}

.person-avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
}

.person-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-name {
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 4px;
}

.person-name-english {
    font-size: 12px;
    color: #999;
}

.person-meta {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.person-views {
    font-size: 11px;
    color: #ff6600;
    margin-top: 4px;
}

/* 演员卡片 */
.cast-card {
    transition: .25s;
}

.cast-card:hover {
    transform: translateY(-4px);
}

.cast-photo {
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    background: #ddd;
}

.cast-photo img {
    width: 100%;
    aspect-ratio: 1/1.18;
    object-fit: cover;
    display: block;
}

.cast-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sub);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cast-role {
    font-size: 12px;
    color: var(--sub);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========== 影人殿堂 ========== */
.people-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
}

/* ========== 筛选栏 ========== */
.filter-bar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.filter-group select {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 30px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    outline: none;
}

.filter-group select:hover {
    border-color: #ff6600;
}

.result-count {
    font-size: 14px;
    color: #666;
}

/* 排序栏 */
.sort-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-options a {
    padding: 6px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
    transition: all 0.2s;
}

.sort-options a:hover,
.sort-options a.active {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

/* 选项卡 */
.movie-tabs {
    display: flex;
    gap: 4px;
    background: #f5f5f5;
    padding: 6px;
    border-radius: 50px;
    margin-bottom: 24px;
    width: fit-content;
    flex-wrap: wrap;
}

.movie-tabs .tab {
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.movie-tabs .tab:hover {
    background: rgba(0, 0, 0, 0.05);
}

.movie-tabs .tab.active {
    background: #ff6600;
    color: white;
}

/* 地区选项卡 */
.country-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.country-tab {
    padding: 6px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 30px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
    transition: all 0.2s;
}

.country-tab:hover,
.country-tab.active {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

/* ========== 预告片 ========== */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
    flex-wrap: wrap;
}
.pg strong,
.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    background: #333;
    color: var(--card);
    font-weight: 700;
}
.pg strong{
     background: red;
}
.pagination a:hover {
    background: #ff6600;
    border-color: #ff6600;
    color: white;
}

.pagination .current {
    background: #ff6600;
    border-color: #ff6600;
    color: white;
}

.pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ========== 页脚 ========== */
.site-footer {
    margin-top: 50px;
    border-top: 1px solid var(--line);
    padding-top: 40px;
    padding-bottom: 30px;
    background: #000;
}

.footer-inner {
    max-width: 1260px;
    margin: auto;
    padding: 0 20px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: #fff;
}

.footer-desc {
    font-size: 14px;
    color: #999;
    max-width: 420px;
    line-height: 1.9;
}

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

.footer-links a {
    text-decoration: none;
    color: #999;
    font-size: 14px;
    transition: .25s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 25px;
    border-top: 1px solid #333;
    font-size: 12px;
    letter-spacing: 1px;
    color: #999;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 6px;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border-radius: 8px;
    transition: .2s;
    text-decoration: none;
    color: #999;
}

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

/* ========== 响应式 ========== */
@media (max-width: 1260px) {
    .container,
    .main-body,
    .mainarea,
    .header-inner,
    .footer-inner {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 1100px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        top: auto;
    }

    .story {
        columns: 1;
    }
}

@media (max-width: 980px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 22px;
    }

    .header-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .search-box {
        width: 100%;
    }

    .footer-top {
        flex-direction: column;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .site-header {
        margin-bottom: 30px;
    }

    body {
        padding: 0;
    }

    .container {
        gap: 28px;
    }

    .side-box {
        padding: 22px;
    }

    .main-title {
        font-size: 1.2rem;
    }

    .main-name-title {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .top-nav {
        gap: 24px;
        overflow-x: auto;
    }

    .top-nav a.active::after {
        bottom: -12px;
    }

    .item-grid,
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }

    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 16px;
    }

    .person-avatar {
        width: 100px;
        height: 100px;
    }

    .person-name {
        font-size: 14px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: space-between;
    }

    .sort-bar {
        flex-wrap: wrap;
        justify-content: center;
    }

    .movie-tabs {
        width: 100%;
        justify-content: center;
    }

    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 14px;
    }

    .logo-sub {
        font-size: 9px;
    }

    .logo-mark {
        width: 20px;
        height: 20px;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .item-grid,
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }

    .people-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .movie-title span:first-child {
        font-size: .9rem;
    }

    .movie-year {
        font-size: 10px;
    }

    .movie-rating {
        font-size: .8rem;
    }

    .person-avatar {
        width: 80px;
        height: 80px;
    }
}