:root {
    --color-accent: #d97706;
    --color-accent-dark: #b45309;
    --color-accent-soft: #fff7ed;
    --color-bluestone: #0f172a;
    --color-bluestone-light: #1e293b;
    --color-stone: #57534e;
    --color-stone-soft: #f5f5f4;
    --shadow-card: 0 4px 18px rgba(15, 23, 42, 0.10);
    --shadow-large: 0 24px 60px rgba(15, 23, 42, 0.22);
    --radius-lg: 18px;
    --radius-md: 12px;
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #fafaf9;
    color: #1c1917;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.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.92);
    border-bottom: 1px solid rgba(231, 229, 228, 0.9);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--color-bluestone);
    white-space: nowrap;
}

.site-logo::before,
.footer-logo::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.12);
    vertical-align: 2px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    color: #334155;
    font-weight: 650;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
    color: var(--color-accent);
}

.header-search {
    display: flex;
    align-items: center;
    width: 280px;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    padding: 10px 12px 10px 16px;
    outline: none;
    color: #334155;
}

.header-search button,
.page-search button {
    border: 0;
    background: var(--color-accent);
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
}

.header-search button:hover,
.page-search button:hover,
.primary-btn:hover {
    background: var(--color-accent-dark);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    background: #fff;
    color: var(--color-bluestone);
    font-size: 20px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    font-weight: 700;
}

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

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

.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 {
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.32), transparent 30%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.10));
}

.hero-content {
    position: absolute;
    left: max(32px, calc((100vw - 1180px) / 2));
    top: 50%;
    width: min(680px, calc(100% - 64px));
    transform: translateY(-50%);
    color: #fff;
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-kicker::before,
.page-hero span::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #fbbf24;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 22px;
    color: #e7e5e4;
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #d6d3d1;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    padding: 4px 10px;
    font-size: 13px;
}

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

.hero-tags {
    margin: 22px 0 30px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.detail-genres a,
.feature-links a {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn,
.page-actions a,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.primary-btn {
    background: var(--color-accent);
    color: #fff;
    padding: 13px 28px;
    box-shadow: 0 12px 32px rgba(217, 119, 6, 0.34);
}

.ghost-btn,
.page-actions a {
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:hover,
.page-actions a:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(12px);
}

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

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 32px;
    background: #fbbf24;
}

.section-block {
    padding: 64px 0;
}

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

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.heading-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #fffbeb;
    color: var(--color-accent);
    font-weight: 900;
}

.section-heading h2 {
    margin: 0;
    color: var(--color-bluestone);
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.section-more {
    color: var(--color-accent);
}

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

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

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

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5.25;
    overflow: hidden;
    background: #e7e5e4;
}

.movie-card-compact .movie-cover {
    aspect-ratio: 16 / 10;
}

.movie-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.cover-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.78));
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-gradient {
    opacity: 1;
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    color: #fff;
    font-size: 22px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
    transition: all 0.25s ease;
}

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

.rating-badge,
.duration-badge {
    position: absolute;
    z-index: 2;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.70);
    color: #fff;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.rating-badge {
    top: 10px;
    right: 10px;
    color: #fbbf24;
}

.duration-badge {
    right: 10px;
    bottom: 10px;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    color: var(--color-bluestone);
    font-size: 17px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-info h3 a:hover {
    color: var(--color-accent);
}

.movie-info p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #57534e;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    gap: 6px;
    color: #78716c;
}

.movie-meta span {
    background: #f5f5f4;
    color: #57534e;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span,
.detail-genres a,
.feature-links a {
    background: #fff7ed;
    color: #b45309;
}

.highlight-panel,
.feature-panel,
.sticky-panel,
.detail-card,
.category-overview-card,
.category-tile {
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.highlight-panel {
    width: min(1180px, calc(100% - 32px));
    padding: 48px;
    background: linear-gradient(135deg, #fff7ed, #f8fafc);
}

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

.category-tile,
.category-overview-card {
    display: block;
    padding: 22px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.category-tile strong,
.category-overview-card h2 {
    color: var(--color-bluestone);
    font-size: 22px;
}

.category-tile p,
.category-overview-card p,
.feature-panel p,
.site-footer p {
    color: #57534e;
}

.category-tile div,
.overview-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.category-tile span,
.overview-samples span {
    border-radius: 999px;
    background: #f5f5f4;
    color: #57534e;
    padding: 5px 10px;
    font-size: 12px;
}

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

.wide-rank {
    grid-template-columns: minmax(0, 1fr) 360px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 44px 86px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 14px;
    background: #fff;
    padding: 10px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
}

.rank-num {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 999px;
    background: var(--color-accent);
    color: #fff;
    font-weight: 900;
}

.rank-item img {
    height: 58px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-text strong {
    color: var(--color-bluestone);
}

.rank-text em {
    color: #78716c;
    font-size: 13px;
    font-style: normal;
}

.feature-panel,
.sticky-panel {
    padding: 28px;
}

.feature-panel {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    color: #fff;
    box-shadow: var(--shadow-large);
}

.feature-panel h2,
.sticky-panel h2,
.detail-card h2 {
    margin: 0 0 14px;
}

.feature-panel p {
    color: #d6d3d1;
}

.page-hero {
    padding: 86px 0;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(217, 119, 6, 0.38), transparent 28%),
        linear-gradient(135deg, #0f172a, #1e293b 62%, #451a03);
}

.page-hero h1 {
    max-width: 820px;
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.page-hero p {
    max-width: 720px;
    margin: 0;
    color: #e7e5e4;
    font-size: 18px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.filter-bar,
.page-search {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
    border-radius: 18px;
    background: #fff;
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.filter-bar label {
    color: var(--color-bluestone);
    font-weight: 900;
}

.filter-bar input,
.page-search input {
    min-width: 0;
    flex: 1;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    padding: 12px 16px;
    outline: none;
}

.filter-bar input:focus,
.page-search input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.10);
}

.page-search {
    max-width: 720px;
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.page-search button {
    border-radius: 999px;
    padding-inline: 24px;
}

.search-status {
    margin-bottom: 24px;
    color: var(--color-bluestone);
    font-size: 18px;
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 28px;
    padding: 34px 0 68px;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #78716c;
    font-size: 14px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #000;
    box-shadow: var(--shadow-large);
    aspect-ratio: 16 / 9;
    outline: none;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #000;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: #000;
    color: #fff;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-layer img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.player-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(0, 0, 0, 0.68));
}

.player-layer span {
    position: relative;
    z-index: 2;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.96);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
}

.player-layer span::before {
    content: "";
    margin-left: 6px;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #fff;
}

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

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 18px;
    color: var(--color-bluestone);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-meta {
    color: #57534e;
    margin-bottom: 20px;
}

.detail-meta span {
    background: #f5f5f4;
    color: #57534e;
}

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

.content-block {
    border-top: 1px solid #e7e5e4;
    padding-top: 22px;
    margin-top: 22px;
}

.content-block h2,
.detail-card h2 {
    color: var(--color-bluestone);
}

.content-block p,
.detail-card p {
    color: #44403c;
    font-size: 16px;
}

.detail-tags span {
    background: #f5f5f4;
    color: #57534e;
}

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

.sticky-panel {
    position: sticky;
    top: 96px;
}

.side-related {
    display: grid;
    gap: 14px;
}

.related-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
}

.related-item strong,
.related-item em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-item strong {
    color: var(--color-bluestone);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item em {
    color: #78716c;
    font-size: 13px;
    font-style: normal;
    white-space: nowrap;
}

.related-item:hover strong {
    color: var(--color-accent);
}

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

.site-footer {
    background: #0f172a;
    color: #d6d3d1;
    padding: 52px 0 0;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
    color: #fff;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

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

.footer-bottom {
    margin-top: 42px;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    padding: 18px 0;
    color: #a8a29e;
    text-align: center;
}

.is-filter-hidden {
    display: none;
}

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

    .header-search {
        margin-left: auto;
    }

    .menu-toggle {
        display: block;
    }

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

    .split-layout,
    .wide-rank,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .sticky-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 64px;
    }

    .site-logo {
        font-size: 19px;
    }

    .header-search {
        display: none;
    }

    .hero {
        min-height: 620px;
        height: auto;
    }

    .hero-content {
        left: 20px;
        width: calc(100% - 40px);
    }

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

    .hero-arrow {
        display: none;
    }

    .section-block {
        padding: 42px 0;
    }

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

    .highlight-panel {
        padding: 30px 20px;
    }

    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .small-related-grid,
    .ranking-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .movie-info {
        padding: 13px;
    }

    .movie-info h3 {
        font-size: 15px;
    }

    .movie-info p {
        font-size: 13px;
    }

    .page-hero {
        padding: 56px 0;
    }

    .filter-bar,
    .page-search {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-card {
        padding: 22px;
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .category-grid,
    .category-overview-grid,
    .small-related-grid,
    .ranking-grid {
        grid-template-columns: 1fr;
    }

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

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

    .related-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }
}
