* {
    box-sizing: border-box;
}

:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --orange-50: #fff7ed;
    --white: #ffffff;
    --black: #000000;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.15);
    --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.14);
}

html {
    min-height: 100%;
    background: var(--gray-50);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.narrow-container {
    width: min(900px, calc(100% - 32px));
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
}

.main-nav {
    color: var(--white);
    background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
}

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

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--slate-900);
    background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
    border-radius: 999px;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
    font-size: 15px;
}

.desktop-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    white-space: nowrap;
}

.desktop-links a,
.mobile-panel a {
    color: rgba(255, 255, 255, 0.86);
    transition: color 0.2s ease;
}

.desktop-links a:hover,
.mobile-panel a:hover {
    color: var(--amber-300);
}

.nav-search,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search input {
    width: 210px;
    padding: 10px 42px 10px 16px;
    color: var(--white);
    background: rgba(51, 65, 85, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    outline: none;
}

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

.nav-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.72);
    background: transparent;
    border: 0;
    border-radius: 999px;
}

.nav-search button:hover {
    color: var(--amber-300);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border: 0;
    border-radius: 12px;
}

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

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.mobile-search {
    gap: 10px;
    margin-top: 4px;
}

.mobile-search input {
    min-width: 0;
    flex: 1;
    padding: 11px 14px;
    color: var(--white);
    background: rgba(51, 65, 85, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.mobile-search button,
.primary-button,
.ghost-button {
    border: 0;
    border-radius: 999px;
}

.mobile-search button {
    padding: 10px 16px;
    color: var(--white);
    background: var(--amber-500);
}

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

.hero-track,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 6s ease;
}

.hero-slide.is-active .hero-image {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 26%, rgba(245, 158, 11, 0.25), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.08) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 44%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    margin: 0 0 14px;
    color: var(--amber-300);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-copy p {
    width: min(640px, 100%);
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
}

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

.tag-row span {
    color: #92400e;
    background: var(--amber-50);
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: var(--white);
    background: var(--amber-500);
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.35);
}

.primary-button:hover {
    background: var(--amber-600);
    transform: translateY(-2px);
}

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

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.46);
    border: 0;
    border-radius: 999px;
    transform: translateY(-50%);
    font-size: 34px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.48);
    border: 0;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-section,
.content-section {
    padding: 72px 0;
}

.section-dark-tail {
    margin-top: -1px;
    background: linear-gradient(180deg, var(--slate-900), var(--gray-50));
}

.section-light {
    background: var(--white);
}

.section-warm {
    background: linear-gradient(135deg, var(--amber-50), var(--orange-50));
}

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

.section-title-row h2,
.list-heading {
    margin: 0;
    color: var(--gray-800);
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
}

.section-title-row a {
    color: var(--amber-600);
    font-weight: 700;
}

.title-on-dark h2 {
    color: var(--white);
}

.title-on-dark a {
    color: var(--amber-300);
}

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

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

.movie-card {
    position: relative;
    display: block;
    min-height: 220px;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-800);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card-large {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 462px;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
}

.card-poster,
.card-poster img,
.card-shade {
    position: absolute;
    inset: 0;
}

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

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

.card-shade {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(0, 0, 0, 0.86));
}

.card-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    gap: 8px;
    padding: 18px;
}

.card-info strong {
    font-size: 19px;
    line-height: 1.25;
}

.movie-card-large .card-info strong {
    font-size: 28px;
}

.card-line {
    display: -webkit-box;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.horizontal-wrap {
    position: relative;
}

.horizontal-list {
    display: grid;
    grid-auto-columns: 290px;
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 22px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.horizontal-list::-webkit-scrollbar {
    display: none;
}

.horizontal-wrap > button {
    position: absolute;
    top: 45%;
    z-index: 3;
    width: 42px;
    height: 42px;
    color: var(--gray-800);
    background: rgba(255, 255, 255, 0.92);
    border: 0;
    border-radius: 999px;
    box-shadow: var(--shadow-card);
    transform: translateY(-50%);
    font-size: 28px;
}

.horizontal-wrap > button:first-of-type {
    left: -8px;
}

.horizontal-wrap > button:last-of-type {
    right: -8px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 40px;
    align-items: start;
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 120px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-card);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
    border-radius: 999px;
    font-weight: 800;
}

.rank-row img {
    width: 120px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
}

.rank-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rank-content strong {
    color: var(--gray-800);
    font-size: 17px;
}

.rank-content span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-600);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-content em {
    color: var(--gray-500);
    font-size: 13px;
    font-style: normal;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    background: var(--slate-900);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.category-tile {
    min-height: 154px;
}

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

.category-tile:hover img,
.category-card:hover img {
    transform: scale(1.06);
    opacity: 0.72;
}

.category-tile span {
    position: absolute;
    inset: auto 0 0 0;
    display: grid;
    gap: 5px;
    padding: 18px;
    color: var(--white);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.category-tile strong,
.category-card strong {
    font-size: 20px;
}

.category-tile em,
.category-card em,
.category-card small {
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-style: normal;
}

.page-main {
    min-height: 60vh;
    background: var(--gray-50);
}

.page-hero {
    padding: 70px 0;
    color: var(--white);
    background:
        radial-gradient(circle at 78% 16%, rgba(245, 158, 11, 0.24), transparent 30%),
        linear-gradient(90deg, var(--slate-900), var(--slate-800));
}

.page-hero h1 {
    width: min(860px, 100%);
    margin: 0;
    font-size: clamp(36px, 6vw, 56px);
    line-height: 1.1;
}

.page-hero p:last-child {
    width: min(780px, 100%);
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
}

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

.category-card {
    min-height: 260px;
}

.category-card-body {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 8px;
    padding: 24px;
    color: var(--white);
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
}

.ranking-featured {
    padding-bottom: 30px;
}

.rank-list-large .rank-row {
    grid-template-columns: auto 160px minmax(0, 1fr);
}

.rank-list-large .rank-row img {
    width: 160px;
    height: 96px;
}

.hero-search {
    display: flex;
    width: min(720px, 100%);
    gap: 12px;
    margin-top: 28px;
}

.hero-search input {
    min-width: 0;
    flex: 1;
    padding: 16px 18px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    outline: none;
}

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

.hero-search button {
    padding: 0 26px;
    color: var(--white);
    background: var(--amber-500);
    border: 0;
    border-radius: 999px;
    font-weight: 700;
}

.player-stage {
    padding: 34px 0 42px;
    background: var(--slate-950);
}

.player-container {
    width: min(1030px, calc(100% - 32px));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--black);
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.38);
}

.main-video,
.player-cover,
.player-cover img,
.player-cover-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.main-video {
    object-fit: contain;
    background: var(--black);
}

.player-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    color: var(--white);
    background: var(--black);
    border: 0;
    z-index: 3;
}

.player-shell.is-playing .player-cover {
    display: none;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.72;
}

.player-cover-shade {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2), rgba(0, 0, 0, 0.78));
}

.big-play {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    color: var(--slate-950);
    background: var(--amber-500);
    border-radius: 999px;
    box-shadow: 0 18px 38px rgba(245, 158, 11, 0.34);
    font-size: 40px;
}

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

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

.detail-card,
.side-panel {
    background: var(--white);
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.detail-card {
    padding: clamp(24px, 5vw, 42px);
}

.detail-card h1 {
    margin: 0 0 18px;
    color: var(--gray-800);
    font-size: clamp(32px, 5vw, 48px);
    line-height: 1.15;
}

.detail-card h2,
.side-panel h2 {
    margin: 34px 0 14px;
    color: var(--gray-800);
    font-size: 24px;
}

.detail-card p {
    color: var(--gray-700);
    font-size: 17px;
    line-height: 1.88;
}

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

.detail-meta span,
.detail-meta a {
    padding: 6px 12px;
    color: var(--gray-700);
    background: var(--gray-100);
    border-radius: 999px;
    font-size: 14px;
}

.detail-meta a {
    color: #92400e;
    background: var(--amber-100);
}

.one-line {
    padding: 18px;
    background: var(--amber-50);
    border-left: 5px solid var(--amber-500);
    border-radius: 14px;
}

.detail-tags {
    margin: 18px 0 20px;
}

.info-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.info-list dt {
    color: var(--gray-500);
}

.info-list dd {
    margin: 0;
    color: var(--gray-800);
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.side-panel h2 {
    margin-top: 0;
}

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

.side-list .rank-row {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 0;
    box-shadow: none;
    border: 1px solid var(--gray-200);
}

.side-list .rank-row img {
    width: 92px;
    height: 92px;
    border-radius: 14px 0 0 14px;
}

.side-list .rank-number {
    display: none;
}

.related-section {
    padding-top: 20px;
}

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

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

.footer-brand {
    color: var(--white);
}

.site-footer p {
    max-width: 520px;
    margin: 18px 0 0;
}

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

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a:hover {
    color: var(--amber-300);
}

.footer-bottom {
    padding: 16px;
    color: rgba(255, 255, 255, 0.58);
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 980px) {
    .movie-grid,
    .full-grid,
    .category-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .side-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .container,
    .player-container,
    .narrow-container {
        width: min(100% - 22px, 1180px);
    }

    .nav-search {
        display: none;
    }

    .brand {
        font-size: 17px;
    }

    .hero {
        min-height: 620px;
        height: 76vh;
    }

    .hero-copy {
        padding: 80px 0 40px;
    }

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

    .hero-arrow {
        display: none;
    }

    .home-section,
    .content-section {
        padding: 46px 0;
    }

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

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

    .movie-card,
    .movie-card-large {
        min-height: 240px;
        grid-column: auto;
        grid-row: auto;
    }

    .horizontal-list {
        grid-auto-columns: 78vw;
    }

    .rank-row,
    .rank-list-large .rank-row {
        grid-template-columns: 1fr;
    }

    .rank-row img,
    .rank-list-large .rank-row img {
        width: 100%;
        height: 180px;
    }

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

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

    .hero-search button {
        min-height: 48px;
    }

    .detail-card {
        padding: 22px;
    }

    .info-list div {
        grid-template-columns: 1fr;
    }
}
