:root {
    --color-ocean-50: #f0f9ff;
    --color-ocean-100: #e0f2fe;
    --color-ocean-400: #38bdf8;
    --color-ocean-500: #0ea5e9;
    --color-ocean-600: #0284c7;
    --color-ocean-700: #0369a1;
    --color-island-500: #14b8a6;
    --color-island-600: #0d9488;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.16);
    --radius-2xl: 1rem;
    --container: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-soft);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

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

.brand-mark {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-ocean-600), var(--color-island-600));
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.25);
}

.brand-text {
    font-size: 1.45rem;
    line-height: 1;
    background: linear-gradient(90deg, var(--color-ocean-600), var(--color-island-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: var(--color-gray-600);
    font-size: 0.95rem;
    font-weight: 700;
    transition: color 180ms ease, background 180ms ease;
}

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

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.mobile-menu-button:hover {
    background: var(--color-gray-100);
}

.mobile-menu-button span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--color-gray-700);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 12px 16px 18px;
    border-top: 1px solid var(--color-gray-100);
    background: #fff;
}

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

.mobile-nav .nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
}

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

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 700ms ease, transform 900ms ease;
    pointer-events: none;
}

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.12)),
        linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 45%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 92%);
    color: #fff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--color-ocean-600);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.page-hero .eyebrow {
    color: var(--color-ocean-100);
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero-copy p {
    width: min(620px, 100%);
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1rem, 2vw, 1.2rem);
}

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

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--color-ocean-700);
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    backdrop-filter: blur(6px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--color-ocean-600), var(--color-island-600));
    box-shadow: 0 14px 28px rgba(2, 132, 199, 0.24);
}

.btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-controls {
    position: absolute;
    right: 32px;
    bottom: 34px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-controls button,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    color: #fff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 2rem;
    line-height: 1;
}

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

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

.hero-dot.active {
    width: 28px;
    background: #fff;
}

.section {
    padding: 64px 0;
}

.alt-section {
    background: #fff;
}

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

.compact-heading {
    align-items: center;
    margin-bottom: 18px;
}

.section-heading h2,
.page-hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.text-link {
    color: var(--color-ocean-600);
    font-weight: 800;
}

.two-column-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
}

.movie-strip {
    display: grid;
    grid-auto-columns: 240px;
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 22px;
    scroll-snap-type: x proximity;
}

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

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

.movie-card {
    position: relative;
    min-width: 0;
    scroll-snap-align: start;
}

.movie-card[hidden] {
    display: none;
}

.movie-card a {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    background: var(--color-gray-200);
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.movie-card a:hover img {
    transform: scale(1.1);
}

.card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.22) 58%, transparent);
}

.card-content {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    color: #fff;
}

.card-content strong {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 1.1rem;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-content em {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.86rem;
    font-style: normal;
}

.card-content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-play {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #fff;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.82);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.movie-card a:hover .card-play {
    opacity: 1;
    transform: translateY(0);
}

.rank-card,
.prose-card,
.info-card,
.side-card,
.poster-card,
.category-card,
.filter-panel {
    border-radius: var(--radius-2xl);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.rank-card {
    padding: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 64px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 180ms ease;
}

.rank-item:hover {
    background: var(--color-ocean-50);
}

.rank-number {
    color: var(--color-ocean-600);
    font-weight: 900;
}

.rank-item img {
    width: 64px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
}

.rank-item strong,
.rank-item em {
    display: block;
}

.rank-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item em {
    color: var(--color-gray-500);
    font-size: 0.82rem;
    font-style: normal;
}

.search-entrance {
    background: linear-gradient(135deg, var(--color-ocean-600), var(--color-island-600));
}

.search-box-large {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    color: #fff;
}

.search-box-large .eyebrow,
.search-box-large p {
    color: rgba(255, 255, 255, 0.8);
}

.search-box-large h2,
.search-box-large p {
    margin: 0;
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.75), transparent 35%),
        linear-gradient(135deg, #082f49, #0f172a 70%);
}

.compact-page-hero {
    padding: 82px 0;
}

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

.hero-meta {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.76);
    font-weight: 700;
}

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

.category-card {
    overflow: hidden;
}

.category-card-main {
    display: block;
    min-height: 210px;
    padding: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--color-ocean-600), var(--color-island-600));
}

.category-card-main h2,
.category-card-main p {
    margin: 0;
}

.category-card-main h2 {
    font-size: 2rem;
}

.category-card-main p {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.84);
}

.category-samples {
    display: grid;
    gap: 1px;
    background: var(--color-gray-100);
}

.category-samples a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 18px;
    background: #fff;
    color: var(--color-gray-700);
    font-weight: 700;
}

.category-samples span {
    color: var(--color-gray-500);
    font-weight: 500;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(150px, 0.7fr)) auto;
    gap: 16px;
    align-items: end;
    margin-bottom: 28px;
    padding: 20px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: var(--color-gray-600);
    font-size: 0.86rem;
    font-weight: 800;
}

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

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

.filter-count {
    min-width: 92px;
    padding: 11px 12px;
    color: var(--color-ocean-700);
    border-radius: 12px;
    background: var(--color-ocean-50);
    font-weight: 900;
    text-align: center;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 18px;
    border-radius: var(--radius-2xl);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
}

.ranking-poster span {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.9);
    font-weight: 900;
}

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

.ranking-title {
    color: var(--color-gray-900);
    font-size: 1.45rem;
    font-weight: 900;
}

.ranking-meta {
    color: var(--color-gray-500);
    font-size: 0.95rem;
}

.player-section {
    padding: 18px 0 0;
    background: #020617;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    padding: 0 0 16px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.94rem;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 24px 24px 0 0;
    background: #000;
}

.video-player video {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #fff;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent);
    cursor: pointer;
}

.player-button span {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-ocean-600), var(--color-island-600));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    font-size: 2rem;
}

.player-button strong {
    font-size: 1.05rem;
}

.video-player.playing .player-button {
    display: none;
}

.player-status {
    position: absolute;
    right: 16px;
    bottom: 14px;
    z-index: 3;
    padding: 6px 10px;
    color: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    font-size: 0.82rem;
}

.detail-section {
    padding-top: 44px;
}

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

.detail-header,
.info-card,
.side-card,
.poster-card {
    padding: 26px;
}

.detail-header {
    margin-bottom: 20px;
    border-radius: var(--radius-2xl);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.detail-header h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--color-gray-600);
}

.detail-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--color-gray-100);
}

.info-card {
    margin-bottom: 20px;
}

.info-card h2,
.side-card h2 {
    margin: 0 0 12px;
}

.info-card p {
    margin: 0;
    color: var(--color-gray-700);
    font-size: 1.02rem;
}

.detail-aside {
    display: grid;
    align-content: start;
    gap: 20px;
}

.poster-card {
    display: grid;
    gap: 18px;
}

.poster-card img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.side-card dl {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 10px 12px;
    margin: 0;
}

.side-card dt {
    color: var(--color-gray-500);
    font-weight: 800;
}

.side-card dd {
    margin: 0;
    color: var(--color-gray-800);
}

.prose-card {
    padding: 34px;
    color: var(--color-gray-700);
    font-size: 1.02rem;
}

.prose-card h2 {
    color: var(--color-gray-900);
}

.prose-card li + li {
    margin-top: 8px;
}

.site-footer {
    color: var(--color-gray-300);
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 52px 0 34px;
}

.footer-brand {
    color: #fff;
    font-size: 1.4rem;
}

.footer-about p {
    max-width: 520px;
    color: var(--color-gray-300);
}

.site-footer h3 {
    margin-top: 0;
    color: #fff;
}

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

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

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

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

@media (max-width: 1024px) {
    .two-column-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

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

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

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero-copy h1 {
        font-size: 3rem;
    }

    .hero-controls {
        right: 18px;
        bottom: 22px;
    }

    .hero-dots {
        left: 24px;
        bottom: 34px;
        transform: none;
    }

    .section {
        padding: 46px 0;
    }

    .section-heading,
    .search-box-large {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .category-grid,
    .footer-grid,
    .filter-panel,
    .ranking-row {
        grid-template-columns: 1fr;
    }

    .ranking-poster {
        width: 170px;
    }

    .detail-header,
    .info-card,
    .side-card,
    .poster-card,
    .prose-card {
        padding: 20px;
    }
}

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

    .brand-text {
        font-size: 1.18rem;
    }

    .hero-copy h1 {
        font-size: 2.4rem;
    }

    .movie-strip {
        grid-auto-columns: 210px;
    }

    .movie-card a {
        border-radius: 14px;
    }

    .card-content {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .card-content strong {
        font-size: 0.98rem;
    }
}
