:root {
    --brand: #00A3AF;
    --brand-dark: #008C97;
    --brand-light: #E6F7F8;
    --ink: #102126;
    --muted: #667085;
    --line: #E5EEF0;
    --paper: #FFFFFF;
    --soft: #F4FAFB;
    --dark: #061114;
    --gold: #F2B84B;
    --shadow: 0 20px 50px rgba(16, 33, 38, 0.12);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #F7FBFC 0%, #FFFFFF 38%, #F2FAFB 100%);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(0, 163, 175, 0.12);
    backdrop-filter: blur(16px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.logo-dot {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: radial-gradient(circle at 30% 25%, #67E8F9 0%, var(--brand) 50%, #075985 100%);
    box-shadow: 0 14px 30px rgba(0, 163, 175, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #344054;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--brand-dark);
    background: var(--brand-light);
    transform: translateY(-1px);
}

.nav-toggle {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--brand-light);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 10px;
    background: var(--brand-dark);
}

.hero {
    position: relative;
    min-height: 650px;
    color: #FFFFFF;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, rgba(0, 163, 175, 0.55), transparent 36%), linear-gradient(135deg, #041216 0%, #063942 52%, #020617 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 8, 12, 0.94) 0%, rgba(2, 8, 12, 0.62) 48%, rgba(2, 8, 12, 0.16) 100%);
    z-index: 2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, #F7FBFC);
    z-index: 3;
}

.hero-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(1.08) contrast(1.06);
}

.hero-inner {
    position: relative;
    z-index: 4;
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 82px 0 104px;
}

.hero-copy {
    max-width: 720px;
}

.hero-eyebrow,
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #A7F3F8;
    background: rgba(0, 163, 175, 0.18);
    border: 1px solid rgba(103, 232, 249, 0.22);
    font-weight: 800;
    letter-spacing: 0.06em;
}

.hero h1 {
    margin: 22px 0 18px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-lead {
    max-width: 680px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.9;
}

.hero-tags,
.tag-row,
.movie-meta,
.detail-meta,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.breadcrumbs a,
.breadcrumbs span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #FFFFFF;
    background: var(--brand);
    box-shadow: 0 16px 36px rgba(0, 163, 175, 0.34);
}

.btn-primary:hover {
    background: var(--brand-dark);
    transform: translateY(-2px);
}

.btn-ghost {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.hero-panel {
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.hero-list {
    display: grid;
    gap: 12px;
}

.hero-list a {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-list a:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.hero-list img {
    width: 72px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
}

.hero-list strong,
.compact-card strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.hero-list em,
.compact-card em {
    color: rgba(255, 255, 255, 0.66);
    font-size: 13px;
    font-style: normal;
}

.hero-dots {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.hero-dots button {
    width: 28px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dots button.is-active {
    width: 44px;
    background: var(--brand);
}

main {
    position: relative;
    z-index: 5;
}

.section {
    padding: 78px 0;
}

.section-tight {
    padding: 48px 0;
}

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

.section-head h2,
.page-head h1,
.detail-title h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-head p,
.category-card p,
.movie-card p,
.detail-copy p {
    color: var(--muted);
    line-height: 1.8;
}

.page-head {
    padding: 62px 0 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    min-height: 190px;
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient(135deg, #FFFFFF 0%, #ECFEFF 100%);
    border: 1px solid rgba(0, 163, 175, 0.12);
    box-shadow: 0 12px 32px rgba(16, 33, 38, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.category-card .arrow {
    display: inline-flex;
    margin-top: 14px;
    color: var(--brand-dark);
    font-weight: 900;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.movie-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    border-radius: 24px;
    background: #FFFFFF;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(16, 33, 38, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0F363D, #00A3AF);
}

.movie-cover-wide {
    width: 180px;
    flex: 0 0 180px;
    aspect-ratio: 3 / 4;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.movie-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.78) 100%);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    width: 52px;
    height: 52px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #FFFFFF;
    background: var(--brand);
    box-shadow: 0 12px 30px rgba(0, 163, 175, 0.4);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark,
.compact-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.score-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    min-width: 42px;
    padding: 5px 8px;
    border-radius: 12px;
    color: #4A2E00;
    background: var(--gold);
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.movie-card-body {
    padding: 15px;
}

.movie-title {
    display: block;
    color: var(--ink);
    font-weight: 900;
    line-height: 1.4;
    min-height: 44px;
}

.movie-title:hover {
    color: var(--brand-dark);
}

.movie-card p {
    display: -webkit-box;
    margin: 8px 0 12px;
    min-height: 50px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.movie-meta {
    gap: 6px;
    color: #667085;
    font-size: 13px;
}

.movie-meta span {
    padding: 4px 8px;
    border-radius: 99px;
    background: #F2F4F7;
}

.movie-card-wide {
    display: flex;
}

.movie-card-wide .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

.movie-card-wide .movie-title {
    min-height: auto;
    font-size: 20px;
}

.tag-row span {
    color: var(--brand-dark);
    background: var(--brand-light);
}

.rank-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.rank-list {
    display: grid;
    gap: 12px;
}

.rank-row {
    display: grid;
    grid-template-columns: 58px 72px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(0, 163, 175, 0.42);
}

.rank-number {
    color: var(--brand-dark);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 72px;
    height: 96px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-info strong {
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.rank-score {
    padding: 8px 12px;
    border-radius: 14px;
    color: #4A2E00;
    background: #FFF3D0;
    font-weight: 900;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 20px;
    border-radius: 28px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(16, 33, 38, 0.08);
}

.side-panel h2,
.side-panel h3 {
    margin-top: 0;
}

.compact-list {
    display: grid;
    gap: 12px;
}

.compact-card {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: #F8FBFC;
    border: 1px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    border-color: rgba(0, 163, 175, 0.34);
    transform: translateY(-2px);
}

.compact-card img {
    width: 68px;
    height: 90px;
    border-radius: 13px;
    object-fit: cover;
}

.compact-card em {
    color: var(--muted);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px 150px;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 24px;
    background: #FFFFFF;
    box-shadow: 0 12px 32px rgba(16, 33, 38, 0.08);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--ink);
    background: #FFFFFF;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(0, 163, 175, 0.12);
}

.empty-filter {
    display: none;
    padding: 30px;
    border-radius: 24px;
    color: var(--muted);
    background: #FFFFFF;
    text-align: center;
}

.empty-filter.is-visible {
    display: block;
}

.detail-hero {
    padding: 54px 0 38px;
    color: #FFFFFF;
    background: radial-gradient(circle at 82% 10%, rgba(0, 163, 175, 0.48), transparent 30%), linear-gradient(135deg, #061114, #0D3D45 52%, #020617);
}

.detail-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.breadcrumbs {
    margin-bottom: 18px;
}

.breadcrumbs a,
.breadcrumbs span {
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.12);
}

.detail-title h1 {
    color: #FFFFFF;
    font-size: clamp(34px, 5vw, 62px);
}

.detail-lead {
    max-width: 860px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.85;
}

.detail-meta span {
    color: rgba(255, 255, 255, 0.9);
}

.player-section {
    padding: 56px 0;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background: #020617;
    box-shadow: 0 28px 76px rgba(2, 6, 23, 0.32);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-overlay-button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
    color: #FFFFFF;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay-button.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.big-play {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 20px 48px rgba(0, 163, 175, 0.42);
    font-size: 32px;
    transform: scale(1);
    transition: transform 0.2s ease;
}

.play-overlay-button:hover .big-play {
    transform: scale(1.08);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
}

.detail-copy {
    padding: 28px;
    border-radius: 28px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(16, 33, 38, 0.08);
}

.detail-copy h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-copy p {
    margin: 0 0 20px;
}

.detail-copy p:last-child {
    margin-bottom: 0;
}

.pagination-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
}

.pagination-links a {
    flex: 1;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 18px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    color: var(--brand-dark);
    font-weight: 900;
}

.pagination-links a:hover {
    border-color: rgba(0, 163, 175, 0.42);
    background: var(--brand-light);
}

@media (max-width: 1080px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-inner,
    .rank-wrap,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-panel,
    .side-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .header-inner {
        height: 64px;
    }

    .main-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 22px;
        background: #FFFFFF;
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 62px 0 76px;
    }

    .hero-panel {
        display: none;
    }

    .movie-grid,
    .movie-list-grid,
    .category-grid,
    .detail-grid,
    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

    .filter-bar input {
        grid-column: 1 / -1;
    }

    .rank-row {
        grid-template-columns: 42px 60px 1fr;
    }

    .rank-row img {
        width: 60px;
        height: 80px;
    }

    .rank-score {
        grid-column: 3;
        width: max-content;
    }

    .detail-grid {
        align-items: start;
    }

    .detail-poster {
        max-width: 260px;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .logo strong {
        font-size: 18px;
    }

    .movie-grid,
    .movie-list-grid,
    .category-grid,
    .detail-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }

    .movie-card-wide {
        display: block;
    }

    .movie-cover-wide {
        width: 100%;
    }

    .rank-row {
        grid-template-columns: 34px 56px 1fr;
        gap: 10px;
    }

    .hero-actions,
    .section-actions,
    .pagination-links {
        flex-direction: column;
    }
}
