
:root {
    --primary: #fa4659;
    --bg-light: #f0fff3;
    --card-bg: #c6f1e7;
    --accent: #11cbd7;
    --white: #ffffff;
    --dark: #1a1a2e;
    --text: #2d3436;
    --text-light: #555;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 10px 36px rgba(0, 0, 0, 0.14);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 64px;
    --max-width: 1320px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-light);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* 顶部导航栏 */
.top-nav {
    width: 100%;
    height: var(--nav-height);
    background: var(--white);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    backdrop-filter: blur(10px);
}
.top-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.nav-brand .brand-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, var(--primary), #e8354a);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-brand .brand-icon::after {
    content: '▶';
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.nav-brand .brand-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.nav-brand .brand-text span { color: var(--primary); }
.nav-brand .brand-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-left: 2px;
    animation: dot-blink 1.8s infinite;
}
@keyframes dot-blink { 0%,100%{opacity:1;} 50%{opacity:0.25;} }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2px;
    margin-left: 32px;
    flex-shrink: 0;
}
.nav-links li a {
    display: block;
    padding: 8px 15px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    border-radius: 20px;
    transition: var(--transition);
    white-space: nowrap;
}
.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary);
    background: rgba(250,70,89,0.06);
}
.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: 3px; left: 50%;
    transform: translateX(-50%);
    width: 18px; height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.nav-search {
    margin-left: auto;
    margin-right: 18px;
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.nav-search input {
    width: 200px;
    padding: 9px 14px;
    border: 2px solid #e8ecf1;
    border-radius: 22px 0 0 22px;
    font-size: 13px;
    outline: none;
    background: #f9fafb;
    transition: var(--transition);
}
.nav-search input:focus {
    border-color: var(--accent);
    background: #fff;
    width: 240px;
    box-shadow: 0 0 0 4px rgba(17,203,215,0.08);
}
.nav-search button {
    padding: 9px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 0 22px 22px 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: var(--transition);
}
.nav-search button:hover {
    background: #e8354a;
    box-shadow: 0 4px 14px rgba(250,70,89,0.35);
}

.user-status {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 5px 12px 5px 5px;
    border-radius: 28px;
    transition: var(--transition);
    background: #f9fafb;
    border: 1px solid transparent;
    position: relative;
}
.user-status:hover {
    background: var(--card-bg);
    border-color: var(--accent);
}
.user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent);
    flex-shrink: 0;
    transition: var(--transition);
}
.user-status:hover .user-avatar {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(250,70,89,0.12);
}
.user-info { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 12px; color: var(--dark); white-space: nowrap; }
.user-tag { font-size: 10px; color: var(--primary); font-weight: 500; }
.login-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22c55e;
    position: absolute;
    bottom: 6px; left: 36px;
    border: 2px solid #fff;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{box-shadow:0 0 0 0 rgba(34,197,94,0.5);} 50%{box-shadow:0 0 0 7px rgba(34,197,94,0);} }

/* 主内容区 */
.main-content {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.hero-banner {
    margin-top: 20px;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 380px;
    box-shadow: var(--shadow);
    cursor: pointer;
    background: #e8ecf1;
}
.hero-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 7s ease;
}
.hero-banner:hover img { transform: scale(1.07); }
.hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px 32px 28px;
    background: linear-gradient(transparent, rgba(0,0,0,0.82));
    color: #fff;
    pointer-events: none;
}
.hero-overlay h2 {
    font-size: 32px; font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}
.hero-overlay p {
    font-size: 16px; opacity: 0.95;
    max-width: 600px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.hero-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 5px 14px;
    border-radius: 18px;
    font-size: 11px; font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    pointer-events: none;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 42px 0 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-size: 22px; font-weight: 700;
    color: var(--dark);
    display: flex; align-items: center; gap: 10px;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 5px; height: 26px;
    background: var(--primary);
    border-radius: 3px;
}
.section-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600; font-size: 13px;
    padding: 6px 12px;
    border-radius: 16px;
    transition: var(--transition);
    cursor: pointer;
}
.section-more:hover {
    color: var(--primary);
    background: rgba(250,70,89,0.05);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1100px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }

.movie-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}
.movie-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #e8ecf1;
}
.card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.movie-card:hover .card-img-wrap img { transform: scale(1.09); }
.card-rating {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.78);
    color: #ffc107;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 700; font-size: 12px;
    backdrop-filter: blur(4px);
    z-index: 2;
}
.card-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 {
    font-size: 15px; font-weight: 600;
    margin-bottom: 4px; color: var(--dark);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.card-meta { font-size: 12px; color: var(--text-light); margin-bottom: 6px; }
.card-desc {
    font-size: 12px; color: #666;
    line-height: 1.5; margin-bottom: 8px;
    overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    flex: 1;
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.card-tags span {
    padding: 3px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 500;
    background: var(--card-bg); color: #1a7a72;
}
.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0.7);
    width: 48px; height: 48px;
    background: rgba(250,70,89,0.9);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: var(--transition);
    pointer-events: none; z-index: 3;
}
.play-icon::after {
    content: '';
    border-left: 15px solid #fff;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    margin-left: 2px;
}
.movie-card:hover .play-icon { opacity: 1; transform: translate(-50%,-50%) scale(1); }

.two-col-layout { display: flex; gap: 24px; align-items: flex-start; }
.two-col-main { flex: 1; min-width: 0; }
.two-col-side { width: 340px; flex-shrink: 0; }
@media (max-width: 1100px) { .two-col-layout { flex-direction: column; } .two-col-side { width: 100%; } }

.weekly-rank {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: sticky; top: 84px;
}
.weekly-rank-header {
    background: linear-gradient(135deg, var(--primary), #e8354a);
    color: #fff;
    padding: 15px 20px;
    font-weight: 700; font-size: 16px;
    display: flex; align-items: center; gap: 8px;
}
.weekly-rank-list {
    list-style: none;
    padding: 6px 10px;
    max-height: 580px;
    overflow-y: auto;
}
.weekly-rank-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid #f5f5f5;
}
.weekly-rank-list li:last-child { border-bottom: none; }
.weekly-rank-list li:hover { background: var(--card-bg); }
.rank-number {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px;
    color: #fff; background: #b0b8c1;
    flex-shrink: 0;
}
.weekly-rank-list li:nth-child(1) .rank-number { background: #ff6b35; font-size:14px; animation: glow-rank 2s infinite; }
.weekly-rank-list li:nth-child(2) .rank-number { background: #f7a800; }
.weekly-rank-list li:nth-child(3) .rank-number { background: #e8890c; }
@keyframes glow-rank { 0%,100%{box-shadow:0 0 10px rgba(255,107,53,0.45);} 50%{box-shadow:0 0 20px rgba(255,107,53,0.75);} }
.rank-poster { width: 40px; height: 54px; border-radius: 5px; object-fit: cover; flex-shrink: 0; background: #e8ecf1; }
.rank-info { flex: 1; min-width: 0; }
.rank-title { font-weight: 600; font-size: 12px; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-sub { font-size: 10px; color: var(--text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-hot { font-size: 11px; color: var(--primary); font-weight: 600; flex-shrink: 0; }

/* 明星卡片 */
.star-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}
.star-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.star-img-wrap { width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #e8ecf1; }
.star-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.star-card:hover .star-img-wrap img { transform: scale(1.08); }
.star-body { padding: 16px 14px; }
.star-body h3 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.star-role { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.star-works { font-size: 12px; color: var(--text-light); line-height: 1.5; margin-bottom: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.star-bio { font-size: 11px; color: #666; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hot-star-tag { display: inline-block; background: var(--primary); color: #fff; padding: 2px 9px; border-radius: 10px; font-size: 10px; font-weight: 700; animation: tag-pulse 2s infinite; }
@keyframes tag-pulse { 0%,100%{opacity:1;} 50%{opacity:0.65;} }

/* 剧情列表 */
.plot-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 768px) { .plot-list { grid-template-columns: 1fr; } }
.plot-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border-left: 4px solid transparent;
    display: flex; gap: 16px; align-items: flex-start;
}
.plot-item:hover { border-left-color: var(--accent); box-shadow: var(--shadow-hover); transform: translateX(3px); }
.plot-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px;
    color: #1a7a72; flex-shrink: 0;
    transition: var(--transition);
}
.plot-item:hover .plot-num { background: var(--accent); color: #fff; }
.plot-content { flex: 1; min-width: 0; }
.plot-content h4 { font-size: 16px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.plot-content p { font-size: 13px; color: var(--text-light); line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.plot-img { width: 65px; height: 85px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #e8ecf1; }

/* 电影详细介绍 */
.detail-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex; flex-direction: column;
}
.detail-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.detail-img-wrap { aspect-ratio: 16/10; overflow: hidden; background: #e8ecf1; }
.detail-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.detail-card:hover .detail-img-wrap img { transform: scale(1.06); }
.detail-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.detail-body h3 { font-size: 17px; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
.detail-info { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--text-light); margin-bottom: 10px; }
.detail-info span { background: #f5f7fa; padding: 3px 9px; border-radius: 8px; white-space: nowrap; }
.detail-desc { font-size: 13px; color: #555; line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; flex: 1; margin-bottom: 12px; }
.detail-btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary);
    color: #fff;
    border-radius: 18px;
    font-size: 13px; font-weight: 600;
    cursor: pointer; border: none;
    transition: var(--transition);
    align-self: flex-start;
}
.detail-btn:hover { background: #e8354a; box-shadow: 0 4px 14px rgba(250,70,89,0.3); }

/* 评论区域 */
.comment-list { display: flex; flex-direction: column; gap: 14px; }
.comment-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: var(--transition);
    display: flex; gap: 14px;
    border: 1px solid #f0f2f5;
}
.comment-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.comment-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid var(--card-bg); background: #e8ecf1; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.comment-user { font-weight: 600; font-size: 14px; color: var(--dark); }
.comment-badge { font-size: 10px; background: var(--accent); color: #fff; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.comment-time { font-size: 11px; color: #aaa; margin-left: auto; flex-shrink: 0; }
.comment-stars { color: #ffc107; font-size: 12px; letter-spacing: 1px; margin-bottom: 6px; }
.comment-text { font-size: 13px; color: #555; line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; margin-bottom: 6px; }
.comment-movie { font-size: 11px; color: var(--accent); font-weight: 500; }

/* 底部导航 */
.bottom-nav {
    width: 100%;
    background: var(--dark);
    color: #ccc;
    margin-top: 50px;
    padding: 40px 0 30px;
}
.bottom-nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
@media (max-width: 768px) { .bottom-nav-inner { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .bottom-nav-inner { grid-template-columns: 1fr; } }
.bottom-col h4 {
    color: #fff; font-size: 15px; font-weight: 600;
    margin-bottom: 14px;
    position: relative; padding-bottom: 10px;
}
.bottom-col h4::after {
    content: '';
    position: absolute; bottom: 0; left: 0;
    width: 28px; height: 3px;
    background: var(--primary);
    border-radius: 2px;
}
.bottom-col ul { list-style: none; }
.bottom-col ul li { margin-bottom: 8px; }
.bottom-col ul li a {
    color: #aaa; text-decoration: none;
    font-size: 13px; transition: var(--transition);
}
.bottom-col ul li a:hover { color: var(--accent); padding-left: 4px; }
.bottom-copyright {
    text-align: center;
    padding: 20px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 24px;
    font-size: 12px; color: #888;
    max-width: var(--max-width);
    margin-left: auto; margin-right: auto;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f5f5f5; border-radius: 3px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(250,70,89,0.4);
    transition: var(--transition);
    font-size: 20px; font-weight: 700;
    opacity: 0; pointer-events: none;
    border: none;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: #e8354a; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(250,70,89,0.5); }

.toast {
    position: fixed; top: 20px; left: 50%;
    transform: translateX(-50%);
    background: #333; color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 9999;
    opacity: 0; transition: opacity 0.3s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.toast.show { opacity: 1; }
