:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --dark: #0f172a;
    --dark-soft: #1f2937;
    --accent: #f59e0b;
    --accent-2: #f97316;
    --accent-soft: #fff7ed;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
    --radius: 22px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.nav-shell {
    max-width: var(--max);
    height: 76px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.04em;
}

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

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

.nav-links a,
.mobile-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #92400e;
    background: #ffedd5;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 800;
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    max-width: var(--max);
    margin: 0 auto;
}

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

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 700px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a 0%, #111827 52%, #1f2937 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    background:
        radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.32), transparent 34%),
        radial-gradient(circle at 82% 12%, rgba(249, 115, 22, 0.24), transparent 30%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.05) 75%, transparent 75%, transparent);
    background-size: auto, auto, 56px 56px;
}

.hero-shell {
    position: relative;
    max-width: var(--max);
    margin: 0 auto;
    padding: 52px 24px 76px;
}

.hero-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
    color: #fed7aa;
    font-weight: 800;
}

.hero-topline a {
    color: #ffffff;
    opacity: 0.88;
}

.hero-slider {
    position: relative;
    min-height: 492px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
    align-items: center;
    gap: 54px;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
    margin: 0 0 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 900;
}

.eyebrow.amber {
    color: var(--accent);
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
    background: linear-gradient(90deg, #fde68a, #fb923c, #fde68a);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc {
    max-width: 620px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 20px;
}

.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 11px;
    border-radius: 999px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    background: rgba(255, 237, 213, 0.14);
    color: #fed7aa;
    border: 1px solid rgba(254, 215, 170, 0.22);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 16px 38px rgba(249, 115, 22, 0.34);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-art {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    min-height: 390px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.48);
    transform: rotate(1deg);
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.75));
}

.hero-art img {
    width: 100%;
    height: 100%;
    min-height: 390px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-art:hover img {
    transform: scale(1.06);
}

.hero-art span {
    position: absolute;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    font-weight: 900;
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 34px;
}

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

.hero-dots button {
    width: 42px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.hero-dots button.active {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hero-mini-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.hero-mini-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 800;
}

.section,
.page-main .section {
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 24px;
}

.intro-section {
    padding-bottom: 28px;
}

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

.section-head.centered {
    display: block;
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-head h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-head p,
.page-hero p {
    margin-top: 10px;
    color: var(--muted);
}

.more-link {
    color: #b45309;
    font-weight: 900;
}

.search-panel {
    max-width: 760px;
    margin: 0 auto;
    padding: 8px;
    display: flex;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.search-panel.in-page {
    margin-top: 28px;
}

.search-panel input {
    width: 100%;
    min-height: 50px;
    border: 0;
    outline: 0;
    padding: 0 18px;
    background: transparent;
    color: #0f172a;
    font-size: 16px;
}

.search-panel button {
    min-width: 106px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-weight: 900;
    cursor: pointer;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 16px 46px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

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

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

.card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.card-body {
    padding: 20px;
}

.card-meta {
    margin: 0 0 8px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
}

.card-body h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.3;
}

.card-body h3 a:hover {
    color: #d97706;
}

.card-desc {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 16px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card.compact .card-body {
    padding: 16px;
}

.movie-card.compact .card-body h3 {
    font-size: 17px;
}

.movie-card.compact .card-desc {
    min-height: 44px;
    font-size: 14px;
}

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

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

.category-card {
    min-height: 160px;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    border: 1px solid #fed7aa;
    box-shadow: 0 16px 45px rgba(154, 52, 18, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 70px rgba(154, 52, 18, 0.16);
}

.category-card span {
    display: block;
    margin-bottom: 12px;
    color: #9a3412;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: #64748b;
}

.ranking-section {
    max-width: none;
    background: linear-gradient(135deg, #111827, #0f172a);
}

.ranking-section .section-head h2,
.ranking-section .section-head p {
    color: #ffffff;
}

.ranking-list {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rank-row {
    min-height: 88px;
    display: grid;
    grid-template-columns: 52px 88px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: rgba(245, 158, 11, 0.16);
    transform: translateX(4px);
}

.rank-row strong {
    color: #fbbf24;
    font-size: 24px;
}

.rank-row img {
    width: 88px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-row span {
    font-weight: 900;
}

.rank-row em {
    color: #cbd5e1;
    font-style: normal;
    font-weight: 800;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 68px 24px;
    background:
        radial-gradient(circle at 18% 16%, rgba(245, 158, 11, 0.22), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.compact-hero {
    text-align: center;
}

.compact-hero > * {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state {
    display: none;
    margin: 36px auto 0;
    padding: 18px 22px;
    border-radius: 18px;
    text-align: center;
    color: #9a3412;
    background: #ffedd5;
    font-weight: 800;
}

.empty-state.show {
    display: block;
}

.detail-main .section {
    padding-top: 54px;
    padding-bottom: 54px;
}

.breadcrumb {
    max-width: var(--max);
    margin: 0 auto 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #92400e;
    font-weight: 800;
}

.detail-layout {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    align-items: center;
    gap: 54px;
}

.poster-panel {
    position: relative;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.poster-glow {
    position: absolute;
    inset: 12% -8% -8% 10%;
    z-index: -1;
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(249, 115, 22, 0.18));
    filter: blur(24px);
}

.detail-copy h1 {
    margin-bottom: 18px;
    font-size: clamp(38px, 6vw, 72px);
}

.detail-one-line {
    color: #334155;
    font-size: 21px;
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 12px;
    background: #ffffff;
    color: #475569;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.tag-row.big span {
    font-size: 13px;
}

.player-section {
    max-width: 1100px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 34px 100px rgba(15, 23, 42, 0.25);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.74));
    cursor: pointer;
}

.player-overlay.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.45);
    font-size: 30px;
}

.player-overlay strong {
    font-size: 22px;
    letter-spacing: 0.08em;
}

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

.content-card {
    padding: 30px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

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

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

.related-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.related-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.related-card span {
    display: block;
    padding: 12px;
    font-weight: 900;
    line-height: 1.35;
}

.site-footer {
    margin-top: 40px;
    padding: 54px 24px 28px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 42px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

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

.site-footer a {
    display: block;
    margin: 7px 0;
    color: #cbd5e1;
}

.site-footer a:hover {
    color: #fbbf24;
}

.copyright {
    max-width: var(--max);
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

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

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

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

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

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

    .hero-section {
        min-height: auto;
    }

    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-art {
        min-height: 300px;
    }

    .hero-art img {
        min-height: 300px;
    }

    .hero-controls {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .poster-panel {
        max-width: 420px;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .nav-shell {
        height: 66px;
        padding: 0 16px;
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .hero-shell,
    .section,
    .page-main .section,
    .page-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .hero-desc,
    .detail-one-line {
        font-size: 17px;
    }

    .movie-grid,
    .latest-grid,
    .search-grid,
    .category-grid,
    .category-grid.large,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .search-panel {
        border-radius: 24px;
        flex-direction: column;
    }

    .search-panel button {
        min-height: 48px;
    }

    .rank-row {
        grid-template-columns: 40px 72px 1fr;
    }

    .rank-row em {
        display: none;
    }
}
