:root {
    --bg: #f7fbfc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #dbeafe;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --blue: #2563eb;
    --gold: #d97706;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(13, 148, 136, 0.16);
    backdrop-filter: blur(18px);
    box-shadow: 0 6px 25px rgba(13, 148, 136, 0.08);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--teal);
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    border-radius: 999px;
    box-shadow: 0 0 28px rgba(13, 148, 136, 0.36);
}

.desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px;
    color: #334155;
}

.desktop-nav a,
.mobile-nav a {
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--teal);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.header-search input,
.mobile-nav input,
.search-hero-form input,
.toolbar input,
.toolbar select {
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
}

.header-search input {
    width: 210px;
    padding: 8px 6px 8px 12px;
}

.header-search button,
.mobile-nav button,
.search-hero-form button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    border-radius: 999px;
    padding: 8px 15px;
    cursor: pointer;
}

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

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

.mobile-nav {
    display: none;
    padding: 14px 16px 18px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

.mobile-nav.is-open {
    display: grid;
    gap: 10px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
}

.mobile-nav form {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 16px;
}

.mobile-nav input {
    flex: 1;
    min-width: 0;
    padding: 8px;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-mask {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-mask {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(13, 148, 136, 0.16) 100%);
}

.hero-content {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #14b8a6;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h1 + .hero-title {
    margin-top: -6px;
}

.hero-title {
    color: #ccfbf1;
    font-size: clamp(28px, 4vw, 48px) !important;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 22px;
    color: rgba(241, 245, 249, 0.92);
    font-size: 20px;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.corner-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    color: #ecfeff;
    background: rgba(15, 118, 110, 0.42);
    border: 1px solid rgba(94, 234, 212, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-actions,
.small-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-btn,
.glass-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    padding: 13px 24px;
    box-shadow: 0 16px 36px rgba(13, 148, 136, 0.26);
}

.glass-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    padding: 12px 22px;
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.glass-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

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

.hero-dots button.is-active {
    width: 54px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
}

.section {
    padding: 72px 0;
}

.section.tinted {
    background: linear-gradient(135deg, rgba(204, 251, 241, 0.48), rgba(219, 234, 254, 0.58));
}

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

.section-head h2,
.rank-panel-head h2,
.detail-article h2,
.detail-side h2 {
    margin: 8px 0 0;
    color: var(--ink);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.2;
}

.compact-head {
    margin-bottom: 22px;
}

.section-more {
    color: var(--teal-dark);
    background: #fff;
    border: 1px solid rgba(13, 148, 136, 0.18);
    padding: 10px 18px;
    box-shadow: var(--soft-shadow);
}

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

.movie-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.movie-card {
    min-width: 0;
}

.card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(13, 148, 136, 0.12);
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(13, 148, 136, 0.38);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0d9488);
}

.poster-wrap img,
.detail-poster img,
.overview-card img,
.category-tile img,
.rank-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card-link:hover .poster-wrap img,
.overview-card a:hover img,
.category-tile a:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.74));
    opacity: 0.72;
}

.play-badge,
.big-play {
    position: absolute;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    border-radius: 999px;
    box-shadow: 0 18px 36px rgba(13, 148, 136, 0.34);
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    opacity: 0;
    transform: translate(-50%, -44%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-link:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.corner-pill {
    position: absolute;
    left: 12px;
    top: 12px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 17px;
}

.card-body strong {
    font-size: 18px;
    line-height: 1.35;
}

.card-desc {
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #475569;
    font-size: 13px;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-tags span,
.detail-tags span {
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-large .card-body strong {
    font-size: 23px;
}

.movie-card-large .poster-wrap {
    aspect-ratio: 16 / 10;
}

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

.category-tile a,
.overview-card a {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: end;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: var(--soft-shadow);
}

.category-tile img,
.overview-card img {
    position: absolute;
    inset: 0;
    opacity: 0.72;
}

.category-tile-copy,
.overview-card span {
    position: relative;
    width: 100%;
    padding: 26px;
    color: #fff;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.category-tile strong,
.overview-card strong {
    display: block;
    font-size: 26px;
    margin-bottom: 8px;
}

.category-tile em,
.overview-card em,
.rank-copy em {
    display: block;
    font-style: normal;
    color: rgba(241, 245, 249, 0.86);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.mini-links a {
    padding: 5px 10px;
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.rank-panel,
.detail-side,
.detail-article {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(13, 148, 136, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--soft-shadow);
}

.rank-panel {
    padding: 24px;
    position: sticky;
    top: 96px;
}

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

.rank-row a {
    display: grid;
    grid-template-columns: 40px 82px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rank-row a:hover {
    transform: translateX(4px);
    border-color: rgba(13, 148, 136, 0.34);
    box-shadow: var(--soft-shadow);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), #f97316);
    border-radius: 12px;
    font-weight: 900;
}

.rank-row img {
    width: 82px;
    height: 54px;
    border-radius: 12px;
    background: #0f172a;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em,
.rank-copy small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy strong {
    color: var(--ink);
    font-size: 15px;
}

.rank-copy em {
    color: var(--muted);
    font-size: 13px;
}

.rank-copy small {
    color: #0f766e;
    font-size: 12px;
}

.full-rank .rank-row a {
    grid-template-columns: 52px 120px minmax(0, 1fr);
}

.full-rank .rank-row img {
    width: 120px;
    height: 76px;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    position: relative;
    padding: 92px 0 70px;
    color: #fff;
    background: radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.46), transparent 34%), linear-gradient(135deg, #0f172a, #0f766e 55%, #1d4ed8);
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -10%;
    top: -35%;
    width: 460px;
    height: 460px;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    filter: blur(2px);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero p {
    max-width: 720px;
    color: rgba(241, 245, 249, 0.88);
    font-size: 19px;
}

.compact-page-hero {
    padding: 78px 0 62px;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 26px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(13, 148, 136, 0.14);
    border-radius: 20px;
    box-shadow: var(--soft-shadow);
}

.toolbar input,
.toolbar select {
    min-height: 46px;
    padding: 0 14px;
    background: #f8fafc;
    border-radius: 14px;
}

.toolbar input {
    flex: 1;
}

.toolbar select {
    min-width: 160px;
}

.search-hero-form {
    display: flex;
    gap: 10px;
    max-width: 620px;
    padding: 8px;
    margin-top: 26px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.search-hero-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    color: #fff;
}

.search-hero-form input::placeholder {
    color: rgba(255, 255, 255, 0.75);
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: end;
    color: #fff;
    overflow: hidden;
    background: #020617;
}

.detail-bg,
.detail-bg img,
.detail-bg::after {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) saturate(1.15);
    transform: scale(1.06);
    opacity: 0.55;
}

.detail-bg::after {
    content: "";
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(13, 148, 136, 0.16));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    padding: 86px 0 54px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: rgba(241, 245, 249, 0.78);
}

.breadcrumb a:hover,
.detail-side a:hover {
    color: #14b8a6;
}

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

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.36);
    background: #0f172a;
}

.detail-copy .lead {
    max-width: 780px;
    color: rgba(241, 245, 249, 0.92);
    font-size: 21px;
}

.player-section {
    padding-top: 44px;
    background: #020617;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.34);
}

.movie-player,
.player-cover,
.player-cover img,
.player-cover-mask {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.movie-player {
    display: block;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000;
}

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

.player-cover img {
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.player-cover-mask {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.18), rgba(2, 6, 23, 0.72));
}

.big-play {
    left: 50%;
    top: 50%;
    width: 94px;
    height: 94px;
    font-size: 40px;
    transform: translate(-50%, -50%);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.detail-article {
    padding: 32px;
}

.detail-article p {
    color: #334155;
    font-size: 18px;
}

.detail-side {
    padding: 26px;
    position: sticky;
    top: 96px;
}

.detail-side dl {
    margin: 18px 0 0;
}

.detail-side dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.detail-side dd {
    margin: 4px 0 16px;
    color: #0f172a;
    font-weight: 700;
}

.site-footer {
    color: rgba(226, 232, 240, 0.88);
    background: linear-gradient(135deg, #020617, #0f172a 56%, #0f766e);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.4fr 0.8fr;
    gap: 30px;
    padding: 46px 0;
}

.footer-grid strong {
    display: block;
    color: #fff;
    font-size: 18px;
    margin-bottom: 12px;
}

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

.footer-links a {
    color: #ccfbf1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 5px 10px;
}

.footer-bottom {
    padding: 18px 16px;
    text-align: center;
    color: rgba(226, 232, 240, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.is-filtered-out {
    display: none !important;
}

@media (max-width: 1120px) {
    .desktop-nav {
        gap: 12px;
        font-size: 14px;
    }

    .header-search input {
        width: 170px;
    }

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

@media (max-width: 900px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .hero,
    .hero-content {
        min-height: 590px;
    }

    .hero-copy p,
    .detail-copy .lead {
        font-size: 18px;
    }

    .movie-grid,
    .movie-grid.two-col,
    .movie-grid.three-col,
    .category-grid,
    .overview-grid,
    .split-layout,
    .detail-layout,
    .footer-grid,
    .detail-head-grid {
        grid-template-columns: 1fr;
    }

    .rank-panel,
    .detail-side {
        position: static;
    }

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

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

    .logo {
        font-size: 20px;
    }

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

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .section {
        padding: 50px 0;
    }

    .section-head,
    .toolbar,
    .search-hero-form {
        align-items: stretch;
        flex-direction: column;
    }

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

    .full-rank .rank-row a,
    .rank-row a {
        grid-template-columns: 38px 86px minmax(0, 1fr);
        gap: 10px;
    }

    .full-rank .rank-row img,
    .rank-row img {
        width: 86px;
        height: 58px;
    }

    .category-tile a,
    .overview-card a {
        min-height: 220px;
    }

    .detail-hero-inner {
        padding-top: 70px;
    }

    .detail-copy h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .big-play {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}
