:root {
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --cyan-500: #06b6d4;
    --cyan-700: #0e7490;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow-soft: 0 20px 45px rgba(15, 118, 110, 0.12);
    --shadow-card: 0 18px 34px rgba(15, 23, 42, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--slate-800);
    background: linear-gradient(135deg, var(--slate-50), #ecfeff 48%, #f8fafc);
    line-height: 1.6;
}

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

img,
video,
svg {
    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: 50;
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(20, 184, 166, 0.18);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-600), var(--cyan-500));
    box-shadow: 0 10px 22px rgba(13, 148, 136, 0.28);
    font-size: 13px;
}

.brand-name {
    font-size: 21px;
    background: linear-gradient(90deg, var(--teal-600), var(--cyan-700));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
    display: none;
}

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

.nav-link {
    padding: 9px 12px;
    white-space: nowrap;
    font-size: 14px;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--teal-50);
    color: var(--teal-700);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
    border-top: 1px solid var(--teal-100);
}

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

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: var(--slate-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg {
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    filter: saturate(1.05);
}

.hero-overlay {
    background:
        radial-gradient(circle at 20% 25%, rgba(20, 184, 166, 0.38), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.62) 52%, rgba(2, 6, 23, 0.28)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 72vh;
    display: flex;
    align-items: center;
    padding: 86px 0 110px;
}

.hero-copy {
    width: min(690px, 100%);
    color: var(--white);
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #5eead4;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

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

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

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    padding: 7px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

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

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

.primary-btn {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.3);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.hero-panel {
    position: absolute;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 34px;
    z-index: 3;
    width: min(380px, calc(100% - 48px));
    display: grid;
    gap: 14px;
}

.hero-search,
.hero-side-list,
.ranking-panel,
.side-panel,
.poster-panel,
.detail-panel,
.category-card,
.movie-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
}

.hero-search,
.hero-side-list {
    padding: 16px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(18px);
}

.hero-search label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.hero-search input,
.filter-bar input {
    width: 100%;
    border: 1px solid rgba(20, 184, 166, 0.25);
    outline: none;
    border-radius: 16px;
    padding: 13px 15px;
    color: var(--slate-800);
    background: rgba(255, 255, 255, 0.92);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input:focus,
.filter-bar input:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.search-results {
    display: none;
    max-height: 310px;
    overflow: auto;
    margin-top: 10px;
    border-radius: 16px;
    background: var(--white);
    color: var(--slate-800);
}

.search-results.is-open {
    display: block;
}

.search-result-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--slate-100);
}

.search-result-item img {
    width: 42px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--slate-100);
}

.search-result-item strong,
.side-movie strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-item em,
.side-movie em {
    display: block;
    color: var(--slate-500);
    font-style: normal;
    font-size: 12px;
}

.search-empty {
    padding: 14px;
    color: var(--slate-500);
}

.hero-side-list h2,
.side-panel h2,
.footer-links h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.side-movie {
    display: grid;
    grid-template-columns: auto 46px 1fr;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    color: inherit;
}

.side-movie img {
    width: 46px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.14);
}

.hero-side-list .side-movie {
    color: var(--white);
}

.hero-side-list .side-movie em {
    color: #99f6e4;
}

.side-rank {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
    font-size: 12px;
    font-weight: 900;
}

.hero-dots {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.section,
.page-main {
    padding: 64px 0;
}

.soft-section {
    background: rgba(255, 255, 255, 0.48);
}

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

.section-heading h2,
.page-hero h1,
.detail-panel h1 {
    margin: 0;
    color: var(--slate-900);
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-heading p,
.page-hero p {
    max-width: 680px;
    margin: 8px 0 0;
    color: var(--slate-600);
}

.section-kicker {
    color: var(--teal-600);
    font-size: 13px;
}

.section-link {
    min-height: 40px;
    color: var(--teal-700);
    background: var(--teal-50);
}

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

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

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

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

.movie-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--teal-100), #e0f2fe);
}

.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);
}

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent 45%);
    opacity: 0.86;
}

.movie-badge,
.movie-year,
.rank-number {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.movie-badge {
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    color: var(--teal-700);
    background: rgba(240, 253, 250, 0.92);
}

.movie-year {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.72);
}

.rank-number {
    left: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
}

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

.movie-title {
    display: block;
    color: var(--slate-900);
    font-weight: 900;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-title:hover {
    color: var(--teal-700);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
    color: var(--slate-500);
    font-size: 12px;
}

.movie-card-body p {
    min-height: 42px;
    margin: 9px 0 10px;
    color: var(--slate-600);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row span {
    padding: 4px 8px;
    color: var(--teal-700);
    background: var(--teal-50);
    font-size: 12px;
}

.home-layout {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    align-items: start;
}

.ranking-panel,
.detail-panel,
.side-panel,
.poster-panel,
.category-card {
    background: rgba(255, 255, 255, 0.92);
}

.ranking-panel {
    position: sticky;
    top: 92px;
    padding: 18px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--slate-900);
    font-weight: 900;
}

.panel-title a {
    color: var(--teal-700);
    font-size: 13px;
}

.ranking-panel .side-movie,
.side-panel .side-movie {
    grid-template-columns: auto 48px 1fr;
    border-bottom: 1px solid var(--slate-100);
}

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

.category-card {
    overflow: hidden;
}

.category-cover {
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    color: var(--white);
    background-position: center;
    background-size: cover;
    position: relative;
}

.category-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.12));
}

.category-cover span {
    position: relative;
    z-index: 1;
    font-size: 20px;
    font-weight: 900;
}

.category-card div:not(.category-cover) {
    padding: 16px;
}

.category-card h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
}

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

.page-hero {
    padding: 72px 0 56px;
    background:
        radial-gradient(circle at 18% 18%, rgba(20, 184, 166, 0.18), transparent 32%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(236, 254, 255, 0.92));
    border-bottom: 1px solid var(--teal-100);
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 58px);
}

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

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

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.filter-bar input {
    width: min(360px, 100%);
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: var(--slate-700);
    background: var(--white);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.filter-chip.is-active,
.filter-chip:hover {
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
}

.detail-main {
    padding: 34px 0 72px;
}

.detail-breadcrumb {
    margin-bottom: 24px;
}

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

.detail-primary {
    min-width: 0;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: 0 30px 70px rgba(2, 6, 23, 0.34);
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(20, 184, 166, 0.2), transparent 42%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.42));
}

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

.player-start {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--teal-500), var(--cyan-500));
    box-shadow: 0 20px 45px rgba(6, 182, 212, 0.35);
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.play-svg {
    width: 34px;
    height: 34px;
    margin: auto;
    fill: currentColor;
}

.detail-panel {
    margin-top: 22px;
    padding: clamp(22px, 4vw, 34px);
}

.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 12px;
}

.detail-meta-line span,
.detail-tags span {
    border-radius: 999px;
    padding: 6px 11px;
    color: var(--teal-700);
    background: var(--teal-50);
    font-size: 13px;
    font-weight: 800;
}

.detail-panel h1 {
    font-size: clamp(30px, 5vw, 46px);
}

.lead-text {
    margin: 14px 0 22px;
    color: var(--slate-600);
    font-size: 18px;
}

.detail-panel h2 {
    margin: 28px 0 10px;
    color: var(--slate-900);
    font-size: 22px;
}

.detail-panel p {
    margin: 0;
    color: var(--slate-700);
    font-size: 16px;
}

.detail-aside {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.poster-panel {
    overflow: hidden;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: var(--slate-100);
}

.poster-panel div,
.side-panel {
    padding: 16px;
}

.poster-panel strong {
    display: block;
    color: var(--slate-900);
    font-size: 20px;
}

.poster-panel span {
    color: var(--slate-500);
}

.related-section {
    padding-bottom: 0;
}

.site-footer {
    color: var(--slate-200);
    background: linear-gradient(135deg, var(--slate-900), #134e4a 52%, #164e63);
}

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

.footer-logo {
    color: var(--white);
    font-size: 20px;
}

.footer-brand p {
    max-width: 520px;
    color: #cbd5e1;
}

.footer-links {
    display: grid;
    gap: 8px;
    align-content: start;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #5eead4;
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(94, 234, 212, 0.18);
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .movie-grid,
    .featured-grid,
    .category-movie-grid,
    .ranking-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .ranking-panel,
    .detail-aside {
        position: static;
    }

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

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

    .nav-toggle {
        display: block;
    }

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

    .hero {
        min-height: 860px;
    }

    .hero-content {
        min-height: 540px;
        align-items: flex-start;
        padding-top: 74px;
    }

    .hero-panel {
        left: 16px;
        right: 16px;
        bottom: 26px;
        width: auto;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        margin-top: 16px;
    }

    .movie-grid,
    .featured-grid,
    .slim-grid,
    .category-movie-grid,
    .ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

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

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

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

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

    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .hero-side-list {
        display: none;
    }

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

    .movie-card-body p,
    .tag-row {
        display: none;
    }

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

    .player-start {
        width: 68px;
        height: 68px;
    }
}
