:root {
    --paper-200: #fafafa;
    --paper-100: #fcfcfc;
    --ink-900: #3d3d3d;
    --ink-700: #555555;
    --mist-50: #f8f9fa;
    --mist-100: #f1f3f5;
    --mist-200: #e9ecef;
    --mist-300: #dee2e6;
    --mist-500: #868e96;
    --mist-600: #6c757d;
    --mountain-50: #e8f4f8;
    --mountain-100: #d3eaf1;
    --mountain-400: #4aa0bc;
    --mountain-500: #2c8aa8;
    --mountain-600: #236e86;
    --mountain-700: #1a5264;
    --mountain-800: #123642;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 8px 24px rgba(18, 54, 66, 0.08);
    --shadow-md: 0 18px 45px rgba(18, 54, 66, 0.12);
    --shadow-lg: 0 26px 70px rgba(18, 54, 66, 0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink-900);
    background: var(--paper-200);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--mist-200);
    box-shadow: 0 6px 20px rgba(61, 61, 61, 0.05);
    backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--mountain-500), var(--mountain-700));
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.brand-text {
    display: grid;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--mist-600);
    font-size: 12px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--ink-700);
    font-weight: 600;
}

.desktop-nav a,
.nav-dropdown button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown button:hover {
    color: var(--mountain-600);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 190px;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
}

.nav-dropdown-menu a:hover {
    background: var(--mountain-50);
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.filter-box input,
.filter-box select {
    border: 1px solid var(--mist-300);
    background: var(--mist-50);
    color: var(--ink-900);
    border-radius: 999px;
    padding: 10px 14px;
    outline: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-box input:focus,
.filter-box select:focus {
    border-color: var(--mountain-400);
    box-shadow: 0 0 0 4px rgba(44, 138, 168, 0.15);
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.mobile-search button,
.hero-search button,
.primary-button {
    color: var(--white);
    background: var(--mountain-600);
    box-shadow: var(--shadow-sm);
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.primary-button:hover {
    background: var(--mountain-700);
    transform: translateY(-1px);
}

.ghost-button {
    color: var(--mountain-700);
    background: var(--mountain-50);
    border: 1px solid rgba(35, 110, 134, 0.2);
}

.ghost-button:hover {
    background: var(--mountain-100);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--mist-100);
    color: var(--ink-900);
}

.mobile-nav {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 18px;
    border-top: 1px solid var(--mist-200);
}

.mobile-nav a {
    display: block;
    padding: 10px 4px;
    color: var(--ink-700);
    font-weight: 600;
}

.page-main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--ink-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.65s ease;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - 1180px) / 2));
    bottom: 105px;
    width: min(720px, calc(100% - 48px));
    color: var(--white);
}

.hero-chip,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--mountain-600);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.eyebrow {
    background: var(--mountain-50);
    color: var(--mountain-700);
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 20px;
    color: var(--mist-100);
    font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-row,
.genre-tags,
.detail-tags,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-tags span,
.tag-row span,
.genre-tags span,
.detail-tags a {
    display: inline-flex;
    padding: 5px 10px;
    color: var(--mountain-700);
    background: var(--mountain-50);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.hero-actions .primary-button {
    background: var(--white);
    color: var(--ink-900);
}

.hero-actions .primary-button:hover {
    background: var(--mountain-50);
}

.hero-actions .ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    font-size: 34px;
    cursor: pointer;
}

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 46px;
    display: flex;
    gap: 8px;
}

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

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

.hero-search {
    position: absolute;
    z-index: 6;
    left: max(24px, calc((100% - 1180px) / 2));
    bottom: 36px;
    display: flex;
    width: min(560px, calc(100% - 48px));
    padding: 8px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    backdrop-filter: blur(14px);
}

.hero-search input {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
}

.section-block,
.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
    margin: 12px 0 8px;
    color: var(--ink-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-heading p,
.page-hero p,
.overview-card p,
.movie-card p,
.rank-row p,
.detail-content p {
    color: var(--mist-600);
}

.soft-section {
    background: var(--mist-50);
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
}

.dark-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1180px) / 2));
    padding-right: max(16px, calc((100% - 1180px) / 2));
    background: var(--ink-900);
    color: var(--white);
}

.dark-section .section-heading h2,
.dark-section .section-heading p {
    color: var(--white);
}

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

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

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

.movie-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--mountain-50), var(--mist-100));
}

.poster-wrap img,
.overview-cover img,
.category-card img,
.rank-thumb img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.64), transparent 60%);
}

.play-float {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: var(--mountain-600);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: all 0.25s ease;
}

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

.year-badge,
.rank-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: var(--mountain-600);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 1.3em;
    color: var(--ink-900);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-title:hover {
    color: var(--mountain-600);
}

.movie-card p,
.rank-row p {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 12px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.meta-row {
    color: var(--mist-600);
    font-size: 13px;
}

.meta-row a {
    color: var(--mountain-700);
    font-weight: 700;
}

.horizontal-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    align-items: stretch;
}

.horizontal-card .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
}

.scroll-row {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    padding-bottom: 18px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    flex: 0 0 330px;
    scroll-snap-align: start;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 18px;
    border-radius: 18px;
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.15));
}

.category-card img {
    position: absolute;
    inset: 0;
}

.category-card span,
.category-card strong,
.category-card small {
    position: relative;
    z-index: 2;
    display: block;
}

.category-card span {
    margin-top: 92px;
    font-size: 20px;
    font-weight: 900;
}

.category-card strong {
    margin: 4px 0;
    font-size: 14px;
}

.category-card small {
    color: var(--mist-100);
}

.center-action {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

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

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 70px;
    border-radius: 28px;
    background: radial-gradient(circle at 20% 20%, rgba(44, 138, 168, 0.16), transparent 35%), var(--white);
    box-shadow: var(--shadow-sm);
}

.compact-hero {
    min-height: auto;
}

.toolbar-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 14px 18px;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 16px;
}

.overview-grid {
    display: grid;
    gap: 22px;
}

.overview-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    overflow: hidden;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.overview-cover {
    overflow: hidden;
    min-height: 180px;
    border-radius: 16px;
}

.overview-card h2 {
    margin: 0 0 8px;
}

.overview-card strong {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--mountain-700);
}

.overview-card ul,
.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.overview-card li {
    margin: 4px 0;
}

.overview-card li a:hover {
    color: var(--mountain-600);
}

.rank-page-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    display: grid;
    grid-template-columns: 60px 150px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.rank-number {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    color: var(--white);
    background: var(--mountain-600);
    border-radius: 14px;
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb {
    height: 86px;
    overflow: hidden;
    border-radius: 12px;
}

.search-panel {
    padding-top: 34px;
}

.filter-box {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
    padding: 18px;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.filter-box label {
    display: grid;
    gap: 6px;
    color: var(--mist-600);
    font-size: 13px;
    font-weight: 700;
}

.detail-layout {
    padding-top: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--mist-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--mountain-700);
    font-weight: 700;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: var(--black);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--black);
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--mountain-600);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 55%);
    cursor: pointer;
}

.player-start span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    padding-left: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    box-shadow: var(--shadow-lg);
    font-size: 34px;
    transition: transform 0.2s ease;
}

.player-start:hover span {
    transform: scale(1.08);
}

.player-message {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 10px 14px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.68);
    border-radius: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 28px;
    margin-top: 28px;
}

.detail-poster {
    position: sticky;
    top: 100px;
    align-self: start;
    padding: 16px;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.detail-poster img {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
}

.full-button {
    width: 100%;
    margin-top: 14px;
}

.detail-content {
    padding: 26px;
    background: var(--white);
    border: 1px solid var(--mist-200);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
}

.detail-content .one-line {
    font-size: 18px;
    color: var(--ink-700);
}

.info-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.info-table div {
    padding: 12px 14px;
    background: var(--mist-50);
    border-radius: 14px;
}

.info-table dt {
    color: var(--mist-600);
    font-size: 12px;
    font-weight: 800;
}

.info-table dd {
    margin: 2px 0 0;
    color: var(--ink-900);
    font-weight: 700;
}

.detail-content h2 {
    margin: 30px 0 10px;
    font-size: 22px;
}

.site-footer {
    margin-top: 80px;
    color: var(--mist-300);
    background: var(--ink-900);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 48px;
}

.footer-brand {
    color: var(--white);
    margin-bottom: 12px;
}

.site-footer h3 {
    color: var(--white);
    margin: 0 0 14px;
}

.site-footer li {
    margin: 8px 0;
}

.site-footer a:hover {
    color: var(--mountain-400);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--mist-500);
}

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

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

    .three-cols,
    .four-cols,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .detail-poster {
        position: static;
        max-width: 360px;
    }
}

@media (max-width: 720px) {
    .header-inner {
        height: 64px;
    }

    .brand-text small {
        display: none;
    }

    .hero-carousel {
        min-height: 78vh;
    }

    .hero-content {
        bottom: 150px;
    }

    .hero-search {
        display: grid;
        border-radius: 22px;
    }

    .hero-arrow {
        display: none;
    }

    .section-block,
    .detail-layout,
    .page-hero {
        width: min(100% - 24px, 1180px);
        padding: 38px 0;
    }

    .page-hero {
        padding: 34px 22px;
    }

    .three-cols,
    .four-cols,
    .category-grid,
    .filter-box,
    .footer-grid,
    .info-table {
        grid-template-columns: 1fr;
    }

    .overview-card,
    .horizontal-card,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .overview-cover,
    .rank-thumb {
        min-height: 190px;
        height: auto;
    }

    .footer-bottom {
        flex-direction: column;
    }
}
