:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --rose-500: #f43f5e;
    --slate-900: #0f172a;
    --gray-950: #030712;
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --white: #ffffff;
    --shadow-soft: 0 18px 48px rgba(120, 53, 15, 0.16);
    --shadow-card: 0 10px 30px rgba(120, 53, 15, 0.14);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--amber-50), #fff7ed 42%, var(--amber-50));
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    border-bottom: 1px solid rgba(251, 191, 36, 0.26);
    box-shadow: 0 8px 24px rgba(120, 53, 15, 0.12);
    backdrop-filter: blur(16px);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.32);
}

.logo-text {
    font-size: 23px;
    background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
}

.desktop-nav a,
.mobile-links a,
.mobile-categories a {
    color: var(--gray-700);
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
    position: relative;
    padding: 24px 0;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 17px;
    height: 2px;
    border-radius: 99px;
    background: var(--amber-600);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.24s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
    color: var(--amber-600);
}

.desktop-nav a:hover::after,
.desktop-nav a.is-active::after {
    transform: scaleX(1);
}

.top-search,
.mobile-search,
.filter-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-search input {
    min-width: 230px;
    border: 2px solid var(--amber-200);
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--gray-900);
    background: rgba(255, 255, 255, 0.88);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-search input:focus {
    border-color: var(--amber-400);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.top-search button,
.mobile-search button,
.filter-search button,
.btn {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 800;
}

.top-search button,
.mobile-search button,
.filter-search button,
.btn-primary {
    color: var(--white);
    background: linear-gradient(90deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.26);
}

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

.btn:hover,
.top-search button:hover,
.mobile-search button:hover,
.filter-search button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.34);
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(251, 191, 36, 0.18);
    color: var(--gray-900);
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--amber-200);
    background: rgba(255, 255, 255, 0.96);
    padding: 16px;
}

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

.mobile-links,
.mobile-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.mobile-links a,
.mobile-categories a {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--amber-50);
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(640px, 100%);
    color: var(--white);
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.8;
}

.hero-meta,
.meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.meta-line span {
    color: inherit;
}

.hero-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.14);
}

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

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.58);
    cursor: pointer;
    transition: width 0.24s ease, background 0.24s ease;
}

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

.hero-chips {
    position: absolute;
    left: 50%;
    bottom: 78px;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-chips a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.section {
    padding: 70px 0;
}

.section-tint {
    background: linear-gradient(90deg, var(--amber-100), #ffedd5);
}

.section-dark {
    color: var(--white);
    background: linear-gradient(135deg, #78350f, #9a3412);
}

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

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

.section-head h2,
.page-title h1,
.content-block h2,
.detail-title h1 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
}

.section-dark .section-head h2,
.section-dark h2,
.section-dark h3 {
    color: var(--white);
}

.section-head p,
.page-title p {
    margin: 10px 0 0;
    color: var(--gray-600);
    line-height: 1.8;
}

.section-dark .section-head p,
.section-dark p {
    color: #fde68a;
}

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

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

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

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

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

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 50px rgba(120, 53, 15, 0.18);
}

.poster {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-large {
    height: 360px;
}

.poster-horizontal {
    width: 190px;
    height: 132px;
    flex: 0 0 auto;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.poster-shade-hover {
    opacity: 0;
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-shade-hover {
    opacity: 1;
}

.poster-copy {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    color: var(--white);
}

.poster-copy h3,
.card-body h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.35;
}

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

.poster-copy p {
    color: #e5e7eb;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    color: var(--gray-900);
    display: -webkit-box;
    min-height: 54px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card:hover .card-body h3 {
    color: var(--amber-600);
}

.meta-line {
    color: var(--gray-500);
    font-size: 13px;
    line-height: 1.4;
}

.badge,
.tag,
.badge-floating {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.badge {
    padding: 7px 12px;
    color: var(--white);
    background: var(--amber-500);
}

.badge-floating {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    color: var(--white);
    font-size: 12px;
    background: rgba(245, 158, 11, 0.94);
    z-index: 2;
}

.rank-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(135deg, var(--rose-500), var(--orange-500));
    box-shadow: 0 10px 24px rgba(244, 63, 94, 0.34);
}

.latest-wrap {
    position: relative;
}

.latest-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 330px;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 52px 18px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.latest-rail::-webkit-scrollbar {
    display: none;
}

.rail-arrow {
    position: absolute;
    top: 45%;
    z-index: 5;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: var(--gray-700);
    background: var(--white);
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.rail-arrow.left {
    left: 0;
}

.rail-arrow.right {
    right: 0;
}

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

.category-tile {
    display: block;
    min-height: 230px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: 20px;
    color: var(--white);
    background: var(--tile-bg);
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: var(--shadow-soft);
}

.category-preview {
    display: flex;
    height: 70px;
    margin-bottom: 18px;
}

.category-preview img {
    width: 58px;
    height: 70px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.74);
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.category-preview img + img {
    margin-left: -15px;
}

.category-tile h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-tile p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

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

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

.feature-panel {
    border-radius: var(--radius-xl);
    padding: 30px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.feature-panel .feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    margin-bottom: 18px;
    color: var(--gray-900);
    background: var(--amber-300);
    font-size: 28px;
}

.page-title {
    padding: 54px 0 22px;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 18px 0 32px;
    padding: 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-card);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 24px 0 18px;
    color: var(--gray-600);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--amber-600);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

.cover-large {
    overflow: hidden;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    background: #111827;
}

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

.detail-title {
    padding: 10px 0 20px;
}

.detail-title h1 {
    margin-bottom: 14px;
}

.detail-title p {
    margin: 0;
    color: var(--gray-700);
    font-size: 18px;
    line-height: 1.8;
}

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

.detail-meta span,
.tag {
    padding: 8px 12px;
    color: #92400e;
    background: var(--amber-100);
}

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

.player-section {
    margin: 10px 0 34px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: #0b0f19;
    box-shadow: var(--shadow-soft);
}

.video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #030712;
}

.video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #030712;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.66));
    cursor: pointer;
    z-index: 3;
}

.player-start span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.36);
    font-size: 30px;
    transform: translateX(3px);
}

.video-frame.is-playing .player-start {
    display: none;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.content-block {
    margin-bottom: 24px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-card);
}

.content-block h2 {
    margin-bottom: 14px;
    font-size: 28px;
}

.content-block p {
    margin: 0;
    color: var(--gray-700);
    line-height: 2;
}

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

.movie-card-horizontal a {
    display: flex;
    min-height: 132px;
}

.movie-card-horizontal .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.movie-card-horizontal .card-body h3 {
    min-height: auto;
    -webkit-line-clamp: 1;
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.site-footer {
    margin-top: 70px;
    color: var(--amber-50);
    background: linear-gradient(180deg, #78350f, #451a03);
}

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

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

.site-footer p,
.site-footer a {
    color: var(--amber-100);
    line-height: 1.8;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: #fde68a;
    border-top: 1px solid rgba(253, 230, 138, 0.16);
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.back-top.is-visible {
    display: block;
}

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

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

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

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

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

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

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

    .hero {
        height: 640px;
    }

    .hero-overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28));
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 150px;
    }

    .hero-chips {
        bottom: 70px;
    }

    .movie-grid,
    .movie-grid.compact,
    .movie-grid.two-col,
    .feature-grid,
    .footer-grid,
    .content-grid,
    .detail-layout,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-search,
    .filter-search input,
    .mobile-search,
    .mobile-search input {
        width: 100%;
    }

    .latest-rail {
        grid-auto-columns: 82%;
        padding: 4px 0 18px;
    }

    .rail-arrow {
        display: none;
    }

    .poster {
        height: 250px;
    }

    .poster-large {
        height: 380px;
    }

    .movie-card-horizontal a {
        flex-direction: column;
    }

    .poster-horizontal {
        width: 100%;
        height: 220px;
    }
}
