:root {
    --brand: #f97316;
    --brand-dark: #ea580c;
    --amber: #f59e0b;
    --red: #ef4444;
    --green: #10b981;
    --blue: #0ea5e9;
    --purple: #a855f7;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --panel: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #f8fafc 100%);
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--ink);
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--amber));
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.mobile-link {
    padding: 10px 16px;
    color: #374151;
    font-weight: 700;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--brand-dark);
    background: #fff7ed;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    cursor: pointer;
}

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

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
}

.mobile-nav.open {
    display: grid;
    gap: 8px;
}

.hero-carousel {
    padding: 24px 0 12px;
}

.hero-stage {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 32px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.05);
    filter: blur(8px);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(249, 115, 22, 0.55), transparent 35%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 340px;
    align-items: center;
    gap: 48px;
    min-height: 560px;
    padding: 64px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 8px 14px;
    color: #fed7aa;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(254, 215, 170, 0.36);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

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

.hero-copy p,
.detail-copy p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #9a3412;
    border-radius: 999px;
    background: #ffedd5;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    font-weight: 800;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--amber));
    box-shadow: 0 16px 30px rgba(249, 115, 22, 0.35);
}

.btn.secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

.btn:hover {
    transform: translateY(-2px) scale(1.01);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    font-size: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

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

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
}

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

.hero-dot.active {
    width: 34px;
    background: #ffffff;
}

.quick-search {
    margin-top: 28px;
    margin-bottom: 18px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    align-items: center;
    gap: 28px;
    padding: 28px;
    border: 1px solid rgba(249, 115, 22, 0.12);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.search-panel h2,
.section-heading h2,
.category-card h2,
.ranking-aside h2,
.detail-article h2,
.detail-side h2 {
    margin: 0;
    color: var(--ink);
    font-size: 28px;
    line-height: 1.2;
}

.search-panel p,
.section-heading p,
.category-card p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-form,
.filter-bar {
    display: flex;
    gap: 12px;
}

.search-form input,
.filter-search input,
.filter-bar select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    outline: none;
    transition: all 0.2s ease;
}

.search-form input:focus,
.filter-search input:focus,
.filter-bar select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-form button {
    min-width: 108px;
    min-height: 48px;
    color: #ffffff;
    font-weight: 800;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand), var(--amber));
    cursor: pointer;
}

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

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.section-heading.slim {
    margin-top: 22px;
    margin-bottom: 14px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    color: #ffffff;
    font-weight: 900;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--amber));
    box-shadow: 0 14px 28px rgba(249, 115, 22, 0.25);
}

.section-icon.red {
    background: linear-gradient(135deg, var(--red), #ec4899);
}

.section-icon.green {
    background: linear-gradient(135deg, var(--green), #22c55e);
}

.section-icon.blue {
    background: linear-gradient(135deg, var(--blue), #06b6d4);
}

.section-icon.purple {
    background: linear-gradient(135deg, var(--purple), #ec4899);
}

.heading-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--line), transparent);
}

.more-link,
.text-button {
    margin-left: auto;
    color: var(--brand-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.15);
    transform: translateY(-6px);
}

.movie-card.large {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
}

.movie-card.mini {
    border-radius: 18px;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #f3f4f6;
}

.movie-card.large .poster-link {
    aspect-ratio: auto;
    min-height: 268px;
}

.poster-link img,
.rank-cover img,
.category-card-cover img,
.category-covers img,
.detail-poster img,
.hero-poster img {
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.rank-card:hover .rank-cover img,
.category-card:hover .category-card-cover img,
.category-tile:hover .category-covers img,
.hero-poster:hover img,
.detail-poster:hover img {
    transform: scale(1.06);
}

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.95);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.card-content {
    padding: 18px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.movie-card h3,
.rank-card h3 {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p,
.rank-card p {
    display: -webkit-box;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.category-tile,
.category-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 24px;
    background: var(--panel);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    transition: all 0.25s ease;
}

.category-tile {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
}

.category-tile:hover,
.category-card:hover {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
    transform: translateY(-4px);
}

.category-covers,
.category-card-cover {
    display: grid;
    overflow: hidden;
    border-radius: 18px;
    background: #f3f4f6;
}

.category-covers {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    min-height: 132px;
}

.category-card-cover {
    grid-template-columns: repeat(4, 1fr);
    min-height: 180px;
}

.category-tile h3,
.category-card h2 {
    margin: 0 0 8px;
}

.category-tile p,
.category-card p {
    color: var(--muted);
    line-height: 1.65;
}

.category-card-body {
    padding: 22px;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    padding: 64px 0 52px;
    color: #ffffff;
    background:
        radial-gradient(circle at 10% 10%, rgba(251, 146, 60, 0.65), transparent 28%),
        linear-gradient(135deg, #111827, #431407 62%, #7c2d12);
}

.page-hero.compact h1 {
    margin: 0 0 12px;
}

.page-hero.compact p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

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

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

.filter-bar {
    align-items: center;
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.filter-search {
    flex: 1;
}

.filter-bar select {
    width: 170px;
}

.empty-state {
    margin: 20px 0;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: #ffffff;
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 46px;
    padding-bottom: 46px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: auto 96px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
    transition: all 0.2s ease;
}

.rank-card:hover {
    border-color: rgba(249, 115, 22, 0.45);
    transform: translateY(-3px);
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    font-weight: 900;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--amber));
}

.rank-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #f3f4f6;
}

.ranking-aside {
    position: sticky;
    top: 92px;
    align-self: start;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.mini-grid {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    color: #ffffff;
    background: #111827;
}

.detail-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(249, 115, 22, 0.5), transparent 30%),
        linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.78), rgba(17, 24, 39, 0.56));
}

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

.detail-intro {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    background: #f3f4f6;
    box-shadow: 0 28px 58px rgba(0, 0, 0, 0.38);
}

.detail-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
}

.player-section {
    margin-top: -72px;
    position: relative;
    z-index: 3;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 10px solid #ffffff;
    border-radius: 28px;
    background: #030712;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.45));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    font-size: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--amber));
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.35);
}

.player-shell.playing .player-overlay,
.player-shell.ready .player-overlay {
    opacity: 0;
    visibility: hidden;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding-top: 44px;
    padding-bottom: 22px;
}

.detail-article,
.detail-side {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.detail-article p {
    margin: 0 0 20px;
    color: #374151;
    font-size: 16px;
    line-height: 1.95;
}

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

.info-table div {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f9fafb;
}

.info-table dt {
    color: var(--muted);
    font-weight: 800;
}

.info-table dd {
    margin: 0;
    color: var(--ink);
}

.detail-side .rank-card,
.side-list .rank-card {
    grid-template-columns: 76px minmax(0, 1fr);
}

.detail-side .rank-index,
.side-list .rank-index {
    display: none;
}

.detail-side .rank-cover,
.side-list .rank-cover {
    width: 76px;
}

.site-footer {
    margin-top: 36px;
    padding: 48px 0;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 30px;
}

.footer-logo {
    color: #ffffff;
}

.site-footer p {
    max-width: 440px;
    color: #9ca3af;
    line-height: 1.8;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: #9ca3af;
}

.footer-links a:hover {
    color: #ffffff;
}

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

    .hero-content,
    .detail-intro,
    .detail-layout,
    .ranking-layout,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

    .ranking-aside {
        position: static;
    }
}

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

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .header-inner {
        height: 64px;
    }

    .hero-stage,
    .hero-content {
        min-height: 540px;
    }

    .hero-content {
        padding: 44px 28px 72px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 40px;
    }

    .hero-arrow {
        display: none;
    }

    .search-form,
    .filter-bar,
    .hero-actions {
        flex-direction: column;
    }

    .filter-bar select {
        width: 100%;
    }

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

    .movie-card.large,
    .category-tile,
    .rank-card,
    .detail-side .rank-card,
    .side-list .rank-card {
        grid-template-columns: 1fr;
    }

    .rank-cover,
    .detail-side .rank-cover,
    .side-list .rank-cover {
        width: 100%;
    }

    .rank-card .rank-cover {
        max-width: 180px;
    }

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

    .player-section {
        margin-top: -36px;
    }

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