:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --gray-950: #111827;
    --gray-900: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --orange-500: #f97316;
    --white: #ffffff;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 42px rgba(15, 23, 42, 0.14);
    --shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.28);
}

.nav-inner {
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
    font-size: 15px;
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(90deg, var(--amber-400), var(--orange-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 600;
    font-size: 15px;
}

.nav-links a,
.mobile-panel a {
    transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.site-footer a:hover {
    color: var(--amber-400);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    padding: 8px 11px;
    border-radius: 10px;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 14px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-panel a {
    display: block;
    padding: 8px 0;
    color: var(--white);
}

.search-form {
    position: relative;
    margin-left: auto;
    display: flex;
    align-items: center;
    min-width: 260px;
}

.search-input {
    width: 100%;
    padding: 10px 72px 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 12px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.72);
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.search-submit {
    position: absolute;
    right: 4px;
    padding: 6px 12px;
    border: 0;
    border-radius: 9px;
    color: var(--slate-950);
    background: var(--amber-400);
    font-weight: 700;
    cursor: pointer;
}

.search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(390px, 88vw);
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
}

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

.search-results a {
    display: block;
    padding: 12px 14px;
    color: var(--gray-900);
    border-bottom: 1px solid var(--gray-100);
}

.search-results a:hover {
    background: #fff7ed;
    color: var(--amber-600);
}

.search-results strong {
    display: block;
    line-height: 1.35;
}

.search-results span {
    display: block;
    margin-top: 3px;
    color: var(--gray-500);
    font-size: 12px;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #000000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s 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(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    color: var(--white);
}

.hero-badge,
.page-kicker,
.category-chip,
.duration,
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-badge {
    padding: 6px 14px;
    background: var(--amber-500);
    color: var(--white);
    margin-bottom: 16px;
}

.hero-content h1 {
    max-width: 780px;
    margin: 0 0 16px;
    font-size: clamp(40px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 710px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: var(--amber-500);
}

.btn-primary:hover {
    background: var(--amber-600);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.45);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-500);
}

.section {
    padding: 56px 0;
}

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

.section-heading h2 {
    position: relative;
    margin: 0 0 5px;
    padding-left: 14px;
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.2;
}

.section-heading h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 5px;
    height: 32px;
    border-radius: 99px;
    background: var(--amber-500);
}

.section-heading p {
    margin: 0;
    color: var(--gray-600);
}

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

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

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

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

.horizontal-list,
.rank-grid {
    display: grid;
    gap: 16px;
}

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-card a {
    display: block;
    height: 100%;
}

.poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--slate-800);
}

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

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

.category-chip {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    color: var(--white);
    background: var(--amber-500);
    font-size: 12px;
}

.duration {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
}

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.88);
    color: var(--white);
    background: rgba(0, 0, 0, 0.58);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    padding: 16px;
}

.movie-card-large .card-body {
    padding: 24px;
}

.card-body h2,
.card-body h3 {
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.card-body h2 {
    font-size: 24px;
}

.card-body h3 {
    font-size: 18px;
}

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

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

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

.tag-row span {
    padding: 4px 9px;
    border-radius: 8px;
    color: var(--gray-600);
    background: var(--gray-100);
    font-size: 12px;
}

.movie-card-horizontal .horizontal-link {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0;
}

.movie-card-horizontal .poster-wide {
    height: 100%;
    min-height: 132px;
    aspect-ratio: auto;
}

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

.category-tile,
.category-cover {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    min-height: 180px;
    color: var(--white);
    background: var(--slate-900);
    box-shadow: var(--shadow-sm);
}

.category-tile img,
.category-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
    transition: transform 0.3s ease;
}

.category-tile::after,
.category-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.08));
}

.category-tile span,
.category-tile small,
.category-cover span {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
}

.category-tile span,
.category-cover span {
    bottom: 48px;
    font-size: 22px;
    font-weight: 800;
}

.category-tile small {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.4;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    padding: 76px 0;
    color: var(--white);
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.36), transparent 28%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.page-hero-light {
    color: var(--gray-900);
    background: linear-gradient(135deg, #fff7ed, #f8fafc);
}

.page-hero-dark {
    background: radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.32), transparent 30%), linear-gradient(135deg, #020617, #111827);
}

.page-kicker {
    padding: 5px 12px;
    margin-bottom: 14px;
    color: var(--slate-950);
    background: var(--amber-400);
    font-size: 13px;
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.12;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: inherit;
    opacity: 0.82;
    font-size: 18px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.filter-btn {
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--amber-600);
    background: #fff7ed;
    cursor: pointer;
    font-weight: 700;
}

.filter-btn.is-active,
.filter-btn:hover {
    color: var(--white);
    background: var(--amber-500);
}

.category-overview-card {
    grid-column: span 5;
    padding: 22px;
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-overview-card .category-cover {
    display: block;
    height: 220px;
    margin-bottom: 14px;
}

.category-overview-card p {
    margin: 0 0 18px;
    color: var(--gray-600);
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.rank-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 32px;
    height: 32px;
    color: var(--slate-950);
    background: var(--amber-400);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

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

.rank-row {
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.rank-row a {
    display: grid;
    grid-template-columns: 72px 190px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-row img {
    width: 190px;
    height: 108px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-number {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-size: 20px;
    font-weight: 900;
}

.top-rank .rank-number {
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
}

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 21px;
}

.rank-row p {
    margin: 0 0 8px;
    color: var(--gray-600);
}

.detail-main {
    background: #f8fafc;
}

.detail-container {
    padding: 26px 0 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 24px;
    color: var(--gray-500);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--amber-600);
}

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

.detail-content,
.detail-sidebar .sidebar-card,
.text-page {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-content {
    padding: 26px;
}

.detail-content h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.detail-intro {
    margin: 0 0 22px;
    color: var(--gray-600);
    font-size: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: var(--shadow-md);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    background: #000000;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.player-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
}

.player-start {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: var(--slate-950);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.42);
}

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

.detail-meta span {
    padding: 6px 11px;
    border-radius: 999px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-size: 13px;
    font-weight: 700;
}

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

.detail-section h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
    text-align: justify;
}

.detail-tags span {
    font-size: 14px;
}

.detail-sidebar {
    display: grid;
    gap: 18px;
}

.sidebar-poster {
    width: 100%;
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.sidebar-card {
    padding: 20px;
}

.sidebar-card h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.sidebar-card dl {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 9px 12px;
    margin: 0;
}

.sidebar-card dt {
    color: var(--gray-500);
}

.sidebar-card dd {
    margin: 0;
    color: var(--gray-900);
}

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

.side-link {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 10px;
    align-items: center;
}

.side-link img {
    width: 88px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
}

.side-link span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 700;
}

.text-page {
    margin: 48px auto;
    padding: 30px;
}

.text-page h2 {
    margin: 24px 0 10px;
    font-size: 25px;
}

.text-page h2:first-child {
    margin-top: 0;
}

.text-page p {
    margin: 0 0 12px;
    color: var(--gray-700);
    text-align: justify;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

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

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

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

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

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

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 18px 16px;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

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

    .search-form {
        min-width: 230px;
    }

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

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

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

@media (max-width: 760px) {
    .nav-inner {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 10px 0;
        gap: 12px;
    }

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

    .search-form {
        order: 3;
        flex: 1 0 100%;
        min-width: 0;
    }

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

    .hero-content {
        bottom: 78px;
    }

    .hero-control {
        display: none;
    }

    .section {
        padding: 38px 0;
    }

    .section-heading {
        display: block;
    }

    .movie-grid,
    .more-grid,
    .feature-grid,
    .compact-grid,
    .mini-grid,
    .two-columns,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal .horizontal-link,
    .rank-row a {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal .poster-wide,
    .rank-row img {
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .rank-number {
        position: absolute;
        margin: 12px;
        z-index: 2;
    }

    .rank-row {
        position: relative;
    }

    .detail-content {
        padding: 18px;
    }

    .player-start {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

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