
:root {
    --bg: #0b1020;
    --bg-deep: #060913;
    --panel: rgba(17, 24, 39, 0.72);
    --panel-strong: rgba(31, 41, 55, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --line-strong: rgba(249, 115, 22, 0.45);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --orange: #f97316;
    --cyan: #22d3ee;
    --pink: #fb7185;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --radius: 24px;
}

* {
    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.18), transparent 38rem),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 42rem),
        linear-gradient(135deg, #111827 0%, #0b1020 42%, #050816 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: 0.26;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 9, 19, 0.88);
    backdrop-filter: blur(18px);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px clamp(18px, 4vw, 48px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--cyan));
    box-shadow: 0 10px 32px rgba(249, 115, 22, 0.32);
}

.brand-name {
    font-size: 1.2rem;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fb923c, #ffffff, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-link,
.mobile-link {
    color: var(--muted-strong);
    transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: #fb923c;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: white;
    background: rgba(31, 41, 55, 0.7);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 2px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 22px 18px;
}

.mobile-nav.open {
    display: grid;
}

.mobile-link {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.8);
}

main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 600ms ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
}

.hero-bg::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at 72% 34%, rgba(34, 211, 238, 0.2), transparent 20rem),
        linear-gradient(0deg, rgba(6, 9, 19, 0.96), rgba(6, 9, 19, 0.22) 45%, rgba(6, 9, 19, 0.78));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
    gap: clamp(32px, 5vw, 76px);
    align-items: center;
    width: min(1320px, calc(100% - 36px));
    margin: 0 auto;
    padding: 100px 0 120px;
}

.hero-copy {
    max-width: 820px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fb923c;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5.8rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, #fdba74, #ffffff, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-summary {
    max-width: 760px;
    margin: 26px 0 0;
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.hero-tags,
.tag-row,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin: 28px 0 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.rank-meta span {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.58);
}

.hero-tags span,
.tag-row span {
    padding: 6px 11px;
    font-size: 0.78rem;
}

.detail-meta span,
.rank-meta span {
    padding: 7px 12px;
    font-size: 0.9rem;
}

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

.compact-actions {
    margin-top: 24px;
}

.primary-button,
.ghost-button,
.small-button,
.home-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border: 0;
    border-radius: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.primary-button,
.home-search button {
    padding: 0 24px;
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
    box-shadow: 0 16px 40px rgba(249, 115, 22, 0.28);
}

.ghost-button,
.small-button {
    padding: 0 20px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(15, 23, 42, 0.68);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover,
.home-search button:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.58);
    box-shadow: 0 18px 46px rgba(34, 211, 238, 0.18);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    box-shadow: var(--shadow);
    transform: perspective(1200px) rotateY(-9deg) rotateX(3deg);
}

.hero-poster::before {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.22), transparent 42%);
    pointer-events: none;
}

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

.hero-controls {
    position: absolute;
    right: clamp(22px, 5vw, 72px);
    bottom: 36px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-prev,
.hero-next,
.hero-dot {
    border: 1px solid var(--line);
    color: white;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.8rem;
    line-height: 1;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
}

.hero-dot.active {
    width: 30px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange), var(--cyan));
}

.content-section,
.home-search-section,
.ranking-section,
.article-section,
.player-section,
.detail-hero,
.page-hero,
.stacked-sections {
    width: min(1440px, calc(100% - 36px));
    margin: 0 auto;
}

.content-section,
.home-search-section,
.ranking-section,
.article-section,
.player-section {
    padding: 78px 0;
}

.soft-bg {
    width: 100%;
    max-width: none;
    padding-right: max(18px, calc((100vw - 1440px) / 2));
    padding-left: max(18px, calc((100vw - 1440px) / 2));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.26), rgba(30, 41, 59, 0.36));
}

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

.section-heading.centered {
    display: block;
    max-width: 860px;
    margin: 0 auto 26px;
    text-align: center;
}

.section-heading h2,
.article-section h2,
.category-panel h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.15;
}

.section-heading p,
.page-hero p,
.category-panel p,
.home-search-section p {
    color: var(--muted);
}

.text-link {
    color: #67e8f9;
    font-weight: 800;
}

.home-search {
    display: flex;
    gap: 12px;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: var(--shadow);
}

.home-search input,
.search-box input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.88);
}

.home-search input {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
}

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

.category-tile,
.category-panel,
.movie-card,
.rank-row,
.article-section,
.player-shell,
.detail-grid,
.filter-panel {
    border: 1px solid var(--line);
    background: var(--panel);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.2);
}

.category-tile {
    min-height: 180px;
    padding: 22px;
    border-radius: var(--radius);
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.category-tile span {
    display: block;
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.category-tile:hover,
.movie-card:hover,
.rank-row:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    background: rgba(31, 41, 55, 0.84);
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #020617;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 500ms ease;
}

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

.year-badge,
.type-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
    color: white;
    backdrop-filter: blur(8px);
}

.year-badge {
    top: 10px;
    right: 10px;
    background: rgba(249, 115, 22, 0.9);
}

.type-badge {
    bottom: 10px;
    left: 10px;
    background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
    top: 10px;
    left: 10px;
    background: rgba(34, 211, 238, 0.9);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.38;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.86rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero,
.detail-hero {
    padding: 66px 0 44px;
}

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

.page-hero p {
    max-width: 820px;
    margin: 22px auto 0;
    font-size: 1.08rem;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(160px, 0.6fr));
    gap: 12px;
    width: min(1440px, calc(100% - 36px));
    margin: 20px auto 0;
    padding: 14px;
    border-radius: 22px;
}

.search-box input,
.filter-panel select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
}

.filter-panel select option {
    color: #0f172a;
}

.page-list-section {
    padding-top: 46px;
}

.empty-state {
    display: none;
    margin: 38px auto 0;
    max-width: 520px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.72);
}

.searchable-list.is-empty + .empty-state,
.ranking-list.is-empty + .empty-state {
    display: block;
}

.stacked-sections {
    display: grid;
    gap: 24px;
    padding-bottom: 80px;
}

.category-panel {
    padding: 28px;
    border-radius: var(--radius);
}

.category-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.category-panel p {
    max-width: 780px;
    margin: 10px 0 0;
}

.ranking-section {
    padding-top: 40px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 82px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 15px;
    border-radius: 22px;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 17px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--cyan));
}

.rank-cover img {
    width: 82px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 1.12rem;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted-strong);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    padding: 30px;
    border-radius: 30px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.94rem;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-one-line {
    max-width: 900px;
    margin: 22px 0;
    color: #dbeafe;
    font-size: 1.14rem;
}

.large-tags {
    margin-top: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: white;
    font-size: 1.05rem;
    font-weight: 900;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.3), rgba(2, 6, 23, 0.86));
    cursor: pointer;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.play-cover.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: white;
    font-size: 2.1rem;
    background: linear-gradient(135deg, var(--orange), var(--cyan));
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.38);
}

.article-section {
    margin-top: 42px;
    padding: 34px;
    border-radius: var(--radius);
}

.article-section h2 {
    margin: 0 0 14px;
    font-size: 1.6rem;
}

.article-section h2:not(:first-child) {
    margin-top: 30px;
}

.article-section p {
    margin: 0;
    color: var(--muted-strong);
    font-size: 1.04rem;
}

.site-footer {
    margin-top: 40px;
    border-top: 1px solid var(--line);
    background: rgba(3, 7, 18, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr 0.75fr 1fr;
    gap: 36px;
    width: min(1440px, calc(100% - 36px));
    margin: 0 auto;
    padding: 50px 0;
}

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

.site-footer h3 {
    margin: 0 0 14px;
    font-size: 1rem;
}

.site-footer p,
.site-footer a,
.footer-bottom {
    color: var(--muted);
}

.site-footer p {
    margin: 0;
}

.site-footer ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

.footer-bottom {
    width: min(1440px, calc(100% - 36px));
    margin: 0 auto;
    padding: 20px 0 30px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.9rem;
}

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

    .menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 820px) {
    .hero-carousel {
        min-height: 660px;
    }

    .hero-content {
        padding: 74px 0 110px;
    }

    .hero-controls {
        right: 18px;
        bottom: 24px;
    }

    .home-search,
    .section-heading,
    .category-panel-head,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .rank-row .small-button {
        grid-column: 1 / -1;
    }

    .rank-number {
        width: 44px;
        height: 44px;
    }

    .rank-cover img {
        width: 70px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .detail-poster {
        max-width: 310px;
        margin: 0 auto;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    .site-nav {
        padding: 14px 16px;
    }

    .brand-name {
        font-size: 1rem;
    }

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

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 2.25rem;
    }

    .content-section,
    .home-search-section,
    .ranking-section,
    .article-section,
    .player-section {
        padding: 52px 0;
    }

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

    .article-section {
        padding: 22px;
    }
}
