:root {
    --teal-900: #134e4a;
    --teal-800: #115e59;
    --teal-700: #0f766e;
    --teal-600: #0d9488;
    --teal-100: #ccfbf1;
    --amber-500: #f59e0b;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --white: #ffffff;
    --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50), #ffffff 48%, #ffffff);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
    box-shadow: 0 12px 28px rgba(15, 118, 110, 0.25);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.site-logo {
    font-size: 22px;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 650;
}

.main-nav a,
.mobile-nav a {
    opacity: 0.9;
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--teal-100);
    opacity: 1;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-nav a {
    display: block;
    padding: 12px 10px;
    border-radius: 10px;
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-carousel {
    position: relative;
    height: min(62vw, 600px);
    min-height: 440px;
    margin-bottom: 28px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--slate-900);
    box-shadow: var(--shadow-soft);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    max-width: 650px;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

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

.hero-kicker span,
.detail-kicker span,
.hero-tags span,
.hero-mini-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.hero-kicker span:first-child {
    background: var(--teal-600);
}

.hero-kicker span:last-child {
    background: var(--amber-500);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.hero-tags span,
.hero-mini-tags span {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-mini-tags {
    margin-top: 18px;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
}

.primary-button,
.ghost-button,
.ghost-dark-button,
.line-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #ffffff;
    background: var(--teal-600);
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.28);
}

.primary-button:hover,
.line-button:hover {
    transform: translateY(-2px);
    background: var(--teal-700);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.ghost-dark-button {
    color: var(--teal-800);
    background: var(--teal-100);
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 26px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel {
    margin: 28px 0 40px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 190px;
    gap: 12px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #dbe7e5;
    border-radius: 16px;
    padding: 0 16px;
    font-size: 15px;
    outline: none;
    background: #ffffff;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.content-section {
    margin-bottom: 56px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    color: var(--slate-800);
}

.section-heading a {
    font-weight: 800;
    color: var(--teal-700);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--teal-700), var(--slate-900));
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0), rgba(2, 6, 23, 0.56));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.year-badge,
.play-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
}

.year-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    background: var(--amber-500);
    font-size: 13px;
}

.play-badge {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.82);
    background: var(--teal-600);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
    color: var(--slate-900);
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: var(--teal-700);
}

.movie-card p,
.rank-info p {
    margin: 0 0 14px;
    color: var(--slate-600);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-600);
    font-size: 13px;
}

.movie-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--slate-100);
}

.tag-line {
    margin-top: 14px;
}

.tag-line span,
.detail-tags span {
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--teal-800);
    background: var(--teal-100);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card,
.category-overview-card {
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #ecfeff);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.category-card {
    min-height: 138px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.15);
}

.category-card span {
    color: var(--teal-800);
    font-size: 22px;
    font-weight: 900;
}

.category-card small {
    color: var(--slate-600);
    line-height: 1.65;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 58px 132px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-500), #ef4444);
    font-weight: 900;
}

.rank-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    background: var(--slate-900);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.page-hero,
.detail-hero {
    border-radius: 28px;
    background: linear-gradient(135deg, var(--teal-700), var(--slate-900));
    box-shadow: var(--shadow-soft);
}

.page-hero {
    margin-bottom: 34px;
    padding: 44px;
    color: #ffffff;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 48px);
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

.breadcrumb {
    margin: 0 0 18px;
    color: var(--teal-700);
    font-weight: 800;
}

.page-hero .breadcrumb {
    color: var(--teal-100);
}

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

.category-overview-card {
    padding: 24px;
}

.category-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 20px;
}

.category-overview-head h2 {
    margin: 0;
    min-width: 160px;
    color: var(--teal-800);
}

.category-overview-head p {
    margin: 0;
    color: var(--slate-600);
    line-height: 1.75;
}

.line-button {
    margin-top: 18px;
    color: #ffffff;
    background: var(--teal-600);
}

.detail-shell > .breadcrumb {
    margin-top: 4px;
}

.detail-hero {
    padding: 26px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 28px;
    color: #ffffff;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.player-panel video {
    width: 100%;
    height: 100%;
    background: #000000;
}

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

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

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

.player-start {
    position: absolute;
    border: 0;
    min-height: 58px;
    padding: 0 30px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--teal-600);
    box-shadow: 0 20px 44px rgba(13, 148, 136, 0.36);
    font-weight: 900;
    font-size: 18px;
    cursor: pointer;
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-kicker span {
    background: rgba(255, 255, 255, 0.16);
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.12;
}

.detail-one-line {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.8;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    margin: 36px 0 56px;
}

.poster-card,
.detail-content {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.poster-card {
    overflow: hidden;
    align-self: start;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--slate-900);
}

.poster-card dl {
    margin: 0;
    padding: 20px;
}

.poster-card div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.poster-card div:last-child {
    border-bottom: 0;
}

.poster-card dt {
    color: var(--slate-600);
}

.poster-card dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.detail-content {
    padding: 32px;
}

.detail-content h2 {
    margin: 0 0 16px;
    color: var(--slate-900);
    font-size: 26px;
}

.detail-content p {
    margin: 0 0 28px;
    color: var(--slate-700);
    line-height: 2;
    font-size: 17px;
}

.wide-tags {
    margin-bottom: 4px;
}

[data-movie-card].is-hidden {
    display: none;
}

.site-footer {
    color: #cbd5e1;
    background: var(--slate-900);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    margin-bottom: 16px;
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    margin: 0;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-links a:hover {
    color: var(--teal-100);
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #94a3b8;
}

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

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

    .rank-list {
        grid-template-columns: 1fr;
    }

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

    .poster-card {
        max-width: 420px;
    }
}

@media (max-width: 760px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

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

    .page-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 20px;
    }

    .hero-carousel {
        min-height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 28px;
        justify-content: flex-end;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.92));
    }

    .search-panel {
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

    .movie-grid,
    .small-grid,
    .category-cards,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 44px 96px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 38px;
        height: 38px;
    }

    .page-hero,
    .detail-hero,
    .detail-content {
        padding: 24px;
        border-radius: 22px;
    }

    .category-overview-head {
        display: block;
    }

    .detail-info h1 {
        font-size: 32px;
    }
}

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

    .rank-card {
        grid-template-columns: 38px 1fr;
    }

    .rank-thumb {
        display: none;
    }
}
