:root {
    color-scheme: light;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-100: #f1f5f9;
    --amber-500: #f59e0b;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --red-500: #ef4444;
    --blue-500: #3b82f6;
    --cyan-500: #06b6d4;
    --white: #ffffff;
    --shadow-soft: 0 18px 42px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 24px 70px rgba(15, 23, 42, 0.24);
    --radius-lg: 18px;
    --radius-xl: 26px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #111827;
    background: linear-gradient(135deg, #f8fafc 0%, #fff7ed 48%, #fffbeb 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 12px 34px rgba(2, 6, 23, 0.3);
}

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

.site-header-main {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 22px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.logo-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #fff7ed;
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.34);
}

.logo-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #fb923c, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-subtitle {
    display: block;
    margin-top: 2px;
    color: #cbd5e1;
    font-size: 12px;
}

.site-search {
    position: relative;
    flex: 1 1 420px;
    max-width: 460px;
    margin-left: auto;
}

.site-search input {
    width: 100%;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 0 122px 0 18px;
    color: var(--white);
    background: rgba(51, 65, 85, 0.72);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search input:focus {
    border-color: rgba(251, 146, 60, 0.85);
    background: rgba(30, 41, 59, 0.94);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

.site-search button {
    position: absolute;
    top: 5px;
    right: 5px;
    height: 32px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

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

.site-nav a {
    color: #e2e8f0;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fb923c;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    color: var(--white);
    cursor: pointer;
    background: rgba(51, 65, 85, 0.78);
}

.site-header-sub {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 10px 0 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.site-header-sub a {
    flex: 0 0 auto;
    color: #cbd5e1;
    font-size: 14px;
    transition: color 0.2s ease;
}

.site-header-sub a:hover {
    color: #fdba74;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-panel .site-search {
    max-width: none;
    margin: 0 0 14px;
}

.mobile-links {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.95s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.08) 100%);
}

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

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

.hero-badge,
.card-badge,
.meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

.hero-badge {
    margin-bottom: 18px;
    padding: 7px 16px;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.hero-description {
    max-width: 680px;
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.meta-pill {
    padding: 8px 12px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.16);
}

.hero-actions,
.section-heading,
.card-meta,
.detail-meta,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.button-primary,
.button-ghost,
.button-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.26);
}

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

.button-ghost {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.button-dark {
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
}

.hero-dots {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 32px;
    z-index: 3;
    display: flex;
    gap: 9px;
}

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

.hero-dot.is-active {
    width: 36px;
    background: #ffffff;
}

.main-content {
    padding: 58px 0 0;
}

.section {
    margin-bottom: 66px;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 26px;
}

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.25);
}

.section h2,
.page-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.03em;
}

.section-link {
    color: var(--orange-600);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #111827;
}

.poster.tall {
    aspect-ratio: 2 / 3;
}

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

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--white);
    font-size: 12px;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

.movie-card h3,
.related-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.card-desc {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    justify-content: space-between;
    color: #64748b;
    font-size: 13px;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.horizontal-card .text {
    padding: 16px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    transition: transform 0.35s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.category-card .category-inner {
    position: relative;
    z-index: 2;
    display: flex;
    height: 100%;
    min-height: 220px;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #e2e8f0;
    line-height: 1.65;
}

.ranking-panel {
    overflow: hidden;
    border-radius: var(--radius-xl);
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-800), var(--slate-900));
    box-shadow: var(--shadow-strong);
}

.ranking-panel-inner {
    padding: 34px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 90px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.14);
}

.rank-num {
    color: #fbbf24;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 90px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 7px;
    font-size: 17px;
}

.rank-item p {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
}

.page-hero {
    padding: 70px 0;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.38), transparent 32%), linear-gradient(90deg, var(--slate-800), var(--slate-900));
}

.page-hero p {
    max-width: 780px;
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #fdba74;
    font-size: 14px;
}

.filter-panel {
    display: grid;
    gap: 16px;
    margin: -28px 0 34px;
    border-radius: var(--radius-xl);
    padding: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.filter-row {
    justify-content: space-between;
}

.filter-panel input,
.filter-panel select {
    min-height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.13);
}

.watch-hero {
    padding: 42px 0 64px;
    color: var(--white);
    background: radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.28), transparent 30%), linear-gradient(135deg, var(--slate-950), var(--slate-900));
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #000000;
    box-shadow: var(--shadow-strong);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.22));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-stack {
    display: grid;
    gap: 14px;
    justify-items: center;
    padding: 24px;
    text-align: center;
}

.play-orb {
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 20px 46px rgba(249, 115, 22, 0.45);
}

.play-stack strong {
    font-size: 24px;
}

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

.detail-card h1,
.detail-card h2 {
    margin: 0 0 14px;
}

.detail-card p {
    color: #475569;
    line-height: 1.9;
}

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

.detail-meta span,
.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 12px;
    color: #334155;
    background: #f1f5f9;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

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

.related-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.related-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.search-results-meta {
    margin: 0 0 22px;
    color: #64748b;
}

.site-footer {
    margin-top: 70px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), #000000);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 30px;
    padding: 44px 0;
}

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

.footer-grid p,
.footer-grid a {
    color: #94a3b8;
    line-height: 1.8;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    font-size: 14px;
}

.hidden-card {
    display: none !important;
}

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

    .horizontal-list,
    .ranking-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .watch-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .site-nav,
    .site-header-main > .site-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-header-main {
        min-height: 66px;
    }

    .site-header-sub {
        padding-bottom: 10px;
    }

    .hero,
    .hero-content {
        min-height: 76vh;
    }

    .hero-content {
        padding: 88px 0 72px;
    }

    .hero-dots {
        right: 20px;
        bottom: 20px;
    }

    .movie-grid,
    .movie-grid.compact,
    .movie-grid.three,
    .horizontal-list,
    .related-grid,
    .ranking-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 130px minmax(0, 1fr);
    }

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

    .rank-item img {
        width: 74px;
        height: 62px;
    }
}

@media (max-width: 520px) {
    .site-header-main,
    .site-header-sub,
    .container,
    .mobile-panel {
        width: min(100% - 24px, 1180px);
    }

    .logo-title {
        font-size: 15px;
    }

    .logo-subtitle {
        font-size: 11px;
    }

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

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

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

    .category-strip {
        grid-template-columns: 1fr;
    }

    .filter-row {
        align-items: stretch;
        flex-direction: column;
    }

    .horizontal-card {
        grid-template-columns: 1fr;
    }

    .horizontal-card img {
        height: 190px;
    }
}
