
:root {
    --bg-light: #dbedf3;
    --primary: #00818a;
    --secondary: #404b69;
    --dark: #283149;
    --white: #ffffff;
    --text-dark: #1a1a2e;
    --text-gray: #5a5a7a;
    --text-light: #c5c5d9;
    --card-shadow: 0 4px 20px rgba(40, 49, 73, 0.10);
    --card-hover-shadow: 0 12px 32px rgba(40, 49, 73, 0.18);
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --section-gap: 36px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

.top-nav {
    width: 100%;
    background-color: var(--dark);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(40, 49, 73, 0.25);
    min-height: 60px;
}

.top-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 20px;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-shrink: 0;
}

.top-nav-left h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--white);
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--transition);
    margin: 0;
    line-height: 1;
}
.top-nav-left h1:hover {
    color: #4ecdc4;
}
.top-nav-left h1 .accent {
    color: #4ecdc4;
    font-weight: 800;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
}

.nav-links li a {
    color: #c5c5d9;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    display: block;
}
.nav-links li a:hover,
.nav-links li a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.10);
}
.nav-links li a.active {
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 7px 14px;
    gap: 8px;
    transition: all var(--transition);
    border: 1px solid transparent;
}
.search-box:focus-within {
    background-color: rgba(255, 255, 255, 0.20);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 129, 138, 0.15);
}
.search-box input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
    width: 140px;
}
.search-box input::placeholder {
    color: #999;
    opacity: 0.8;
}
.search-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
    cursor: pointer;
}

.user-status {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 22px;
    background-color: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    white-space: nowrap;
    border: none;
}
.user-status:hover {
    background-color: #006d75;
    box-shadow: 0 4px 14px rgba(0, 129, 138, 0.35);
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 20px 20px;
    display: flex;
    gap: 28px;
    flex: 1;
}

.content-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--section-gap);
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 88px;
    align-self: flex-start;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.sidebar-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px 18px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e8edf2;
}
.sidebar-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
    letter-spacing: 0.5px;
}
.sidebar-card .card-title-row {
    border-bottom: 1px solid #eef2f7;
    margin-bottom: 16px;
}

.rank-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rank-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    background: #fafcfd;
}
.rank-list li:hover {
    background: #f0f6f9;
    transform: translateX(3px);
}
.rank-num {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    color: #fff;
}
.rank-num.top1 { background: #e74c3c; font-size: 0.9rem; }
.rank-num.top2 { background: #e67e22; }
.rank-num.top3 { background: #f39c12; }
.rank-num.normal { background: #95a5a6; font-size: 0.8rem; }
.rank-info { flex: 1; min-width: 0; }
.rank-info .rank-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rank-info .rank-meta { font-size: 0.75rem; color: var(--text-gray); }
.rank-change { font-size: 0.78rem; font-weight: 600; flex-shrink: 0; }
.rank-change.up { color: #e74c3c; }
.rank-change.down { color: #27ae60; }
.rank-change.new { color: var(--primary); }

.sidebar-stars { display: flex; flex-direction: column; gap: 12px; }
.sidebar-star-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    background: #fafcfd;
}
.sidebar-star-item:hover { background: #f0f6f9; transform: translateX(3px); }
.sidebar-star-item img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #e0e5ea;
}
.sidebar-star-info { flex: 1; min-width: 0; }
.sidebar-star-info .ss-name { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
.sidebar-star-info .ss-role { font-size: 0.75rem; color: var(--text-gray); }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 14px;
}
.section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--primary);
    border-radius: 2px;
}
.section-header .more-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    padding: 6px 12px;
    border-radius: 16px;
}
.section-header .more-link:hover {
    background: rgba(0, 129, 138, 0.08);
    color: #005f66;
}

.hot-movies-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.movie-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
}
.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-hover-shadow);
    border-color: #d0dde6;
}
.movie-card .poster-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e8edf2;
}
.movie-card .poster-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}
.movie-card:hover .poster-wrap img { transform: scale(1.06); }
.movie-card .badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
}
.movie-card .rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(40, 49, 73, 0.82);
    color: #ffc107;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
    letter-spacing: 0.3px;
}
.movie-card .card-info {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.movie-card .card-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.movie-card .card-info .meta { font-size: 0.78rem; color: var(--text-gray); display: flex; gap: 10px; align-items: center; }
.movie-card .card-info .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.movie-card .card-info .tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 3px;
    background: #eef5f8;
    color: var(--secondary);
    font-weight: 500;
}

.stars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.star-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    text-align: center;
    padding: 22px 16px 18px;
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid #eef2f7;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.star-card:hover { transform: translateY(-5px); box-shadow: var(--card-hover-shadow); }
.star-card img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e8edf2;
    transition: all var(--transition);
    flex-shrink: 0;
    display: block;
}
.star-card:hover img { border-color: var(--primary); box-shadow: 0 0 0 6px rgba(0, 129, 138, 0.08); }
.star-card h3 { font-size: 1rem; font-weight: 600; margin-top: 12px; color: var(--text-dark); }
.star-card .star-role { font-size: 0.8rem; color: var(--primary); font-weight: 500; margin-top: 2px; }
.star-card .star-desc {
    font-size: 0.78rem;
    color: var(--text-gray);
    margin-top: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.plot-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 0;
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid #eef2f7;
    min-height: 150px;
}
.plot-card:hover { transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.plot-card img { width: 160px; height: auto; object-fit: cover; flex-shrink: 0; display: block; min-height: 150px; background: #e8edf2; }
.plot-card .plot-info { padding: 16px 18px; display: flex; flex-direction: column; justify-content: center; gap: 6px; flex: 1; min-width: 0; }
.plot-card .plot-info h3 { font-size: 1rem; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.plot-card .plot-info .plot-tag { font-size: 0.72rem; color: var(--primary); font-weight: 600; letter-spacing: 0.5px; }
.plot-card .plot-info p {
    font-size: 0.83rem;
    color: var(--text-gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.detail-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 0;
    transition: all var(--transition);
    cursor: pointer;
    border: 1px solid #eef2f7;
}
.detail-card:hover { transform: translateY(-4px); box-shadow: var(--card-hover-shadow); }
.detail-card img { width: 140px; height: auto; object-fit: cover; flex-shrink: 0; display: block; min-height: 190px; background: #e8edf2; }
.detail-card .detail-info { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.detail-card .detail-info h3 { font-size: 1.05rem; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.detail-card .detail-info .detail-meta { font-size: 0.78rem; color: var(--text-gray); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.detail-card .detail-info .detail-meta span { background: #f0f5f8; padding: 3px 8px; border-radius: 4px; font-weight: 500; font-size: 0.73rem; }
.detail-card .detail-info p {
    font-size: 0.82rem;
    color: var(--text-gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.detail-card .detail-info .detail-rating { font-weight: 700; color: #e67e22; font-size: 0.9rem; }

.comments-list { display: flex; flex-direction: column; gap: 16px; }
.comment-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 18px 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 14px;
    transition: all var(--transition);
    border: 1px solid #eef2f7;
}
.comment-item:hover { box-shadow: var(--card-hover-shadow); border-color: #d8e2ea; }
.comment-item img.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #eef2f7;
    display: block;
}
.comment-body { flex: 1; min-width: 0; }
.comment-body .comment-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.comment-body .comment-user { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); }
.comment-body .comment-time { font-size: 0.75rem; color: #999; }
.comment-body .comment-rating { font-weight: 700; color: #e67e22; font-size: 0.85rem; letter-spacing: 0.5px; }
.comment-body .comment-text { font-size: 0.88rem; color: #4a4a5e; line-height: 1.6; }
.comment-body .comment-movie { font-size: 0.75rem; color: var(--primary); font-weight: 500; margin-bottom: 4px; }

.bottom-nav {
    width: 100%;
    background-color: var(--dark);
    color: #c5c5d9;
    padding: 32px 0 20px;
    margin-top: 20px;
}
.bottom-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 28px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}
.bottom-col h4 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 14px; letter-spacing: 0.5px; }
.bottom-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.bottom-col ul li a { color: #a0a5b8; text-decoration: none; font-size: 0.85rem; transition: color var(--transition); }
.bottom-col ul li a:hover { color: #fff; }
.bottom-copyright {
    max-width: 1400px;
    margin: 20px auto 0;
    padding: 16px 28px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    text-align: center;
    font-size: 0.8rem;
    color: #888;
}

@media (max-width: 1200px) {
    .hot-movies-grid { grid-template-columns: repeat(3, 1fr); }
    .sidebar { width: 270px; }
    .stars-grid { grid-template-columns: repeat(3, 1fr); }
    .plot-grid, .detail-grid { grid-template-columns: 1fr; }
    .bottom-nav-inner { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .main-wrapper { flex-direction: column; }
    .sidebar { width: 100%; position: static; max-height: none; order: -1; }
    .hot-movies-grid { grid-template-columns: repeat(2, 1fr); }
    .stars-grid { grid-template-columns: repeat(2, 1fr); }
    .top-nav-inner { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
    .nav-links { order: 3; width: 100%; justify-content: center; gap: 2px; }
    .nav-links li a { font-size: 0.8rem; padding: 6px 10px; }
    .plot-card { flex-direction: column; }
    .plot-card img { width: 100%; height: 160px; min-height: auto; }
    .detail-card { flex-direction: column; }
    .detail-card img { width: 100%; height: 180px; min-height: auto; }
    .bottom-nav-inner { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 560px) {
    .hot-movies-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stars-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .plot-grid, .detail-grid { grid-template-columns: 1fr; }
    .bottom-nav-inner { grid-template-columns: 1fr; gap: 16px; }
    .top-nav-left h1 { font-size: 1.3rem; }
    .search-box input { width: 90px; }
}
