:root {
    --blue-900: #172554;
    --blue-800: #1e40af;
    --blue-700: #1d4ed8;
    --blue-600: #2563eb;
    --cyan-400: #22d3ee;
    --violet-600: #7c3aed;
    --orange-500: #f97316;
    --green-600: #16a34a;
    --gray-950: #020617;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --soft-shadow: 0 12px 30px rgba(37, 99, 235, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--gray-900);
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 28%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: var(--white);
    background: linear-gradient(90deg, var(--blue-600), var(--blue-700), var(--blue-900));
    box-shadow: 0 14px 30px rgba(30, 64, 175, 0.28);
}

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

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

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: var(--blue-800);
    background: linear-gradient(135deg, #ffffff, #bfdbfe);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

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

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

.desktop-nav a,
.mobile-nav a {
    opacity: 0.92;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover {
    color: #dbeafe;
    opacity: 1;
}

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

.menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    border-radius: 99px;
    background: var(--white);
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(15, 23, 42, 0.22);
}

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

.mobile-nav-inner {
    display: grid;
    gap: 12px;
    padding: 16px 0 20px;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.74) 42%, rgba(37, 99, 235, 0.22) 100%), var(--hero-image);
    background-position: center;
    background-size: cover;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 26%, rgba(34, 211, 238, 0.28), transparent 32%), radial-gradient(circle at 12% 80%, rgba(124, 58, 237, 0.32), transparent 34%);
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 56px;
    padding: 86px 0 96px;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #bfdbfe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(42px, 6.2vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-list,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

.hero .hero-tags span {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

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

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

.primary-button {
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--violet-600));
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(12px);
}

.hero-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4.2;
    border-radius: 30px;
    box-shadow: 0 24px 65px rgba(2, 6, 23, 0.48);
    transform: rotate(2deg);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 6, 23, 0.46);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(37, 99, 235, 0.72);
    transform: translateY(-50%) scale(1.05);
}

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

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

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

.hero-dots button {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
    width: 36px;
    background: var(--white);
}

.section {
    padding: 64px 0;
}

.section-soft {
    background: linear-gradient(135deg, #ecfdf5, #eff6ff);
}

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

.section-heading h2,
.search-panel h2,
.content-card h2 {
    margin: 0;
    color: var(--gray-950);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
}

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

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--soft-shadow);
    backdrop-filter: blur(16px);
}

.search-panel--sticky {
    position: sticky;
    top: 84px;
    z-index: 20;
}

.search-panel p {
    margin: 6px 0 0;
    color: var(--gray-600);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    background: var(--gray-100);
    box-shadow: inset 0 0 0 1px #dbeafe;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--gray-900);
}

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

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

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

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.movie-card--wide .movie-poster,
.movie-card--small .movie-poster,
.movie-card--rank .movie-poster {
    aspect-ratio: 3 / 4;
}

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

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

.poster-play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-size: 34px;
    opacity: 0;
    background: rgba(15, 23, 42, 0.28);
    transition: opacity 0.24s ease;
}

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

.rank-num {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), #ef4444);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--gray-950);
    font-size: 19px;
    line-height: 1.28;
}

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

.movie-strip {
    display: grid;
    grid-auto-columns: minmax(230px, 270px);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 2px 18px;
    scroll-snap-type: x proximity;
}

.movie-strip .movie-card {
    scroll-snap-align: start;
}

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

.category-tile {
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    color: var(--white);
    background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.88)), var(--tile-image);
    background-position: center;
    background-size: cover;
    box-shadow: var(--soft-shadow);
}

.category-tile span {
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    margin-top: 8px;
    color: #dbeafe;
    font-size: 13px;
}

.two-column {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: 34px;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.ranking-list li + li {
    border-top: 1px solid #e2e8f0;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px 18px;
}

.rank-index {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue-600), var(--violet-600));
    font-weight: 900;
}

.rank-title {
    color: var(--gray-950);
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.sub-hero,
.detail-hero {
    color: var(--white);
    background: radial-gradient(circle at 18% 12%, rgba(34, 211, 238, 0.38), transparent 34%), linear-gradient(135deg, var(--blue-700), var(--blue-900) 54%, var(--gray-950));
}

.sub-hero .container {
    padding: 78px 0;
}

.sub-hero h1,
.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(40px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.sub-hero p,
.detail-line {
    max-width: 820px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    color: #dbeafe;
    font-size: 14px;
    font-weight: 750;
}

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

.category-card {
    min-height: 290px;
    overflow: hidden;
    border-radius: 28px;
    background: var(--gray-900);
    box-shadow: var(--shadow);
}

.category-card a {
    position: relative;
    display: flex;
    min-height: 290px;
    align-items: end;
    padding: 28px;
    color: var(--white);
    background-image: linear-gradient(135deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.88)), var(--tile-image);
    background-position: center;
    background-size: cover;
}

.category-card-body {
    position: relative;
    z-index: 2;
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 34px;
}

.category-card p {
    max-width: 520px;
    color: #dbeafe;
}

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.category-preview span {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 750;
}

.detail-hero .container {
    padding: 42px 0 68px;
}

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

.detail-cover {
    overflow: hidden;
    aspect-ratio: 3 / 4.2;
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.38);
}

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

.detail-meta {
    margin: 22px 0 18px;
}

.tag-list--detail span {
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: var(--gray-950);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.32);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.player-veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: var(--white);
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.player-veil.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    color: var(--blue-700);
    background: rgba(255, 255, 255, 0.94);
    font-size: 30px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
}

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

.content-card,
.prev-next {
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.content-card {
    padding: 28px;
}

.content-card p {
    margin: 14px 0 0;
    color: var(--gray-700);
    font-size: 16px;
}

.prev-next {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    overflow: hidden;
}

.prev-next a {
    padding: 18px 22px;
    color: var(--blue-800);
    background: #eff6ff;
    font-weight: 800;
}

.narrow-section {
    max-width: 980px;
}

.site-footer {
    margin-top: 42px;
    color: #cbd5e1;
    background: var(--gray-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

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

.site-footer p {
    margin: 0;
}

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

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

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

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

.footer-bottom p {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
}

.is-hidden-by-search {
    display: none !important;
}

@media (max-width: 1080px) {
    .desktop-nav {
        gap: 14px;
        font-size: 14px;
    }

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

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

    .two-column,
    .detail-text {
        grid-template-columns: 1fr;
    }
}

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

    .menu-button {
        display: block;
    }

    .hero {
        min-height: 760px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 64px 0 90px;
    }

    .hero-cover {
        width: min(260px, 74vw);
        margin: 0 auto;
    }

    .search-panel,
    .detail-layout,
    .footer-grid,
    .prev-next {
        grid-template-columns: 1fr;
    }

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

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

    .detail-cover {
        width: min(320px, 86vw);
        margin: 0 auto;
    }
}

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

    .brand-name {
        font-size: 17px;
    }

    .hero-arrow {
        display: none;
    }

    .section {
        padding: 46px 0;
    }

    .movie-grid,
    .movie-grid--compact,
    .category-grid,
    .category-card-grid {
        grid-template-columns: 1fr;
    }

    .ranking-list a {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .rank-meta {
        grid-column: 2;
    }
}
