:root {
    --bg: #f6f8fb;
    --surface: #ffffff;
    --surface-soft: #eef8fb;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #0f9fa8;
    --primary-dark: #0f766e;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --danger: #ef4444;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--cyan));
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.28);
}

.brand-text {
    display: grid;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 23px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    position: relative;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #eef2f7;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: #0f172a;
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e 0%, #0f9fa8 48%, #06b6d4 100%);
}

.hero-carousel::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 26%), radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.24), transparent 26%), radial-gradient(circle at 40% 90%, rgba(255, 255, 255, 0.18), transparent 30%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.6), rgba(15, 118, 110, 0.12));
}

.hero-container {
    position: relative;
    min-height: 650px;
    display: grid;
    align-items: center;
    padding: 70px 0 78px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 440px);
    align-items: center;
    gap: 54px;
}

.hero-slide.active {
    display: grid;
    animation: heroFade 0.55s ease both;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-dark);
    background: rgba(15, 159, 168, 0.12);
    border: 1px solid rgba(15, 159, 168, 0.22);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.hero-carousel .eyebrow,
.dark-rank .eyebrow,
.detail-hero .eyebrow {
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}

.hero-copy h1 {
    margin: 24px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    color: #0f766e;
    background: #e6fffb;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-actions,
.center-action {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-dark), var(--cyan));
    box-shadow: 0 15px 32px rgba(6, 182, 212, 0.28);
}

.hero-carousel .btn-primary {
    color: var(--primary-dark);
    background: #ffffff;
}

.btn-ghost {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.72);
}

.btn-line {
    color: var(--primary-dark);
    border: 1px solid rgba(15, 159, 168, 0.32);
    background: #ffffff;
}

.hero-art {
    position: relative;
    isolation: isolate;
}

.hero-art::before,
.hero-art::after {
    content: "";
    position: absolute;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.16);
    inset: 22px -18px -18px 22px;
    z-index: -1;
}

.hero-art::after {
    inset: -18px 36px 36px -18px;
    background: rgba(255, 255, 255, 0.09);
}

.hero-art img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 34px;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.35);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.44);
    cursor: pointer;
}

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.stat-strip {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 26px;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-grid div {
    display: grid;
    gap: 4px;
    padding: 8px 14px;
    text-align: center;
}

.stat-grid strong {
    font-size: 26px;
}

.stat-grid span {
    color: var(--muted);
}

.section-block {
    padding: 76px 0;
}

.soft-bg {
    background: linear-gradient(180deg, #f8fafc, #ecfeff);
}

.section-head {
    margin-bottom: 34px;
}

.section-head.center {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 14px 0 10px;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head h2,
.page-hero h1 {
    font-size: clamp(32px, 4vw, 48px);
}

.section-head p,
.page-hero p {
    color: var(--muted);
    margin: 0;
}

.section-head.light h2,
.section-head.light p,
.dark-rank .section-head h2,
.dark-rank .section-head p {
    color: #ffffff;
}

.text-link,
.link-arrow {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 270px;
    overflow: hidden;
    padding: 22px;
    color: #ffffff;
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.18);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.45s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.88));
}

.category-card strong,
.category-card p,
.category-card .link-arrow {
    position: relative;
    z-index: 1;
}

.category-card strong {
    display: block;
    margin-top: 92px;
    font-size: 22px;
}

.category-card p {
    color: rgba(255, 255, 255, 0.84);
    min-height: 72px;
    margin: 10px 0 18px;
    font-size: 14px;
}

.category-card .link-arrow {
    color: #a7f3d0;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.full-grid {
    grid-template-columns: repeat(5, 1fr);
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.42);
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.14);
}

.poster-box {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.poster-box img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-box img {
    transform: scale(1.07);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 4px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    right: 12px;
    left: auto;
    background: var(--danger);
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--primary-dark);
}

.card-body p {
    min-height: 52px;
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 11px;
    margin-bottom: 13px;
    color: #475569;
    font-size: 13px;
}

.card-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 10px;
    color: #94a3b8;
}

.compact-card .card-body h3 {
    font-size: 17px;
}

.compact-card .card-body p {
    min-height: 46px;
}

.dark-rank {
    background: linear-gradient(135deg, #0f172a, #164e63 55%, #0f766e);
}

.rank-grid .movie-card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.rank-grid .card-body p,
.rank-grid .card-meta {
    color: rgba(255, 255, 255, 0.76);
}

.rank-grid .tag-row span {
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.1);
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e, #0891b2);
}

.page-hero-inner {
    padding: 86px 0;
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}

.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.search-panel {
    margin-bottom: 28px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.search-box {
    display: grid;
    gap: 9px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.13);
}

.empty-state {
    display: none;
    margin: 26px 0 0;
    padding: 22px;
    color: var(--muted);
    text-align: center;
    border-radius: var(--radius);
    background: #ffffff;
}

.empty-state.show {
    display: block;
}

.category-overview {
    display: grid;
    gap: 22px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.category-cover {
    overflow: hidden;
    border-radius: 18px;
}

.category-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.category-overview-card h2 {
    margin: 4px 0 8px;
}

.category-overview-card p {
    color: var(--muted);
    margin: 0 0 14px;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.mini-links a {
    padding: 5px 10px;
    color: var(--primary-dark);
    background: #ecfeff;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.rank-board {
    display: grid;
    gap: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 54px 1fr 190px 110px;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(6, 182, 212, 0.48);
}

.rank-row span {
    color: var(--danger);
    font-weight: 900;
}

.rank-row em {
    color: var(--muted);
    font-style: normal;
}

.rank-row b {
    color: var(--primary-dark);
}

.detail-hero {
    padding: 46px 0 68px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #115e59 62%, #0891b2);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(310px, 0.65fr);
    gap: 30px;
    align-items: center;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.42);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: #020617;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.52));
}

.player-cover.is-hidden {
    display: none;
}

.play-button {
    position: relative;
    z-index: 1;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    background: #ffffff;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease;
}

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

.play-button span {
    margin-left: 4px;
    font-size: 32px;
}

.detail-info h1 {
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 20px 0;
}

.detail-meta span {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 14px;
}

.detail-tags {
    margin-bottom: 24px;
}

.detail-content article {
    max-width: 900px;
    margin: 0 auto;
    padding: 38px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.detail-content p {
    color: #334155;
    font-size: 17px;
}

.site-footer {
    padding: 42px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.footer-grid p {
    max-width: 620px;
    margin: 10px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-weight: 700;
}

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

@keyframes heroFade {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .category-grid,
    .full-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

    .hero-slide,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-art {
        max-width: 360px;
        margin: 0 auto;
    }
}

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

    .header-inner {
        min-height: 66px;
    }

    .main-nav {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        display: none;
        padding: 14px 22px 22px;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        background: #ffffff;
        border-bottom: 1px solid var(--line);
    }

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

    .menu-toggle {
        display: block;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .hero-container {
        min-height: auto;
        padding: 46px 0 70px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-art {
        max-width: 270px;
    }

    .stat-strip {
        margin-top: 0;
    }

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

    .section-block {
        padding: 54px 0;
    }

    .section-head.split,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-grid,
    .movie-grid,
    .full-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .category-card {
        min-height: 230px;
    }

    .card-body {
        padding: 14px;
    }

    .card-body h3 {
        font-size: 16px;
    }

    .card-body p {
        font-size: 13px;
        min-height: 44px;
    }

    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

    .rank-row em,
    .rank-row b {
        grid-column: 2;
    }

    .detail-hero {
        padding: 30px 0 48px;
    }

    .play-button {
        width: 68px;
        height: 68px;
    }

    .detail-content article {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .category-grid,
    .movie-grid,
    .full-grid {
        grid-template-columns: 1fr;
    }
}
