:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --card-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
    --card-shadow-hover: 0 24px 55px rgba(15, 23, 42, 0.16);
    --radius: 18px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--secondary-900);
    background: linear-gradient(180deg, var(--secondary-50), #ffffff 42%, #ffffff);
}

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

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

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.solid,
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.site-header.transparent:not(.scrolled) {
    background: transparent;
    box-shadow: none;
}

.header-inner {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary-600);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
    font-size: 14px;
}

.brand-text {
    font-size: 22px;
    color: var(--secondary-900);
}

.site-header.transparent:not(.scrolled) .brand-text,
.site-header.transparent:not(.scrolled) .desktop-nav .nav-link,
.site-header.transparent:not(.scrolled) .nav-toggle span {
    color: #ffffff;
}

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

.nav-link {
    position: relative;
    font-size: 15px;
    font-weight: 700;
    color: var(--secondary-700);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-600);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--secondary-800);
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    padding: 10px 16px 18px;
    background: #ffffff;
    border-top: 1px solid var(--secondary-200);
    box-shadow: 0 20px 32px rgba(15, 23, 42, 0.12);
}

.mobile-menu.open {
    display: grid;
    gap: 8px;
}

.mobile-link {
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--secondary-700);
    font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.hero {
    position: relative;
    height: 82vh;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: var(--secondary-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.1));
    z-index: 1;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.08) 52%, rgba(15, 23, 42, 0.2));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-copy {
    width: min(760px, 100%);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--primary-600);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 18px 36px rgba(2, 132, 199, 0.3);
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2.1vw, 22px);
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 22px 0 30px;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.hero-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
    color: #ffffff;
    background: var(--primary-600);
    box-shadow: 0 18px 32px rgba(2, 132, 199, 0.32);
}

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

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

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

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 30px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

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

.section {
    padding: 72px 0;
}

.section.alt {
    background: var(--secondary-100);
}

.section.blue {
    background: linear-gradient(120deg, var(--primary-600), var(--primary-700));
    color: #ffffff;
}

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

.section-title h1,
.section-title h2 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.035em;
}

.section-title p {
    margin: 0;
    max-width: 720px;
    color: var(--secondary-600);
    line-height: 1.8;
}

.blue .section-title p,
.blue .section-title h2 {
    color: #ffffff;
}

.section-link {
    color: var(--primary-700);
    font-weight: 800;
    white-space: nowrap;
}

.blue .section-link {
    color: #ffffff;
}

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

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

.movie-card {
    min-width: 0;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--secondary-900);
}

.movie-card.compact .poster-wrap {
    aspect-ratio: 4 / 3;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 56%);
}

.type-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 14px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.type-pill {
    right: 14px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 14px;
    min-width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    background: var(--primary-600);
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.25);
}

.card-content {
    padding: 20px;
}

.card-content h2 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.card-content p {
    min-height: 52px;
    margin: 0 0 16px;
    color: var(--secondary-600);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--secondary-500);
    font-size: 13px;
    font-weight: 700;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span,
.tag-link {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-50);
    color: var(--primary-700);
    font-size: 12px;
    font-weight: 800;
}

.horizontal-scroll {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 6px 0 18px;
    scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll .movie-card {
    width: 300px;
    flex: 0 0 300px;
}

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

.category-card {
    position: relative;
    min-height: 240px;
    border-radius: 24px;
    overflow: hidden;
    color: #ffffff;
    background: var(--secondary-900);
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
    transition: transform 0.5s ease;
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.2));
}

.category-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.page-hero {
    padding: 124px 0 48px;
    background: linear-gradient(135deg, var(--secondary-900), #123a56 52%, var(--primary-700));
    color: #ffffff;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 54px);
    letter-spacing: -0.04em;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(140px, 1fr));
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
}

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

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid var(--secondary-200);
    border-radius: 12px;
    padding: 0 12px;
    color: var(--secondary-900);
    background: var(--secondary-50);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.empty-state {
    padding: 32px;
    text-align: center;
    border-radius: 18px;
    background: #ffffff;
    color: var(--secondary-600);
    box-shadow: var(--card-shadow);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 72px 150px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #ffffff;
    background: var(--primary-600);
    font-size: 20px;
    font-weight: 900;
}

.rank-row img {
    width: 150px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    background: var(--secondary-900);
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-info p {
    margin: 0;
    color: var(--secondary-600);
    line-height: 1.65;
}

.rank-action {
    color: var(--primary-700);
    font-weight: 900;
    white-space: nowrap;
}

.detail-page {
    padding: 112px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: var(--secondary-600);
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--primary-700);
}

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

.player-card,
.info-card,
.text-card {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.25));
    cursor: pointer;
    z-index: 3;
}

.play-layer.hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button-mark {
    width: 86px;
    height: 86px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--primary-600);
    box-shadow: 0 24px 58px rgba(2, 132, 199, 0.38);
    font-size: 34px;
    transform: translateZ(0);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-layer:hover .play-button-mark {
    transform: scale(1.06);
    background: var(--primary-700);
}

.player-title {
    padding: 24px;
}

.player-title h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.player-title p {
    margin: 0;
    color: var(--secondary-600);
    line-height: 1.8;
}

.info-card {
    padding: 22px;
}

.info-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 18px;
    background: var(--secondary-900);
}

.info-list {
    display: grid;
    gap: 12px;
    color: var(--secondary-700);
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--secondary-200);
}

.info-list strong {
    color: var(--secondary-900);
    white-space: nowrap;
}

.text-card {
    padding: 26px;
    margin-top: 28px;
}

.text-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.text-card p {
    margin: 0 0 18px;
    color: var(--secondary-700);
    line-height: 1.9;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

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

[hidden] {
    display: none !important;
}

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

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

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

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

    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: block;
    }

    .header-inner {
        height: 66px;
    }

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

    .hero {
        height: 78vh;
        min-height: 540px;
    }

    .hero-content {
        padding-top: 70px;
    }

    .hero-control {
        display: none;
    }

    .section {
        padding: 52px 0;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        display: inline-flex;
        margin-top: 14px;
    }

    .movie-grid,
    .movie-grid.small,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-scroll .movie-card {
        width: 270px;
        flex-basis: 270px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .page-hero {
        padding-top: 104px;
    }

    .rank-row {
        grid-template-columns: 54px 96px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 18px;
    }

    .rank-row img {
        width: 96px;
    }

    .rank-action {
        grid-column: 2 / -1;
    }

    .detail-page {
        padding-top: 94px;
    }
}
