:root {
    --emerald: #059669;
    --emerald-dark: #047857;
    --teal: #0d9488;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f8fafc;
    color: var(--slate-900);
    font-family: Inter, ui-sans-serif, system-ui, -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;
}

.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 {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 12px 26px rgba(5, 150, 105, 0.26);
}

.brand-text {
    font-size: 20px;
}

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--slate-700);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: var(--emerald-dark);
    background: rgba(5, 150, 105, 0.10);
}

.nav-dropdown {
    position: relative;
}

.nav-more {
    border: 0;
    background: transparent;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 190px;
    padding: 12px;
    display: grid;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 9px 12px;
    border-radius: 12px;
    color: var(--slate-700);
}

.dropdown-menu a:hover {
    background: rgba(5, 150, 105, 0.10);
    color: var(--emerald-dark);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(5, 150, 105, 0.10);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--emerald-dark);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    height: 720px;
    overflow: hidden;
    background: var(--slate-950);
}

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

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.12));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 108px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    color: var(--white);
}

.hero-kicker,
.detail-category,
.section-heading span,
.section-title-row span,
.page-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.03em;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 18px 0 14px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 20px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.rank-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

.card-meta span,
.rank-meta span {
    background: var(--slate-100);
    color: var(--slate-600);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    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: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 16px 32px rgba(5, 150, 105, 0.32);
}

.btn-light {
    color: var(--slate-900);
    background: rgba(255, 255, 255, 0.88);
}

.btn-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
    width: 34px;
    background: var(--white);
}

.hero-search {
    position: absolute;
    right: max(16px, calc((100% - 1180px) / 2));
    bottom: 96px;
    z-index: 5;
    width: min(420px, calc(100% - 32px));
    display: flex;
    gap: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px);
}

.hero-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--slate-200);
    outline: 0;
    border-radius: 14px;
    background: var(--white);
    color: var(--slate-900);
}

.hero-search input {
    min-height: 44px;
    padding: 0 16px;
    border-color: transparent;
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-weight: 800;
}

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

.intro-section {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 28px;
    align-items: center;
    padding: 34px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.section-heading h2,
.section-title-row h2,
.page-hero h1,
.detail-info h1,
.text-card h2 {
    margin: 10px 0;
    color: var(--slate-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.text-card p,
.category-overview-card p {
    color: var(--slate-600);
    font-size: 16px;
}

.quick-links {
    display: grid;
    gap: 12px;
}

.quick-links a,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-radius: 16px;
    color: var(--emerald-dark);
    background: rgba(5, 150, 105, 0.10);
    font-weight: 800;
}

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

.section-title-row > a {
    color: var(--emerald-dark);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #065f46, #0f766e, #0f172a);
}

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

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.poster-year,
.rank-badge {
    position: absolute;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 30px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.64);
    font-weight: 800;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.poster-year {
    left: 12px;
}

.rank-badge {
    right: 12px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    background: rgba(5, 150, 105, 0.84);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

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

.movie-card p {
    margin: 0 0 12px;
    color: var(--slate-600);
    font-size: 14px;
}

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

.tag-row span,
.detail-tags span {
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--emerald-dark);
    background: rgba(5, 150, 105, 0.10);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--slate-900);
    box-shadow: 0 15px 34px rgba(15, 23, 42, 0.12);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.category-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
}

.category-card-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    gap: 4px;
    color: var(--white);
}

.category-card-content strong {
    font-size: 20px;
}

.category-card-content em {
    color: #d1d5db;
    font-style: normal;
    font-size: 13px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 66px 92px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 14px;
    background: var(--slate-800);
}

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

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-content p {
    margin: 0 0 10px;
    color: var(--slate-600);
    font-size: 14px;
}

.page-hero {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: end;
    padding: 112px max(16px, calc((100% - 1180px) / 2)) 58px;
    color: var(--white);
}

.page-hero-gradient {
    background: radial-gradient(circle at 12% 18%, rgba(20, 184, 166, 0.86), transparent 30%), linear-gradient(135deg, #065f46, #0f766e 48%, #0f172a);
}

.page-hero h1,
.page-hero p {
    color: var(--white);
}

.page-hero p {
    max-width: 760px;
    color: #d1fae5;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 22px;
    padding: 18px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-overview-image {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    background: var(--slate-800);
}

.category-overview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overview-card span {
    color: var(--emerald-dark);
    font-weight: 800;
}

.category-overview-card h2 {
    margin: 8px 0;
    font-size: 26px;
}

.filter-panel {
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
}

.filter-grid label {
    display: grid;
    gap: 7px;
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    padding: 0 14px;
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 28px;
    border-radius: 22px;
    background: var(--white);
    color: var(--slate-600);
    text-align: center;
    font-weight: 800;
}

.empty-state.is-visible {
    display: block;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.38;
    filter: blur(2px);
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.30) 100%);
}

.detail-hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 108px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
    color: #d1d5db;
    font-size: 14px;
}

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

.detail-top {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 38px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: var(--slate-800);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

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

.detail-info h1 {
    color: var(--white);
    font-size: clamp(34px, 6vw, 66px);
}

.detail-one-line {
    max-width: 840px;
    margin: 0 0 20px;
    color: #e5e7eb;
    font-size: 18px;
}

.detail-tags {
    margin: 18px 0 28px;
}

.detail-tags span {
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.14);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.20));
    cursor: pointer;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--emerald), var(--teal));
    box-shadow: 0 18px 46px rgba(5, 150, 105, 0.36);
    font-size: 28px;
}

.player-overlay strong {
    font-size: 22px;
}

.detail-text {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.text-card {
    padding: 26px;
    border-radius: 24px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.text-card h2 {
    font-size: 28px;
}

.site-footer {
    margin-top: 90px;
    background: var(--slate-900);
    color: var(--white);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 38px;
}

.footer-brand {
    margin-bottom: 14px;
    font-size: 20px;
}

.site-footer p,
.site-footer li,
.footer-bottom {
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    font-size: 14px;
}

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

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

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

    .hero-search {
        left: 16px;
        right: 16px;
        bottom: 24px;
    }

    .hero-content {
        bottom: 128px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .hero-carousel {
        min-height: 760px;
    }

    .hero-content {
        bottom: 150px;
    }

    .intro-section,
    .detail-top,
    .detail-text,
    .footer-main,
    .category-overview-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .section-wrap {
        margin-top: 52px;
    }

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

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

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

    .rank-item {
        grid-template-columns: 52px 74px 1fr;
        gap: 10px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        font-size: 16px;
    }

    .rank-content h3 {
        font-size: 16px;
    }

    .rank-content p {
        display: none;
    }

    .hero-actions {
        gap: 10px;
    }

    .btn {
        min-height: 42px;
        padding: 0 15px;
        font-size: 14px;
    }

    .page-hero {
        min-height: 250px;
        padding-top: 90px;
    }
}
