:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #f59e0b;
    --accent-soft: rgba(245, 158, 11, 0.16);
    --accent-light: #fbbf24;
    --danger: #ef4444;
    --radius: 22px;
    --shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 28rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 26rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--accent-light), #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--accent);
    color: #111827;
    font-size: 15px;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.45);
}

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

.nav-link {
    color: var(--muted-strong);
    font-size: 15px;
    font-weight: 700;
    padding: 9px 0;
    transition: color 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.85);
    overflow: hidden;
}

.header-search input {
    width: 210px;
    padding: 10px 14px;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: none;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-bar button,
.play-layer {
    border: 0;
    cursor: pointer;
}

.header-search button {
    padding: 10px 16px;
    background: var(--accent);
    color: #111827;
    font-weight: 800;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

.mobile-nav a {
    padding: 12px 14px;
    color: var(--muted-strong);
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid var(--line);
    border-radius: 14px;
}

main {
    min-height: 65vh;
}

.hero-slider {
    position: relative;
    height: min(740px, 72vh);
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18)),
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.12) 36%, rgba(2, 6, 23, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 24px;
    animation: fade-in 0.6s ease-out;
}

.hero-kicker,
.page-kicker,
.wide-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--accent-light);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-copy h1 {
    margin: 18px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.03;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 620px;
    color: var(--muted-strong);
    font-size: 18px;
    line-height: 1.8;
}

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

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    background: var(--accent);
    color: #111827;
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.25);
}

.secondary-btn {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.primary-btn:hover,
.secondary-btn:hover,
.movie-card:hover,
.wide-card:hover,
.category-tile:hover,
.rank-row:hover {
    transform: translateY(-4px);
}

.primary-btn:hover {
    background: var(--accent-light);
    box-shadow: 0 22px 50px rgba(245, 158, 11, 0.36);
}

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

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.22);
    font-size: 12px;
    font-weight: 700;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: var(--text);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-arrow:hover {
    background: rgba(245, 158, 11, 0.82);
    color: #111827;
}

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

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

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

.hero-dots button {
    width: 18px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 42px;
    background: var(--accent-light);
}

.section,
.page-shell,
.detail-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.section {
    padding: 70px 0;
}

.section.alt {
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(30, 41, 59, 0.34));
}

.section.alt > .section-inner {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-link {
    color: var(--accent-light);
    font-weight: 900;
}

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

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

.movie-card,
.wide-card,
.category-tile,
.rank-row,
.detail-panel,
.filter-panel,
.search-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
}

.movie-card:hover,
.wide-card:hover,
.category-tile:hover,
.rank-row:hover {
    background: var(--panel-strong);
    border-color: rgba(245, 158, 11, 0.36);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.92));
    overflow: hidden;
}

.poster-link img,
.wide-card img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.type-pill,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.type-pill {
    top: 12px;
    right: 12px;
    min-height: 28px;
    padding: 0 10px;
    color: #111827;
    background: var(--accent-light);
    font-size: 12px;
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.3);
}

.card-body {
    padding: 16px;
}

.card-body h2,
.wide-card h2,
.rank-row h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.card-body h2 a:hover,
.wide-card:hover h2,
.rank-row:hover h2 {
    color: var(--accent-light);
}

.card-meta,
.card-desc,
.wide-card p,
.page-title p,
.detail-title p,
.detail-panel p,
.footer-grid p,
.empty-state {
    color: var(--muted);
}

.card-meta {
    margin: 0 0 10px;
    font-size: 13px;
}

.card-desc {
    min-height: 54px;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
    font-size: 14px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 210px;
}

.wide-card > div {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wide-card p {
    margin: 0 0 14px;
    line-height: 1.7;
}

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

.category-tile {
    min-height: 210px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        linear-gradient(145deg, rgba(245, 158, 11, 0.16), transparent 42%),
        var(--panel);
}

.category-tile h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
}

.category-tile p {
    margin: 0 0 22px;
    color: var(--muted-strong);
    line-height: 1.7;
}

.category-tile span {
    color: var(--accent-light);
    font-weight: 900;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 56px 86px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 12px;
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #111827;
    background: var(--accent-light);
    font-weight: 950;
}

.rank-row img {
    width: 86px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.85);
}

.rank-row p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.rank-row .primary-btn {
    min-height: 42px;
    padding: 0 18px;
}

.page-hero {
    padding: 68px 0 34px;
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.74), transparent),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 25rem);
}

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

.page-title p {
    max-width: 760px;
    margin: 16px 0 0;
    font-size: 17px;
    line-height: 1.8;
}

.filter-panel,
.search-panel {
    padding: 20px;
    margin: 28px 0;
}

.filter-bar,
.search-panel form {
    display: grid;
    grid-template-columns: 1.5fr repeat(2, minmax(150px, 0.45fr)) auto;
    gap: 12px;
}

.filter-bar input,
.filter-bar select,
.search-panel input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.7);
    border: 1px solid var(--line);
    border-radius: 14px;
    outline: none;
}

.filter-bar button,
.search-panel button {
    min-height: 46px;
    padding: 0 20px;
    color: #111827;
    background: var(--accent-light);
    border-radius: 14px;
    font-weight: 900;
}

.empty-state {
    display: none;
    padding: 26px;
    text-align: center;
}

.empty-state.show {
    display: block;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    background: #020617;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(24px);
    transform: scale(1.12);
    opacity: 0.28;
}

.detail-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.62), #020617 92%);
}

.detail-shell {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 36px;
    padding: 64px 0 46px;
}

.detail-cover {
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(30, 41, 59, 0.92);
    box-shadow: var(--shadow);
    aspect-ratio: 2 / 3;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--accent-light);
}

.detail-title h1 {
    margin: 0 0 18px;
}

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

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--muted-strong);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line);
}

.detail-title p {
    max-width: 820px;
    line-height: 1.85;
    font-size: 17px;
}

.player-section {
    padding: 48px 0 0;
}

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

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.48);
    transition: opacity 0.22s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #111827;
    background: var(--accent-light);
    font-size: 30px;
    box-shadow: 0 0 45px rgba(245, 158, 11, 0.55);
}

.player-message {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: none;
    padding: 10px 14px;
    border-radius: 999px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.76);
    transform: translateX(-50%);
}

.player-message.show {
    display: inline-flex;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 34px 0 72px;
}

.detail-panel {
    padding: 26px;
}

.detail-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 950;
}

.detail-panel p {
    margin: 0 0 18px;
    line-height: 1.95;
    font-size: 16px;
}

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

.related-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.related-list a:hover {
    border-color: rgba(245, 158, 11, 0.36);
}

.related-list img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(30, 41, 59, 0.85);
}

.related-list h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 900;
}

.related-list p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), #020617);
    border-top: 1px solid var(--line);
}

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

.footer-grid h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 900;
}

.footer-grid a {
    display: block;
    margin: 9px 0;
    color: var(--muted-strong);
}

.footer-grid a:hover {
    color: var(--accent-light);
}

.footer-grid p {
    margin: 14px 0 0;
    line-height: 1.8;
}

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

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

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

    .hero-content {
        padding: 80px 0;
    }

    .hero-arrow {
        display: none;
    }

    .movie-grid,
    .movie-grid.three,
    .category-grid,
    .search-results,
    .wide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .wide-card {
        grid-template-columns: 1fr;
    }

    .wide-card img {
        aspect-ratio: 16 / 10;
    }

    .filter-bar,
    .search-panel form {
        grid-template-columns: 1fr;
    }

    .detail-shell {
        grid-template-columns: 1fr;
    }

    .detail-cover {
        width: min(280px, 80vw);
    }

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

@media (max-width: 560px) {
    .header-inner {
        height: 64px;
    }

    .logo {
        font-size: 20px;
    }

    .movie-grid,
    .movie-grid.three,
    .category-grid,
    .search-results {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 46px 0;
    }

    .rank-row {
        grid-template-columns: 44px 72px 1fr;
    }

    .rank-row .primary-btn {
        grid-column: 2 / 4;
    }

    .rank-row img {
        width: 72px;
        height: 96px;
    }
}
