:root {
    color-scheme: light;
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --cyan-500: #06b6d4;
    --cyan-600: #0891b2;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.10);
    --radius-lg: 18px;
    --radius-xl: 24px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-800);
    background: var(--slate-50);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.75);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-600));
    box-shadow: 0 10px 24px rgba(20, 184, 166, 0.28);
    font-size: 17px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-sub {
    margin-top: 5px;
    color: var(--slate-500);
    font-size: 12px;
}

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

.nav-link,
.mobile-link {
    border-radius: 12px;
    color: var(--slate-600);
    font-weight: 650;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link {
    padding: 10px 15px;
}

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

.menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 13px;
    background: var(--slate-100);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--slate-700);
}

.mobile-nav {
    display: none;
    padding-bottom: 16px;
    border-top: 1px solid var(--slate-200);
}

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

.mobile-link {
    padding: 12px 14px;
}

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

.hero-slider,
.hero-slide,
.hero-bg,
.hero-shade {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transition: opacity 900ms ease;
}

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05);
    background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.hero-shade {
    background:
        radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.40), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.20) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 5;
    min-height: 660px;
    display: flex;
    align-items: flex-end;
    padding: 112px 0 86px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--teal-100);
    background: rgba(20, 184, 166, 0.16);
    border: 1px solid rgba(94, 234, 212, 0.24);
    backdrop-filter: blur(10px);
    font-weight: 700;
    font-size: 14px;
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.055em;
}

.hero p {
    margin: 0;
    color: rgba(226, 232, 240, 0.92);
    font-size: clamp(17px, 2vw, 22px);
    max-width: 640px;
}

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

.hero-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

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

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-600));
    box-shadow: 0 14px 28px rgba(20, 184, 166, 0.30);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.btn-light {
    color: var(--teal-700);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(640px, 100%);
    margin-top: 28px;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-search input {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 14px;
    outline: 0;
    color: var(--white);
    background: rgba(15, 23, 42, 0.38);
    padding: 0 16px;
}

.hero-search input::placeholder {
    color: rgba(226, 232, 240, 0.74);
}

.hero-search button {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    position: absolute;
    z-index: 10;
    top: 50%;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    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.active {
    width: 34px;
    background: var(--white);
}

.page-hero {
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.28), transparent 34%),
        linear-gradient(135deg, var(--slate-800), var(--slate-900));
    color: var(--white);
    padding: 70px 0;
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(226, 232, 240, 0.88);
    font-size: 18px;
}

.main-section {
    padding: 54px 0;
}

.soft-section {
    padding: 54px 0;
    background: linear-gradient(135deg, var(--teal-50), #ecfeff);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section-head h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.section-head h2 span {
    color: var(--teal-600);
}

.section-more {
    color: var(--teal-700);
    font-weight: 800;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-card.is-hidden {
    display: none;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-poster {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.28), transparent 36%),
        linear-gradient(135deg, var(--slate-700), var(--slate-900));
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 54%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.84), transparent);
}

.score-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 3px 9px;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 850;
}

.score-badge {
    right: 12px;
    background: rgba(13, 148, 136, 0.92);
}

.rank-badge {
    left: 12px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 17px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--slate-800);
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link:hover h3 {
    color: var(--teal-700);
}

.card-body p {
    margin: 0 0 12px;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-500);
    font-size: 12px;
}

.card-meta span {
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--slate-100);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--teal-700);
    background: var(--teal-50);
    font-size: 12px;
    font-weight: 700;
}

.horizontal-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(260px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 18px;
    scroll-snap-type: x proximity;
}

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

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

.category-card {
    padding: 22px;
    min-height: 190px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 23px;
    line-height: 1.2;
}

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

.category-card span {
    margin-top: 18px;
    color: var(--teal-700);
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(140px, 0.5fr));
    gap: 12px;
    padding: 16px;
    margin-bottom: 26px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    background: var(--slate-50);
    color: var(--slate-700);
    outline: 0;
    padding: 0 13px;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.empty-state {
    display: none;
    padding: 32px;
    text-align: center;
    border-radius: var(--radius-xl);
    background: var(--white);
    color: var(--slate-500);
    box-shadow: var(--shadow-soft);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 142px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
    font-size: 26px;
    font-weight: 900;
    color: var(--teal-600);
    text-align: center;
}

.rank-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
}

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

.rank-main h2,
.rank-main h3 {
    margin: 0 0 8px;
    font-size: 22px;
    line-height: 1.25;
}

.rank-main p {
    margin: 0 0 10px;
    color: var(--slate-600);
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    color: var(--slate-500);
    font-size: 13px;
}

.detail-hero {
    padding: 54px 0;
    color: var(--white);
    background:
        radial-gradient(circle at top left, rgba(20, 184, 166, 0.32), transparent 36%),
        linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(226, 232, 240, 0.82);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--teal-100);
    font-weight: 750;
}

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

.detail-cover {
    overflow: hidden;
    border-radius: var(--radius-xl);
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.detail-info p {
    margin: 0;
    max-width: 820px;
    color: rgba(226, 232, 240, 0.92);
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.12);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.detail-main {
    padding: 54px 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--slate-900);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
    cursor: pointer;
}

.player-poster {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background:
        linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.24)),
        var(--poster-image);
    background-size: cover;
    background-position: center;
    transition: opacity 0.24s ease;
}

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

.play-button {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-600));
    box-shadow: 0 18px 38px rgba(20, 184, 166, 0.34);
    cursor: pointer;
    font-size: 30px;
    padding-left: 5px;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    margin-top: 30px;
}

.content-card {
    padding: 28px;
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.content-card h2 {
    margin: 0 0 14px;
    color: var(--slate-800);
    font-size: 25px;
    letter-spacing: -0.02em;
}

.content-card p {
    margin: 0;
    color: var(--slate-600);
}

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

.side-link {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease;
}

.side-link:hover {
    transform: translateY(-3px);
}

.side-link img {
    width: 88px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--slate-700), var(--slate-900));
}

.side-link h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.35;
}

.side-link span {
    color: var(--slate-500);
    font-size: 12px;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    gap: 32px;
    padding: 48px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    margin-bottom: 14px;
}

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

.site-footer p {
    margin: 0;
    color: var(--slate-400);
}

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

.site-footer a {
    color: var(--slate-400);
    transition: color 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--slate-500);
    font-size: 14px;
}

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

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

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

    .detail-cover {
        max-width: 360px;
    }

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

    .rank-item {
        grid-template-columns: 54px 120px minmax(0, 1fr);
    }

    .rank-item .btn-light {
        grid-column: 3;
        justify-self: start;
    }
}

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

    .desktop-nav {
        display: none;
    }

    .menu-button {
        display: flex;
    }

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

    .hero,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        padding: 92px 0 80px;
    }

    .hero-arrow {
        top: auto;
        bottom: 78px;
        width: 44px;
        height: 44px;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

    .hero-search {
        grid-template-columns: 1fr;
    }

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

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

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 42px 96px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-main h2,
    .rank-main h3 {
        font-size: 18px;
    }

    .rank-main p {
        display: none;
    }

    .detail-main,
    .main-section,
    .soft-section {
        padding: 38px 0;
    }

    .content-card {
        padding: 22px;
    }

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

    .footer-bottom {
        flex-direction: column;
        align-items: center;
    }
}
