:root {
    color-scheme: dark;
    --bg: #050506;
    --bg-soft: #10131a;
    --panel: rgba(17, 24, 39, 0.82);
    --panel-strong: #151a24;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f8fafc;
    --muted: #aab3c2;
    --soft: #d1d5db;
    --amber: #f59e0b;
    --amber-strong: #fbbf24;
    --accent: #f97316;
    --radius: 22px;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 16% 10%, rgba(245, 158, 11, 0.14), transparent 30%),
        radial-gradient(circle at 86% 6%, rgba(249, 115, 22, 0.14), transparent 28%),
        linear-gradient(180deg, #030304 0%, #0a0d14 44%, #030304 100%);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

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

.nav-shell {
    width: min(1240px, calc(100% - 28px));
    height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--accent));
    color: #111827;
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.35);
}

.brand-name {
    color: #fff7ed;
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

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

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--amber-strong);
    background: rgba(245, 158, 11, 0.1);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 310px;
}

.nav-search input,
.mobile-panel input,
.inline-filter input,
.big-search input {
    width: 100%;
    color: var(--text);
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: none;
    padding: 12px 16px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-panel input:focus,
.inline-filter input:focus,
.big-search input:focus {
    border-color: rgba(245, 158, 11, 0.75);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.nav-search button,
.mobile-panel button,
.big-search button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    color: #121212;
    background: linear-gradient(135deg, var(--amber-strong), var(--accent));
    padding: 12px 18px;
    font-weight: 800;
    white-space: nowrap;
}

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

.menu-toggle span {
    display: block;
    height: 2px;
    background: #fff7ed;
    margin: 5px 0;
    border-radius: 999px;
}

.mobile-panel {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
}

.mobile-panel nav,
.mobile-panel form {
    display: grid;
    gap: 10px;
}

.mobile-panel a {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
}

.hero-slider {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    filter: saturate(1.1) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.52) 42%, rgba(0, 0, 0, 0.24) 100%),
        linear-gradient(0deg, #030304 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 610px;
    display: flex;
    align-items: center;
    padding: 80px 0 86px;
}

.hero-card {
    max-width: 690px;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.56));
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.kicker {
    display: inline-flex;
    color: var(--amber-strong);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hero-card h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero-intro,
.page-hero p,
.section-heading p,
.category-overview-head p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-intro {
    max-width: 620px;
    font-size: 18px;
    margin: 20px 0;
}

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

.hero-meta span,
.detail-meta span {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.11);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 13px 20px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: #14110b;
    background: linear-gradient(135deg, var(--amber-strong), var(--accent));
    box-shadow: 0 14px 34px rgba(245, 158, 11, 0.26);
}

.btn.ghost {
    color: #fff7ed;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
}

.btn.text {
    color: var(--amber-strong);
    padding-left: 4px;
}

.btn.full {
    width: 100%;
}

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

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

.hero-dots button.active {
    background: var(--amber-strong);
}

.section {
    padding: 58px 0;
}

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

.page-hero {
    margin-top: 34px;
    padding: 54px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.62));
    box-shadow: var(--shadow);
}

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

.search-panel {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 26px;
    align-items: center;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(17, 24, 39, 0.72);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-heading h2,
.category-overview-head h2,
.detail-card h1,
.detail-card h2,
.side-card h2 {
    margin: 0;
}

.big-search {
    display: flex;
    gap: 12px;
}

.section-heading,
.category-overview-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 26px;
}

.section-heading h2,
.category-overview-head h2 {
    font-size: clamp(28px, 3.4vw, 44px);
}

.section-link {
    color: var(--amber-strong);
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 800;
    white-space: nowrap;
}

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

.compact-grid,
.mini-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.86));
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
    transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.34);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.38);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.35s ease;
}

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

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 40%;
    background: linear-gradient(0deg, rgba(3, 5, 9, 0.88), transparent);
}

.card-index {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 12px;
    color: #111827;
    background: var(--amber-strong);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--amber-strong);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

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

.card-body h3 a:hover {
    color: var(--amber-strong);
}

.card-body p {
    min-height: 66px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.18);
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 12px;
}

.category-grid,
.category-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.category-tile,
.category-link-card {
    display: grid;
    gap: 12px;
    min-height: 190px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(15, 23, 42, 0.72));
    transition: transform 0.2s ease, border 0.2s ease;
}

.category-tile:hover,
.category-link-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 158, 11, 0.36);
}

.category-tile span,
.category-link-card span {
    color: var(--amber-strong);
    font-weight: 900;
    font-size: 20px;
}

.category-tile strong,
.category-link-card p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    font-weight: 500;
    margin: 0;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: auto;
}

.category-thumbs img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #111827;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.large-rank-list {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.stacked-sections {
    display: grid;
    gap: 38px;
}

.category-overview-block {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(17, 24, 39, 0.55);
}

.inline-filter {
    max-width: 620px;
    margin-top: 26px;
}

.wide-filter {
    max-width: 760px;
}

.empty-state {
    margin: 28px 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    text-align: center;
    color: var(--muted);
    background: rgba(17, 24, 39, 0.62);
}

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

.breadcrumbs a {
    color: var(--amber-strong);
}

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

.detail-primary,
.detail-side {
    display: grid;
    gap: 22px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    cursor: pointer;
    color: #fff7ed;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.14));
    transition: opacity 0.2s ease;
}

.play-overlay strong {
    font-size: 18px;
    letter-spacing: 0.08em;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-strong), var(--accent));
    box-shadow: 0 20px 54px rgba(245, 158, 11, 0.4);
}

.play-icon::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    border-left: 22px solid #111827;
    margin-left: 5px;
}

.movie-player.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

.detail-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--panel);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
    padding: 26px;
}

.detail-card h1 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.detail-card h2 {
    margin-top: 28px;
    color: #fff7ed;
}

.detail-card p {
    color: var(--soft);
    line-height: 1.9;
    font-size: 16px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 16px;
    background: #111827;
}

.poster-side {
    display: grid;
    gap: 12px;
}

.info-list {
    display: grid;
    gap: 13px;
    margin: 18px 0 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    color: #fff7ed;
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.prev-next a {
    padding: 16px;
    border-radius: 18px;
    color: var(--amber-strong);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.18);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(3, 5, 9, 0.74);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
    padding: 42px 0;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted);
    line-height: 1.7;
}

.footer-grid h2 {
    color: #fff7ed;
    font-size: 18px;
    margin: 0 0 12px;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
}

.footer-grid a:hover {
    color: var(--amber-strong);
}

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: #7c8799;
    border-top: 1px solid var(--line);
}

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

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

    .hero-slider,
    .hero-content {
        min-height: 560px;
    }

    .hero-card {
        padding: 26px;
    }

    .search-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 680px) {
    .container,
    .nav-shell,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

    .nav-shell {
        height: 66px;
    }

    .brand-name {
        font-size: 17px;
    }

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

    .hero-slider,
    .hero-content {
        min-height: 620px;
    }

    .hero-card,
    .page-hero,
    .category-overview-block,
    .detail-card,
    .side-card,
    .search-panel {
        border-radius: 22px;
        padding: 22px;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-body p {
        min-height: 62px;
        font-size: 12px;
    }

    .detail-side,
    .prev-next {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 38px 0;
    }
}
