:root {
    --page-bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fffbeb;
    --text: #111827;
    --muted: #6b7280;
    --line: #f3d9a4;
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --orange: #ea580c;
    --dark: #111827;
    --radius-lg: 24px;
    --radius-md: 18px;
    --shadow-sm: 0 12px 30px rgba(17, 24, 39, 0.08);
    --shadow-lg: 0 22px 65px rgba(17, 24, 39, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 34%, #fff7ed 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 251, 235, 0.92);
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.08);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--amber-dark);
}

.logo-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.35);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--dark);
    border-radius: 999px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 700;
}

.nav-menu > a,
.nav-dropdown > a {
    transition: color 0.2s ease;
}

.nav-menu > a:hover,
.nav-dropdown > a:hover {
    color: var(--amber-dark);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 32px;
    left: 0;
    width: 190px;
    padding: 10px;
    display: grid;
    gap: 4px;
    background: #ffffff;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
}

.dropdown-panel a:hover {
    color: var(--amber-dark);
    background: #fffbeb;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    background: #ffffff;
}

.nav-search input {
    width: 190px;
    border: 0;
    outline: none;
    padding: 8px 4px 8px 12px;
    background: transparent;
}

.nav-search button,
.primary-button,
.home-search-panel button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
    padding: 8px 14px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
}

.primary-button:hover,
.home-search-panel button:hover,
.nav-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(245, 158, 11, 0.36);
}

.secondary-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    font-weight: 900;
}

.hero {
    position: relative;
    height: min(720px, 72vh);
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.85s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 2;
}

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 720px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-text {
    max-width: 620px;
    margin: 20px 0 0;
    color: #e5e7eb;
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 24px 0 32px;
    color: #f3f4f6;
}

.hero-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.hero-dot.is-active {
    width: 34px;
    border-radius: 999px;
    background: #fbbf24;
}

.home-search-panel {
    width: min(1080px, calc(100% - 32px));
    margin: -44px auto 36px;
    position: relative;
    z-index: 8;
    padding: 22px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.home-search-panel form {
    display: flex;
    gap: 12px;
}

.home-search-panel input {
    flex: 1;
    min-width: 0;
    padding: 15px 18px;
    border: 1px solid #f1d7aa;
    border-radius: 999px;
    outline: none;
}

.home-search-panel button {
    padding: 0 26px;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.quick-links a {
    padding: 9px 14px;
    color: var(--amber-dark);
    background: #fffbeb;
    border-radius: 999px;
    font-weight: 800;
}

.content-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 58px;
}

.section-heading {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 18px;
    margin-bottom: 22px;
}

.section-heading > span,
.panel-title span {
    display: inline-flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.26);
}

.section-heading h2,
.panel-title h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.05em;
}

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-link {
    color: var(--amber-dark);
    font-weight: 900;
}

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

.category-card,
.overview-category-card {
    min-height: 150px;
    padding: 22px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 24px;
    background: linear-gradient(140deg, #ffffff, #fffbeb);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.overview-category-card:hover,
.movie-card:hover,
.ranking-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card span,
.overview-category-card span {
    color: var(--amber-dark);
    font-weight: 900;
}

.category-card p,
.overview-category-card p {
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.14);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: 0.22s ease;
}

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

.card-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.movie-card-featured .card-cover {
    aspect-ratio: 16 / 9;
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.02));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: 0.25s ease;
}

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

.card-body {
    padding: 16px;
}

.card-meta,
.ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--amber-dark);
    font-size: 13px;
    font-weight: 900;
}

.card-body h3,
.ranking-item h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p,
.ranking-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.card-tags span,
.detail-tags span {
    padding: 6px 10px;
    color: #92400e;
    background: #fffbeb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

.ranking-panel,
.side-card,
.detail-article,
.filter-box {
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.ranking-panel {
    position: sticky;
    top: 88px;
    padding: 20px;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

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

.ranking-item {
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: 0.22s ease;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 46px 96px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
}

.compact-ranking .ranking-item a {
    grid-template-columns: 38px 72px 1fr;
}

.rank-number {
    color: var(--amber-dark);
    font-size: 22px;
    font-weight: 1000;
}

.ranking-item img {
    width: 96px;
    height: 68px;
    border-radius: 14px;
    object-fit: cover;
    background: #fef3c7;
}

.compact-ranking .ranking-item img {
    width: 72px;
    height: 54px;
}

.page-shell,
.detail-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0 10px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    padding: clamp(34px, 5vw, 70px);
    color: #ffffff;
    border-radius: 34px;
    background: radial-gradient(circle at 12% 20%, rgba(251, 191, 36, 0.55), transparent 34%), linear-gradient(135deg, #111827, #7c2d12 58%, #f59e0b);
    box-shadow: var(--shadow-lg);
}

.page-hero p:not(.eyebrow) {
    max-width: 760px;
    margin: 18px 0 0;
    color: #f3f4f6;
    font-size: 18px;
    line-height: 1.75;
}

.page-hero .hero-actions {
    margin-top: 26px;
}

.filter-box {
    margin: 0 0 28px;
    padding: 18px;
}

.filter-box label {
    display: grid;
    gap: 10px;
    color: var(--amber-dark);
    font-weight: 900;
}

.filter-box input {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #f1d7aa;
    border-radius: 18px;
    outline: none;
}

.filter-empty {
    margin: 14px 0 0;
    color: var(--muted);
}

.overview-category-card {
    min-height: 240px;
    display: grid;
    align-content: space-between;
}

.overview-category-card h2 {
    margin: 10px 0 0;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.overview-samples {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.overview-samples a {
    color: #92400e;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 24px;
    color: #78716c;
    font-weight: 800;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
    gap: 26px;
    align-items: stretch;
    margin-bottom: 34px;
}

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

.movie-player,
.player-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    object-fit: cover;
    background: #111827;
}

.player-layer {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    z-index: 3;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    color: #ffffff;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.88);
    box-shadow: 0 18px 44px rgba(245, 158, 11, 0.36);
    font-size: 36px;
}

.detail-info {
    padding: 28px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 32px;
    background: linear-gradient(145deg, #ffffff, #fffbeb);
    box-shadow: var(--shadow-sm);
}

.detail-info h1 {
    color: var(--text);
    font-size: clamp(32px, 4vw, 52px);
}

.detail-one-line {
    margin: 18px 0 22px;
    color: #4b5563;
    line-height: 1.8;
    font-size: 17px;
}

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

.detail-meta-grid span {
    padding: 12px;
    border-radius: 16px;
    background: #ffffff;
    color: #374151;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.14);
}

.detail-meta-grid strong {
    display: block;
    margin-bottom: 6px;
    color: var(--amber-dark);
    font-size: 13px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    margin-bottom: 48px;
}

.detail-article,
.side-card {
    padding: 28px;
}

.detail-article h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.detail-article p {
    margin: 0 0 24px;
    color: #374151;
    line-height: 1.9;
    font-size: 17px;
}

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

.side-links a {
    display: grid;
    gap: 4px;
    padding: 13px;
    border-radius: 16px;
    background: #fffbeb;
    color: #92400e;
    font-weight: 900;
}

.side-links span {
    color: #78716c;
    font-size: 13px;
    font-weight: 700;
}

.site-footer {
    margin-top: 70px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1f2937);
}

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

.footer-brand p {
    max-width: 560px;
    color: #d1d5db;
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    padding: 9px 12px;
    color: #f3f4f6;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-logo {
    color: #fbbf24;
}

.copyright {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 20px 0 30px;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 1100px) {
    .movie-grid,
    .all-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .split-section,
    .detail-hero,
    .detail-content-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .ranking-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .navbar {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        width: 100%;
        display: none;
        align-items: stretch;
        gap: 10px;
        padding: 12px 0 4px;
    }

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

    .nav-dropdown,
    .dropdown-panel {
        position: static;
    }

    .dropdown-panel {
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 8px;
    }

    .nav-search {
        border-radius: 18px;
    }

    .nav-search input {
        width: 100%;
    }

    .hero {
        min-height: 640px;
        height: 78vh;
    }

    .hero-arrow {
        display: none;
    }

    .hero-content {
        padding-top: 60px;
    }

    .home-search-panel form {
        display: grid;
    }

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

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

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

@media (max-width: 560px) {
    .logo {
        font-size: 20px;
    }

    .hero h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 36px;
        line-height: 1.08;
    }

    .hero-meta {
        gap: 8px;
    }

    .movie-grid,
    .featured-grid,
    .all-grid,
    .category-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .ranking-item a,
    .compact-ranking .ranking-item a {
        grid-template-columns: 40px 74px 1fr;
    }

    .page-shell,
    .detail-shell,
    .content-section,
    .home-search-panel,
    .footer-inner,
    .copyright {
        width: min(100% - 22px, 1200px);
    }

    .page-hero,
    .detail-info,
    .detail-article,
    .side-card {
        border-radius: 22px;
        padding: 22px;
    }

    .player-shell {
        border-radius: 22px;
    }
}
