* {
    box-sizing: border-box;
}

:root {
    --color-page: #f9fafb;
    --color-surface: #ffffff;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #e5e7eb;
    --color-dark: #0f172a;
    --color-emerald: #059669;
    --color-emerald-dark: #047857;
    --color-emerald-soft: #ecfdf5;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 8px 24px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
}

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

.logo-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #0f766e);
    box-shadow: 0 12px 22px rgba(5, 150, 105, 0.24);
}

.logo-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-copy span {
    font-size: 20px;
}

.logo-copy small {
    margin-top: 3px;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 600;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
}

.main-nav a {
    position: relative;
    padding: 22px 0;
    transition: color 0.2s ease;
}

.main-nav a::after {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    height: 2px;
    content: "";
    border-radius: 999px;
    background: var(--color-emerald);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--color-emerald);
}

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

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: #374151;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
}

.hero-carousel {
    position: relative;
    min-height: 62vh;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 1s ease;
}

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 62vh;
    align-items: flex-end;
    padding-top: 72px;
    padding-bottom: 72px;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    margin-bottom: 12px;
    color: #10b981;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    text-shadow: 0 18px 38px rgba(0, 0, 0, 0.45);
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 12px;
    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: var(--color-emerald);
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.32);
}

.btn-primary:hover {
    background: var(--color-emerald-dark);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100% - 1200px) / 2));
    bottom: 38px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search {
    position: relative;
    z-index: 10;
    margin-top: -34px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
}

.search-panel h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.search-panel p {
    margin: 0;
    color: var(--color-muted);
}

.search-jump,
.filter-panel {
    display: flex;
    gap: 12px;
}

.search-jump input,
.filter-input,
.filter-select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-soft);
    border-radius: 12px;
    color: var(--color-text);
    background: #ffffff;
    outline: none;
    padding: 0 14px;
}

.search-jump input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

.search-jump button {
    min-width: 96px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: var(--color-emerald);
    font-weight: 800;
}

.page-stack {
    display: grid;
    gap: 58px;
    padding-top: 54px;
    padding-bottom: 64px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--color-emerald);
    font-weight: 800;
}

.section-link span {
    transition: transform 0.2s ease;
}

.section-link:hover span {
    transform: translateX(4px);
}

.movie-grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: #e5e7eb;
    box-shadow: var(--shadow-soft);
}

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

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

.movie-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
    transition: opacity 0.3s ease;
}

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

.play-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: rgba(5, 150, 105, 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration-label {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 3px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 700;
}

.movie-card-body {
    padding-top: 12px;
}

.movie-card h3,
.rank-body h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card a:hover h3,
.rank-body a:hover h3 {
    color: var(--color-emerald);
}

.movie-card p,
.rank-body p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}

.movie-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #047857;
    background: var(--color-emerald-soft);
    font-size: 12px;
    font-weight: 700;
}

.movie-tags-large span {
    min-height: 30px;
    padding: 0 11px;
    font-size: 13px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 700;
}

.category-band {
    padding: 34px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.category-grid-large {
    margin-bottom: 0;
}

.category-tile {
    display: grid;
    min-height: 128px;
    align-content: center;
    gap: 8px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.category-tile:hover {
    border-color: rgba(16, 185, 129, 0.45);
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.category-tile strong {
    color: #111827;
    font-size: 20px;
}

.category-tile span {
    color: var(--color-muted);
    font-size: 14px;
}

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

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    overflow: hidden;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-card-horizontal .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3px 4px 3px 0;
}

.movie-poster-wide {
    height: 112px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 132px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

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

.rank-cover {
    display: block;
    overflow: hidden;
    height: 78px;
    border-radius: 14px;
    background: #e5e7eb;
}

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

.rank-score {
    color: #f59e0b;
    font-size: 22px;
}

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

.page-hero .container {
    padding-top: 58px;
    padding-bottom: 58px;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 700;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 160px 160px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-panel-large {
    grid-template-columns: 1fr 160px 160px 160px;
}

.searchable-card.is-hidden {
    display: none;
}

.detail-hero {
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.34), transparent 38%), linear-gradient(135deg, #0f172a, #111827 55%, #064e3b);
}

.detail-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding-top: 54px;
    padding-bottom: 54px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.38);
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 780px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0 26px;
}

.detail-stats span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.player-section {
    scroll-margin-top: 86px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.18);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 0;
    color: #ffffff;
    background: #000000;
    padding: 0;
}

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

.player-cover-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.big-play {
    position: relative;
    z-index: 2;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 50%;
    background: rgba(5, 150, 105, 0.92);
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.32);
    font-size: 34px;
    transition: transform 0.2s ease;
}

.player-cover:hover .big-play {
    transform: scale(1.08);
}

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

.content-card {
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.content-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 14px;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding-top: 46px;
    padding-bottom: 38px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.site-footer p {
    max-width: 560px;
    margin: 16px 0 0;
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer a:not(.footer-logo) {
    display: block;
    margin: 7px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #34d399;
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    text-align: center;
}

@media (max-width: 1024px) {
    .movie-grid-three,
    .movie-grid-four,
    .movie-grid-five,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .filter-panel,
    .filter-panel-large {
        grid-template-columns: 1fr 1fr;
    }
}

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

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

    .main-nav {
        position: absolute;
        top: 66px;
        left: 12px;
        right: 12px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: var(--shadow-card);
    }

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

    .main-nav a {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .main-nav a::after {
        display: none;
    }

    .main-nav a:hover,
    .main-nav a.is-active {
        background: var(--color-emerald-soft);
    }

    .hero-carousel,
    .hero-content {
        min-height: 70vh;
    }

    .hero-content {
        padding-bottom: 96px;
    }

    .hero-controls {
        right: auto;
        left: 16px;
        bottom: 30px;
    }

    .search-panel,
    .search-jump,
    .filter-panel,
    .filter-panel-large,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .search-jump {
        display: grid;
    }

    .movie-grid-three,
    .movie-grid-four,
    .movie-grid-five,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .category-band {
        padding: 22px;
    }

    .movie-card-horizontal {
        grid-template-columns: 132px minmax(0, 1fr);
    }

    .movie-poster-wide {
        height: 94px;
    }

    .rank-item {
        grid-template-columns: 40px 96px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 2 / -1;
        justify-self: start;
        font-size: 18px;
    }

    .detail-layout {
        gap: 24px;
        padding-top: 36px;
        padding-bottom: 36px;
    }

    .page-stack {
        gap: 42px;
        padding-top: 38px;
        padding-bottom: 48px;
    }
}
