:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.95);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --amber: #f59e0b;
    --amber-deep: #d97706;
    --orange: #f97316;
    --rose: #fb7185;
    --blue: #38bdf8;
    --shadow: 0 24px 70px rgba(2, 6, 23, 0.5);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.18), transparent 36rem),
        radial-gradient(circle at 90% 10%, rgba(56, 189, 248, 0.14), transparent 34rem),
        linear-gradient(135deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.74);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #111827;
    background: linear-gradient(135deg, #facc15, #fb923c);
    box-shadow: 0 14px 32px rgba(245, 158, 11, 0.35);
}

.logo-text,
.footer-logo {
    background: linear-gradient(90deg, #facc15, #fb923c);
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
}

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

.nav-link {
    padding: 10px 16px;
    color: var(--soft);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.16);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.82);
}

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

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
}

.hero {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1s ease;
    pointer-events: none;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12);
}

.hero-shade,
.detail-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 38%, rgba(245, 158, 11, 0.18), transparent 28rem),
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(to top, #020617 0%, transparent 42%);
}

.hero-inner {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 720px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
    align-items: center;
    padding: 84px 0 144px;
}

.hero-kicker,
.page-hero span,
.compact-hero span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 13px;
    border: 1px solid rgba(245, 158, 11, 0.36);
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(245, 158, 11, 0.12);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    max-width: 820px;
    margin: 0;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--soft);
    font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    padding: 5px 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: #fde68a;
    background: rgba(15, 23, 42, 0.62);
    font-size: 12px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #111827;
    background: linear-gradient(135deg, #facc15, #fb923c);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.ghost-btn {
    border: 1px solid var(--line);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.hero-poster,
.detail-poster {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

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

.hero-poster span,
.detail-poster span {
    position: absolute;
    top: 18px;
    right: 18px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #111827;
    background: #facc15;
    font-size: 12px;
    font-weight: 900;
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.56);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
}

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

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

.hero-arrow:hover {
    background: rgba(245, 158, 11, 0.92);
}

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

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

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

.hero-thumbs {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 76px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    width: min(680px, calc(100% - 32px));
    transform: translateX(-50%);
}

.hero-thumb {
    overflow: hidden;
    min-height: 76px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
    opacity: 0.72;
}

.hero-thumb.is-active,
.hero-thumb:hover {
    opacity: 1;
    border-color: rgba(245, 158, 11, 0.7);
}

.hero-thumb img {
    width: 100%;
    height: 52px;
    object-fit: cover;
}

.hero-thumb span {
    display: block;
    overflow: hidden;
    padding: 5px 8px;
    color: var(--soft);
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.page-hero {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 92px 0 36px;
}

.compact-hero {
    padding-bottom: 20px;
}

.detail-hero {
    min-height: 560px;
}

.detail-inner {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    min-height: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    padding: 64px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 14px;
}

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

.content-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.section-heading {
    position: relative;
    margin-bottom: 26px;
    padding-left: 50px;
}

.section-icon {
    position: absolute;
    left: 0;
    top: 7px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.24);
}

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

.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.movie-grid,
.compact-grid,
.category-grid,
.category-overview-grid,
.horizontal-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card,
.rank-card,
.category-overview-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
    box-shadow: 0 18px 52px rgba(2, 6, 23, 0.24);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.rank-card:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.48);
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.38);
}

.poster-link,
.rank-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img,
.rank-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.rating-badge,
.play-chip,
.rank-poster span {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.rating-badge {
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    color: #111827;
    background: #facc15;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.card-content,
.rank-card-body {
    padding: 18px;
}

.card-content h3,
.rank-card-body h2,
.category-overview-card h2 {
    margin: 10px 0 0;
    font-size: 18px;
    line-height: 1.3;
}

.card-content h3 a:hover,
.rank-card-body h2 a:hover,
.category-overview-card h2 a:hover {
    color: #facc15;
}

.card-content p,
.rank-card-body p,
.category-overview-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

.movie-card.horizontal .poster-link img {
    height: 100%;
    min-height: 248px;
}

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

.movie-card.compact .poster-link img {
    height: 142px;
}

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

.movie-card.compact .card-content h3 {
    margin-top: 0;
    font-size: 15px;
}

.movie-card.compact .card-content p {
    font-size: 13px;
}

.split-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.rank-panel,
.detail-side {
    position: sticky;
    top: 96px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.7);
    box-shadow: var(--shadow);
    padding: 22px;
}

.rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.rank-head h2,
.detail-side h2 {
    margin: 0;
    font-size: 24px;
}

.rank-head a,
.text-link {
    color: #facc15;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 9px;
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.35);
}

.rank-item:hover {
    background: rgba(245, 158, 11, 0.13);
}

.rank-no {
    color: #facc15;
    font-weight: 900;
}

.rank-item img {
    width: 54px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.search-panel {
    display: grid;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
}

.search-panel input {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    outline: none;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.54);
    padding: 0 18px;
}

.search-panel input:focus {
    border-color: rgba(245, 158, 11, 0.74);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-pills button {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--soft);
    background: rgba(2, 6, 23, 0.36);
    cursor: pointer;
    padding: 0 14px;
}

.filter-pills button:hover,
.filter-pills button.is-active {
    color: #111827;
    background: #facc15;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0f172a;
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.54;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(to top, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.16));
}

.category-card span,
.category-card em {
    position: relative;
    z-index: 2;
    display: block;
    padding: 0 18px;
}

.category-card span {
    margin-top: 150px;
    font-size: 20px;
    font-weight: 900;
}

.category-card em {
    margin-top: 5px;
    color: var(--soft);
    font-size: 13px;
    font-style: normal;
}

.category-card:hover img {
    opacity: 0.72;
    transform: scale(1.06);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 7px;
}

.category-stack img {
    width: 100%;
    height: 126px;
    border-radius: 14px;
    object-fit: cover;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
}

.rank-poster span {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    color: #111827;
    background: #facc15;
}

.player-section {
    padding-top: 48px;
    padding-bottom: 22px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 30px;
    background: #000000;
    box-shadow: var(--shadow);
}

.media-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, #facc15, #fb923c);
    box-shadow: 0 18px 40px rgba(245, 158, 11, 0.3);
    font-size: 28px;
}

.player-cover strong {
    padding: 0 24px;
    text-align: center;
    font-size: clamp(22px, 3vw, 36px);
}

.detail-article,
.detail-block {
    min-width: 0;
}

.detail-block {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.62);
}

.detail-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-block p {
    margin: 0;
    color: var(--soft);
}

.info-grid {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 12px 18px;
}

.info-grid span {
    color: var(--muted);
}

.info-grid strong {
    color: #ffffff;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 40px;
    padding: 48px 0;
}

.footer-inner p {
    max-width: 460px;
    color: var(--muted);
}

.footer-inner h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 10px;
    color: var(--soft);
}

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

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    color: var(--muted);
    font-size: 14px;
}

@media (max-width: 1024px) {
    .hero-inner,
    .detail-inner,
    .split-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .detail-poster {
        max-width: 280px;
    }

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

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

    .rank-panel,
    .detail-side {
        position: relative;
        top: auto;
    }
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero,
    .hero-inner {
        min-height: 680px;
    }

    .hero-inner {
        padding-top: 58px;
        padding-bottom: 170px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        bottom: 72px;
    }

    .hero-thumb:nth-child(n+3) {
        display: none;
    }

    .movie-grid,
    .compact-grid,
    .horizontal-grid,
    .movie-grid.six,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.horizontal,
    .movie-card.compact,
    .category-overview-card,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .movie-card.compact .poster-link img,
    .movie-card.horizontal .poster-link img {
        height: auto;
    }

    .category-overview-card {
        padding: 14px;
    }

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

    .detail-inner {
        gap: 24px;
        padding-top: 42px;
    }

    .detail-copy h1,
    .page-hero h1,
    .hero h1 {
        letter-spacing: -0.035em;
    }
}
