:root {
    --bg: #070707;
    --bg-soft: #111111;
    --bg-card: #18181b;
    --line: rgba(255, 255, 255, 0.09);
    --text: #f8fafc;
    --muted: #a1a1aa;
    --muted-2: #71717a;
    --orange: #f97316;
    --orange-light: #fb923c;
    --orange-deep: #9a3412;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --radius: 22px;
    --max: 1240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 34rem),
        radial-gradient(circle at top right, rgba(251, 146, 60, 0.12), transparent 30rem),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.72), transparent 80%);
    z-index: -1;
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(7, 7, 7, 0.78);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-text small {
    color: var(--muted);
    margin-top: 4px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.nav-link {
    color: #d4d4d8;
    font-size: 14px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--orange-light);
}

.header-search,
.mobile-search,
.big-search,
.hero-search-card form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.big-search input,
.hero-search-card input {
    width: 220px;
    height: 40px;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 999px;
    padding: 0 15px;
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.header-search button,
.mobile-search button,
.big-search button,
.hero-search-card button {
    height: 40px;
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    color: white;
    background: var(--orange);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.big-search button:hover,
.hero-search-card button:hover,
.primary-button:hover,
.secondary-button:hover,
.ghost-link:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    display: block;
    margin: 5px 0;
    background: white;
}

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

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

main {
    min-height: 70vh;
}

.hero-carousel {
    width: min(var(--max), calc(100% - 32px));
    margin: 28px auto 0;
}

.hero-shell {
    position: relative;
    min-height: 620px;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background: #111;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 38px;
    align-items: center;
    padding: 70px;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.45s ease, visibility 0.45s ease, transform 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-backdrop,
.detail-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.76) 46%, rgba(0, 0, 0, 0.44) 100%),
        var(--hero-image) center / cover no-repeat;
    filter: saturate(1.05);
}

.hero-backdrop::after,
.detail-overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(249, 115, 22, 0.28), transparent 28rem),
        linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 52%);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--orange-light);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1,
.player-info h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-one-line,
.player-info p {
    max-width: 760px;
    margin: 24px 0 0;
    color: #d4d4d8;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.mini-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.mini-tags span {
    border: 1px solid rgba(249, 115, 22, 0.28);
    border-radius: 999px;
    padding: 6px 10px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.11);
    font-size: 12px;
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.primary-button,
.secondary-button,
.text-button,
.ghost-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 22px;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
    box-shadow: 0 14px 32px rgba(249, 115, 22, 0.3);
}

.secondary-button,
.ghost-link,
.section-more {
    border: 1px solid var(--line);
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

.text-button {
    color: var(--orange-light);
}

.poster {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top, rgba(249, 115, 22, 0.22), transparent 58%),
        linear-gradient(145deg, #27272a, #09090b);
}

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

.poster:hover img {
    transform: scale(1.06);
    filter: brightness(1.05);
}

.poster-fallback::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.34), rgba(24, 24, 27, 0.76)),
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.12), transparent 30%);
}

.hero-poster {
    height: 470px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.55);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: white;
    background: rgba(249, 115, 22, 0.9);
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.poster:hover .poster-play,
.hero-poster .poster-play,
.detail-poster .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-play.large {
    width: 70px;
    height: 70px;
    font-size: 26px;
}

.hero-controls {
    position: absolute;
    left: 70px;
    bottom: 42px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-controls button {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: white;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.hero-controls > button {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 28px;
}

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

.hero-dot {
    width: 26px;
    height: 6px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.5;
}

.hero-dot.active {
    width: 42px;
    opacity: 1;
    background: var(--orange);
}

.hero-search-card {
    position: relative;
    z-index: 3;
    margin: -48px auto 0;
    width: min(1060px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 22px;
    background: rgba(17, 17, 17, 0.88);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
}

.hero-search-card strong {
    font-size: 20px;
}

.hero-search-card p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.hero-category-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-category-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: #e4e4e7;
    background: rgba(255, 255, 255, 0.05);
}

.content-section,
.page-hero,
.detail-hero,
.player-page {
    width: min(var(--max), calc(100% - 32px));
    margin: 54px auto 0;
}

.intro-section {
    margin-top: 76px;
}

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

.center-heading {
    justify-content: center;
    text-align: center;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
}

.section-heading p {
    max-width: 760px;
    margin: 14px auto 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.38);
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.09), rgba(255, 255, 255, 0.03));
}

.movie-card .poster {
    aspect-ratio: 2 / 3;
    border-radius: 0;
}

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

.movie-card h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover,
.breadcrumb a:hover {
    color: var(--orange-light);
}

.movie-card p {
    min-height: 45px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted-2);
    font-size: 12px;
}

.movie-meta span,
.detail-meta span {
    border-radius: 8px;
    padding: 4px 7px;
    background: rgba(255, 255, 255, 0.06);
}

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

.compact h2 {
    font-size: 15px;
}

.compact p {
    display: none;
}

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

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

.category-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.38);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    height: 130px;
    background: rgba(255, 255, 255, 0.05);
}

.category-thumb {
    background-size: cover;
    background-position: center;
    min-width: 0;
}

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

.category-card h2 {
    margin: 0;
    font-size: 20px;
}

.category-card p {
    min-height: 50px;
    margin: 10px 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.category-card span {
    color: var(--orange-light);
    font-weight: 700;
}

.page-hero.compact-hero {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 34px;
    padding: 56px;
    overflow: hidden;
    background:
        radial-gradient(circle at 15% 10%, rgba(249, 115, 22, 0.24), transparent 34rem),
        linear-gradient(135deg, rgba(24, 24, 27, 0.94), rgba(9, 9, 11, 0.94));
    box-shadow: var(--shadow);
}

.big-search {
    width: min(680px, 100%);
    margin-top: 28px;
}

.big-search input {
    flex: 1;
    width: auto;
    height: 52px;
}

.big-search button {
    height: 52px;
    padding: 0 28px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.045);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    border-color: rgba(249, 115, 22, 0.36);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--orange-deep));
}

.rank-cover {
    aspect-ratio: 2 / 3;
    border-radius: 14px;
}

.rank-content h2 {
    margin: 0;
    font-size: 18px;
}

.rank-content p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: white;
    font-weight: 900;
    background: rgba(249, 115, 22, 0.92);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 34px;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
}

.detail-overlay {
    background:
        linear-gradient(90deg, rgba(0,0,0,0.88), rgba(0,0,0,0.52)),
        var(--detail-bg) center / cover no-repeat;
}

.detail-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 56px;
}

.detail-poster {
    aspect-ratio: 2 / 3;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.55);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #d4d4d8;
    font-size: 13px;
}

.detail-meta {
    margin-top: 20px;
    font-size: 14px;
}

.detail-meta.vertical {
    display: grid;
    justify-items: start;
}

.detail-text {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 20px;
}

.text-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.045);
}

.text-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.text-card p {
    margin: 0;
    color: #d4d4d8;
    line-height: 2;
}

.player-page {
    border: 1px solid var(--line);
    border-radius: 34px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(24,24,27,0.94), rgba(9,9,11,0.94));
    box-shadow: var(--shadow);
}

.player-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    margin-top: 20px;
}

.video-card,
.player-info {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.video-shell {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 26px;
    background: #000;
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-start {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    padding: 16px 24px;
    color: white;
    background: rgba(249, 115, 22, 0.94);
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.video-start span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
}

.video-shell.is-playing .video-start {
    opacity: 0;
    pointer-events: none;
}

.player-info {
    padding: 28px;
}

.player-info h1 {
    font-size: 30px;
}

.player-info p {
    font-size: 15px;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.32);
}

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

.footer-brand {
    color: var(--orange-light);
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

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

.footer-links a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    color: #d4d4d8;
    background: rgba(255, 255, 255, 0.04);
}

.footer-links a:hover {
    color: var(--orange-light);
}

.copyright {
    width: min(var(--max), calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid var(--line);
    padding: 18px 0 28px;
    color: var(--muted-2);
    font-size: 13px;
}

.is-hidden {
    display: none !important;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

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

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

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 280px;
        padding: 52px;
    }
}

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 34px;
        align-content: center;
    }

    .hero-poster {
        width: min(300px, 74vw);
        height: auto;
        aspect-ratio: 2 / 3;
    }

    .hero-search-card,
    .player-layout,
    .detail-layout,
    .detail-text,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-search-card form,
    .big-search {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search-card input,
    .big-search input,
    .hero-search-card button,
    .big-search button {
        width: 100%;
    }

    .detail-layout {
        padding: 34px;
    }

    .detail-poster {
        width: min(320px, 80vw);
    }

    .player-layout {
        gap: 18px;
    }

    .rank-row {
        grid-template-columns: 48px 62px minmax(0, 1fr);
    }

    .rank-row .ghost-link {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .header-inner {
        width: calc(100% - 24px);
    }

    .brand-text small {
        display: none;
    }

    .hero-carousel,
    .content-section,
    .page-hero,
    .detail-hero,
    .player-page {
        width: calc(100% - 24px);
    }

    .hero-shell {
        min-height: 700px;
        border-radius: 24px;
    }

    .hero-slide {
        padding: 24px;
    }

    .hero-content p,
    .page-hero p,
    .detail-one-line,
    .player-info p {
        font-size: 15px;
    }

    .hero-controls {
        left: 24px;
        bottom: 24px;
    }

    .page-hero.compact-hero {
        padding: 32px 22px;
        border-radius: 24px;
    }

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

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

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

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

    .movie-card p {
        min-height: auto;
    }

    .rank-row {
        gap: 10px;
        padding: 10px;
    }

    .rank-content p {
        display: none;
    }

    .detail-layout,
    .player-page {
        padding: 20px;
    }

    .text-card,
    .player-info {
        padding: 20px;
    }
}
