:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-solid: #0f172a;
    --panel-soft: rgba(30, 41, 59, 0.68);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --orange: #f97316;
    --orange-dark: #ea580c;
    --amber: #f59e0b;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 16% 12%, rgba(249, 115, 22, 0.16), transparent 26rem),
        radial-gradient(circle at 80% 8%, rgba(245, 158, 11, 0.12), transparent 24rem),
        linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.26);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 70px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    -webkit-background-clip: text;
    color: transparent;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    font-weight: 650;
}

.main-nav a,
.nav-dropdown button {
    color: #e2e8f0;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown:hover button {
    color: #fb923c;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 16px);
    left: 0;
    display: grid;
    gap: 2px;
    min-width: 180px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

.dropdown-panel a {
    padding: 10px 12px;
    border-radius: 10px;
}

.dropdown-panel a:hover {
    background: rgba(30, 41, 59, 0.9);
}

.top-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.search-page-form input {
    width: 260px;
    padding: 11px 16px;
    color: #fff;
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    outline: none;
    transition: 0.2s ease;
}

.top-search input:focus,
.search-page-form input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.top-search button,
.search-page-form button {
    padding: 11px 18px;
    color: #fff;
    background: var(--orange);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.2s ease;
}

.top-search button:hover,
.search-page-form button:hover {
    background: var(--orange-dark);
}

.mobile-toggle,
.mobile-panel {
    display: none;
}

.hero-wrap {
    padding: 34px 0 10px;
}

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.28), rgba(15, 23, 42, 0.7)),
        #111827;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    transform: translateX(26px) scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.14) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, transparent 54%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    padding: 64px;
}

.eyebrow {
    margin: 0 0 12px;
    color: #fb923c;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

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

.hero-content p:not(.eyebrow),
.page-hero p:not(.eyebrow),
.detail-one-line {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
    padding: 7px 11px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    font-size: 12px;
}

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

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

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 16px 36px rgba(249, 115, 22, 0.26);
}

.primary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 42px rgba(249, 115, 22, 0.34);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(2, 6, 23, 0.34);
    backdrop-filter: blur(14px);
}

.ghost-btn:hover {
    border-color: var(--orange);
    color: #fed7aa;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #fff;
    font-size: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.44);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transform: translateY(-50%);
    transition: 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(249, 115, 22, 0.88);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

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

.quick-channel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 16px 0 10px;
}

.quick-channel a,
.category-tile,
.rank-panel,
.movie-card,
.category-overview-block,
.detail-content article,
.player-shell {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.16);
}

.quick-channel a {
    padding: 18px;
    color: #fff;
    text-align: center;
    font-weight: 800;
    transition: 0.2s ease;
}

.quick-channel a:hover {
    border-color: rgba(249, 115, 22, 0.42);
    background: rgba(249, 115, 22, 0.12);
    transform: translateY(-2px);
}

.section-block {
    margin-top: 54px;
}

.no-margin {
    margin-top: 0;
}

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

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

.section-heading p:not(.eyebrow) {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-heading > a {
    flex: 0 0 auto;
    color: #fb923c;
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    transition: 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(249, 115, 22, 0.48);
    transform: translateY(-5px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.38), transparent 48%),
        linear-gradient(135deg, #1e293b, #020617);
}

.poster-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(2, 6, 23, 0.5));
}

.poster-link img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.play-mark {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 42px;
    background: rgba(0, 0, 0, 0.38);
    opacity: 0;
    transition: 0.2s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
}

.corner-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 5px 9px;
    color: #fff;
    background: var(--orange);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

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

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

.movie-card h3 a:hover,
.rank-item h3 a:hover,
.category-tile a:hover {
    color: #fb923c;
}

.card-line {
    display: -webkit-box;
    min-height: 47px;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 13px;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 26px;
    align-items: start;
    margin-top: 54px;
}

.rank-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    transition: 0.2s ease;
}

.rank-item:hover {
    border-color: rgba(249, 115, 22, 0.38);
    background: rgba(30, 41, 59, 0.72);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #fff;
    background: rgba(249, 115, 22, 0.88);
    border-radius: 14px;
    font-weight: 900;
}

.rank-thumb {
    display: block;
    width: 74px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), #0f172a);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0;
    font-size: 15px;
}

.rank-item p {
    display: -webkit-box;
    margin: 7px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-item span {
    display: block;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
}

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

.category-tile {
    padding: 22px;
    transition: 0.2s ease;
}

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

.category-tile h3 {
    margin: 0;
    font-size: 20px;
}

.category-tile p {
    min-height: 75px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.category-tile div {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    color: #cbd5e1;
    font-size: 14px;
}

.page-hero {
    margin-top: 34px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 18% 22%, rgba(249, 115, 22, 0.22), transparent 22rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
}

.small-hero h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.category-overview-block {
    margin-top: 34px;
    padding: 24px;
}

.search-page-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.search-page-form input {
    width: min(520px, 100%);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    isolation: isolate;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), #020617);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.95)),
        linear-gradient(0deg, #020617 0%, transparent 46%);
    backdrop-filter: blur(6px);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.34;
}

.detail-hero-inner {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 44px;
    align-items: center;
    min-height: 560px;
    padding: 50px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), #0f172a);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 26px;
    color: #94a3b8;
    font-size: 14px;
}

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

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.detail-meta span {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 13px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
}

.detail-meta b {
    color: #fb923c;
}

.large-tags {
    margin-bottom: 26px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
}

.movie-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background:
        radial-gradient(circle, rgba(249, 115, 22, 0.4), rgba(2, 6, 23, 0.62) 40%, rgba(2, 6, 23, 0.84));
    cursor: pointer;
}

.player-cover span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    padding-left: 5px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    border-radius: 50%;
    box-shadow: 0 24px 55px rgba(249, 115, 22, 0.36);
}

.player-shell.playing .player-cover {
    display: none;
}

.detail-content article {
    padding: 34px;
}

.detail-content h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.detail-content h2 + p {
    margin-top: 0;
}

.detail-content p {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 2;
}

.site-footer {
    margin-top: 80px;
    background: rgba(15, 23, 42, 0.86);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr;
    gap: 34px;
    padding: 42px 0;
    color: var(--muted);
}

.footer-brand {
    margin-bottom: 16px;
}

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

.site-footer p {
    max-width: 560px;
    margin: 0;
    line-height: 1.8;
}

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

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

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

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

    .mobile-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
        width: 42px;
        height: 42px;
        color: #fff;
        background: #1e293b;
        border: 0;
        border-radius: 12px;
    }

    .mobile-panel.open {
        display: grid;
        gap: 10px;
        width: min(1180px, calc(100% - 32px));
        margin: 0 auto;
        padding: 0 0 18px;
    }

    .mobile-panel a {
        padding: 12px 14px;
        background: rgba(30, 41, 59, 0.7);
        border-radius: 12px;
    }

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

    .two-column-section,
    .full-rank-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }

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

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

    .brand {
        font-size: 20px;
    }

    .hero-carousel {
        min-height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 30px 22px 70px;
    }

    .hero-content p:not(.eyebrow),
    .page-hero p:not(.eyebrow),
    .detail-one-line {
        font-size: 16px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-channel,
    .movie-grid,
    .compact-grid,
    .category-movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 34px 22px;
        border-radius: 22px;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: auto;
        padding: 34px 0 84px;
    }

    .detail-poster {
        width: min(260px, 78vw);
    }

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

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

    .rank-item {
        grid-template-columns: 38px 64px minmax(0, 1fr);
        gap: 10px;
    }
}
