:root {
    --text: #172033;
    --muted: #667085;
    --line: #e5edf2;
    --soft: #f5fbfc;
    --white: #ffffff;
    --teal: #0fbaa8;
    --teal-dark: #0f766e;
    --blue: #2563eb;
    --dark: #071523;
    --shadow: 0 18px 45px rgba(18, 38, 63, .10);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(180deg, #ffffff 0%, #f8fcff 46%, #ffffff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(229, 237, 242, .9);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    min-height: 74px;
    margin: 0 auto;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    box-shadow: 0 14px 28px rgba(15, 186, 168, .28);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(135deg, var(--teal-dark), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 10px 14px;
    color: #344054;
    border-radius: 999px;
    font-weight: 700;
    transition: color .2s ease, background .2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--teal-dark);
    background: rgba(15, 186, 168, .10);
}

.search-form,
.mobile-search,
.hero-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-form input,
.mobile-search input,
.hero-search input {
    width: 210px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    background: #ffffff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.search-form input:focus,
.mobile-search input:focus,
.hero-search input:focus {
    border-color: rgba(15, 186, 168, .7);
    box-shadow: 0 0 0 4px rgba(15, 186, 168, .12);
}

.search-form button,
.mobile-search button,
.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    background: linear-gradient(135deg, var(--teal), var(--blue));
}

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(15, 186, 168, .10);
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--teal-dark);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.hero {
    padding: 28px 16px 18px;
}

.hero-shell {
    position: relative;
    overflow: hidden;
    width: min(1180px, 100%);
    min-height: 560px;
    margin: 0 auto;
    border-radius: 34px;
    background: var(--dark);
    box-shadow: 0 28px 80px rgba(7, 21, 35, .22);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .55s ease, visibility .55s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-backdrop,
.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-backdrop::after,
.page-hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 20% 20%, rgba(20, 184, 166, .24), transparent 34%),
        radial-gradient(circle at 86% 14%, rgba(37, 99, 235, .22), transparent 32%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 48px));
    padding: 92px 0 0 64px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 7px 12px;
    color: #dffdfa;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .04em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1.03;
    letter-spacing: -.05em;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    color: var(--teal-dark);
    border-radius: 999px;
    background: rgba(15, 186, 168, .12);
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    color: #f2fffd;
    background: rgba(255, 255, 255, .14);
}

.hero-actions,
.detail-info .primary-button {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.intro-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
}

.primary-button,
.intro-link {
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    box-shadow: 0 18px 38px rgba(15, 186, 168, .28);
}

.ghost-button {
    margin-left: 12px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .12);
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 28px;
    z-index: 3;
    display: grid;
    width: min(420px, calc(100% - 56px));
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hero-dot {
    min-height: 58px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, .72);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 18px;
    background: rgba(255, 255, 255, .10);
    cursor: pointer;
    text-align: left;
    backdrop-filter: blur(12px);
}

.hero-dot.active {
    color: #ffffff;
    border-color: rgba(15, 186, 168, .7);
    background: rgba(15, 186, 168, .26);
}

.hero-dot span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 13px;
    font-weight: 800;
}

main {
    width: 100%;
}

.home-intro,
.content-section,
.split-section,
.detail-content,
.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.home-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0 24px;
}

.intro-card {
    max-width: 760px;
}

.intro-card span {
    color: var(--teal-dark);
    font-weight: 900;
}

.intro-card h2,
.section-heading h2,
.panel-heading h2,
.story-block h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -.03em;
}

.intro-card p,
.story-block p,
.category-strip p,
.movie-card p {
    color: var(--muted);
}

.content-section {
    padding: 42px 0;
}

.soft-bg {
    width: 100%;
    padding: 62px max(16px, calc((100% - 1180px) / 2));
    background: linear-gradient(135deg, #effdfb, #eff6ff);
}

.section-heading,
.panel-heading,
.strip-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-heading a,
.panel-heading a,
.strip-title a {
    color: var(--teal-dark);
    font-weight: 900;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 237, 242, .96);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(18, 38, 63, .08);
    transition: transform .2s ease, box-shadow .2s ease;
}

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

.card-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background:
        radial-gradient(circle at 30% 15%, rgba(20, 184, 166, .34), transparent 35%),
        linear-gradient(135deg, #dffdfa, #eff6ff);
}

.poster-frame {
    display: block;
    width: 100%;
    height: 100%;
}

.poster-frame img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.is-hidden {
    display: none;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(7, 21, 35, .68);
    font-size: 13px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    color: #111827;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-card p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 10px 0 12px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: #98a2b3;
    font-size: 13px;
    font-weight: 700;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    padding: 42px 0;
}

.hot-panel {
    align-self: start;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: #f8fbfd;
    transition: background .2s ease, transform .2s ease;
}

.rank-item:hover {
    transform: translateX(3px);
    background: #edfdfa;
}

.rank-no,
.rank-dot {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    font-size: 13px;
    font-weight: 900;
}

.rank-dot {
    width: 12px;
    height: 12px;
    margin-left: 12px;
}

.rank-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 900;
}

.rank-info {
    grid-column: 2;
    overflow: hidden;
    margin-top: -8px;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px;
}

.category-strip {
    margin-bottom: 42px;
}

.category-strip:last-child {
    margin-bottom: 0;
}

.strip-title {
    align-items: center;
}

.strip-title h3 {
    margin: 0;
    font-size: 28px;
}

.strip-title p {
    margin: 4px 0 0;
}

.page-hero {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    margin: 28px auto 16px;
    width: min(1180px, calc(100% - 32px));
    border-radius: 34px;
    background: linear-gradient(135deg, #071523, #0f766e);
    box-shadow: 0 28px 70px rgba(7, 21, 35, .18);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    padding: 78px 62px;
    color: #ffffff;
}

.rank-hero .page-hero-bg,
.search-hero .page-hero-bg {
    background:
        radial-gradient(circle at 18% 28%, rgba(20, 184, 166, .44), transparent 32%),
        radial-gradient(circle at 82% 24%, rgba(37, 99, 235, .45), transparent 28%),
        linear-gradient(135deg, #071523, #0f3447 52%, #0f766e);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 28px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.breadcrumb a {
    color: var(--teal-dark);
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 40px;
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 34px;
    padding: 34px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 10% 8%, rgba(20, 184, 166, .18), transparent 30%),
        #ffffff;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 26px;
    background:
        radial-gradient(circle at 30% 15%, rgba(20, 184, 166, .34), transparent 35%),
        linear-gradient(135deg, #dffdfa, #eff6ff);
}

.detail-info .eyebrow {
    color: var(--teal-dark);
    border-color: rgba(15, 186, 168, .22);
    background: rgba(15, 186, 168, .10);
}

.detail-info h1 {
    color: var(--text);
}

.lead-text {
    color: var(--muted);
    font-size: 20px;
}

.tag-row.large span {
    min-height: 34px;
    padding: 6px 12px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    color: #475467;
    font-weight: 800;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 14px;
    background: #f5fbfc;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(7, 21, 35, .22);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle at center, rgba(15, 186, 168, .18), rgba(7, 21, 35, .74));
    cursor: pointer;
}

.play-cover span {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal), var(--blue));
    box-shadow: 0 18px 42px rgba(15, 186, 168, .32);
    font-size: 34px;
}

.player-shell.is-playing .play-cover {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.story-block {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(18, 38, 63, .06);
}

.story-block p {
    margin-bottom: 0;
    font-size: 17px;
}

.hero-search {
    align-items: stretch;
    max-width: 560px;
}

.hero-search input {
    flex: 1;
    width: auto;
    border-radius: 18px;
}

.hero-search button {
    border-radius: 18px;
}

.site-footer {
    margin-top: 48px;
    color: #d1e7ec;
    background: #071523;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    max-width: 520px;
    color: #9fb9c2;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
}

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

    .menu-button {
        display: block;
    }

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

    .split-section,
    .rank-layout,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .hot-panel,
    .sticky-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-shell {
        min-height: 620px;
        border-radius: 26px;
    }

    .hero-content {
        width: calc(100% - 32px);
        padding: 54px 0 0 28px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 40px;
    }

    .hero-dots {
        left: 20px;
        right: 20px;
        bottom: 20px;
        width: auto;
        grid-template-columns: 1fr 1fr;
    }

    .home-intro,
    .footer-inner,
    .section-heading,
    .strip-title {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 20px;
    }

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

    .page-hero-content {
        padding: 52px 28px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .compact-grid,
    .two-column,
    .three-column {
        grid-template-columns: 1fr;
    }

    .ghost-button {
        margin-top: 10px;
        margin-left: 0;
    }

    .hero-actions {
        display: grid;
        gap: 10px;
        max-width: 220px;
    }

    .mobile-search,
    .hero-search {
        flex-direction: column;
    }

    .mobile-search input,
    .hero-search input {
        width: 100%;
    }
}
