:root {
    color-scheme: light;
    --primary: #b6790d;
    --primary-bright: #d89410;
    --accent: #f95c16;
    --accent-deep: #ea420c;
    --secondary: #353d59;
    --secondary-deep: #2f344c;
    --surface: #ffffff;
    --surface-soft: #fff8ee;
    --surface-cool: #f5f7fa;
    --text: #162033;
    --muted: #667085;
    --line: #e6e8ee;
    --shadow: 0 24px 60px rgba(47, 52, 76, 0.16);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(135deg, #fff7ec 0%, #f5f7fa 42%, #ffffff 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    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;
    border-bottom: 1px solid rgba(230, 232, 238, 0.88);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-logo::before,
.footer-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--primary-bright), var(--accent));
    box-shadow: 0 12px 30px rgba(249, 92, 22, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #475467;
    font-size: 15px;
    font-weight: 700;
}

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

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

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff3e4;
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--secondary);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--secondary-deep);
}

.hero-track,
.hero-slide {
    min-height: 640px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(1.02);
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-slide img {
    width: 100%;
    height: 640px;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(27, 32, 51, 0.92) 0%, rgba(47, 52, 76, 0.68) 42%, rgba(47, 52, 76, 0.16) 100%), linear-gradient(0deg, rgba(47, 52, 76, 0.62), rgba(47, 52, 76, 0.04));
}

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

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(249, 92, 22, 0.12);
    color: var(--accent-deep);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero-content .eyebrow {
    background: rgba(255, 255, 255, 0.16);
    color: #fff0dd;
    backdrop-filter: blur(12px);
}

.hero-content h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero-content p {
    max-width: 560px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff3e4;
    color: #9a5d08;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

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

.primary-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--primary-bright), var(--accent));
    box-shadow: 0 18px 36px rgba(249, 92, 22, 0.28);
}

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

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.ghost-button.dark {
    border-color: var(--line);
    color: var(--secondary);
    background: #ffffff;
}

.hero-control-row {
    position: absolute;
    right: max(32px, calc((100vw - 1180px) / 2));
    bottom: 42px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.hero-prev,
.hero-next,
.hero-dots button {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    font-size: 28px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 7px;
}

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

.hero-dots button.active {
    width: 26px;
    background: #ffffff;
}

.search-panel,
.panel-card,
.category-overview-card,
.content-card {
    border: 1px solid rgba(230, 232, 238, 0.88);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
}

.search-panel {
    margin-top: -52px;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    gap: 20px;
    align-items: end;
    padding: 26px;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.content-card h2 {
    margin: 0;
    color: var(--secondary-deep);
    letter-spacing: -0.04em;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
}

.search-box span {
    color: var(--primary);
    font-weight: 900;
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.filter-chips {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips a,
.filter-chips button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid #f1ddc0;
    border-radius: 999px;
    color: #8f5f09;
    background: #fff7eb;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.filter-chips button.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(90deg, var(--primary-bright), var(--accent));
}

.section-block,
.split-section,
.page-main,
.detail-content,
.player-section {
    padding: 72px 0 0;
}

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

.compact-heading {
    align-items: center;
    margin-bottom: 20px;
}

.section-heading h2 {
    font-size: clamp(26px, 3vw, 40px);
}

.section-link {
    min-height: 40px;
    color: var(--primary);
    background: #fff3e4;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(230, 232, 238, 0.94);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(47, 52, 76, 0.10);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(216, 148, 16, 0.46);
    box-shadow: 0 24px 64px rgba(47, 52, 76, 0.18);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3e2, #f5f7fa);
}

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

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

.quality-mark,
.poster-year,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.quality-mark {
    top: 12px;
    left: 12px;
    padding: 0 10px;
    background: linear-gradient(90deg, var(--primary-bright), var(--accent));
}

.poster-year {
    right: 12px;
    bottom: 12px;
    padding: 0 10px;
    background: rgba(47, 52, 76, 0.78);
    backdrop-filter: blur(10px);
}

.rank-badge {
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    background: rgba(47, 52, 76, 0.82);
}

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

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 52px;
    color: var(--secondary-deep);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.42;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 66px;
    margin: 12px 0 14px;
    color: #536071;
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.movie-card.compact .movie-card-body p {
    min-height: 44px;
    -webkit-line-clamp: 2;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
}

.panel-card {
    padding: 26px;
}

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

.category-tile {
    position: relative;
    min-height: 188px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 18px;
    border-radius: 22px;
    color: #ffffff;
    isolation: isolate;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(47, 52, 76, 0.86), rgba(47, 52, 76, 0.12));
}

.category-tile img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-tile span {
    font-size: 20px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr;
    grid-template-areas: "num title" "num genre";
    gap: 2px 12px;
    align-items: center;
    padding: 13px;
    border-radius: 16px;
    background: #f8fafc;
    transition: transform 0.2s ease, background 0.2s ease;
}

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

.rank-item span {
    grid-area: num;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-bright), var(--accent));
    font-weight: 900;
}

.rank-item strong {
    grid-area: title;
    color: var(--secondary-deep);
    font-size: 15px;
}

.rank-item em {
    grid-area: genre;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 58px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff 0%, #fff3e4 48%, #f5f7fa 100%);
    box-shadow: var(--shadow);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(249, 92, 22, 0.15);
}

.page-hero h1 {
    position: relative;
    max-width: 780px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
}

.page-hero p {
    position: relative;
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.overview-stack {
    display: grid;
    gap: 28px;
    margin-top: 34px;
}

.category-overview-card {
    padding: 28px;
}

.inline-search,
.sticky-search {
    margin-top: 28px;
    grid-template-columns: minmax(260px, 520px) 1fr;
}

.sticky-search {
    position: sticky;
    top: 90px;
}

.detail-main {
    background: #ffffff;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: var(--secondary-deep);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(18px) saturate(1.1);
    transform: scale(1.08);
    opacity: 0.42;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(31, 36, 55, 0.94), rgba(31, 36, 55, 0.72));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 34px 0 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 34px 80px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
    font-weight: 800;
}

.lead-text {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.large-tags {
    margin-top: 18px;
}

.player-section {
    margin-top: -42px;
    position: relative;
    z-index: 4;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.12));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-bright), var(--accent));
    box-shadow: 0 22px 50px rgba(249, 92, 22, 0.38);
    position: relative;
}

.play-overlay span::after {
    content: "";
    position: absolute;
    left: 33px;
    top: 25px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.video-frame.is-playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

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

.content-card {
    padding: 30px;
}

.content-card p {
    margin: 16px 0 0;
    color: #475467;
    font-size: 17px;
}

.site-footer {
    margin-top: 82px;
    padding: 56px 0 30px;
    color: rgba(255, 255, 255, 0.78);
    background: linear-gradient(135deg, var(--secondary-deep), #1f2437);
}

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

.footer-logo {
    font-size: 24px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-grid p {
    margin: 16px 0 0;
    max-width: 440px;
}

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

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    font-size: 14px;
}

.searchable-card.is-hidden {
    display: none;
}

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

    .mobile-menu-button {
        display: block;
    }

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

    .split-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .hero-slider,
    .hero-track,
    .hero-slide,
    .hero-slide img {
        min-height: 560px;
        height: 560px;
    }

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

    .hero-control-row {
        right: 24px;
        bottom: 24px;
    }

    .search-panel,
    .inline-search,
    .sticky-search {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

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

    .page-hero {
        padding: 36px 24px;
    }

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

    .detail-poster {
        max-width: 260px;
    }

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

@media (max-width: 560px) {
    .header-inner {
        height: 66px;
    }

    .site-logo,
    .footer-logo {
        font-size: 21px;
    }

    .mobile-nav.open {
        grid-template-columns: 1fr;
    }

    .hero-slider,
    .hero-track,
    .hero-slide,
    .hero-slide img {
        min-height: 520px;
        height: 520px;
    }

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

    .hero-content p,
    .page-hero p,
    .lead-text {
        font-size: 16px;
    }

    .hero-control-row {
        left: 24px;
        right: auto;
    }

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

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

    .panel-card,
    .category-overview-card,
    .content-card {
        padding: 22px;
    }
}
