* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: rgba(30, 41, 59, 0.74);
    --panel-strong: #1e293b;
    --line: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #cbd5e1;
    --accent: #fbbf24;
    --accent-strong: #f59e0b;
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at 20% 0%, rgba(251, 191, 36, 0.13), transparent 26%), linear-gradient(180deg, #0b1120 0%, var(--bg) 42%, #020617 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav-shell {
    width: min(1240px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(251, 191, 36, 0.16);
    color: var(--accent);
    border: 1px solid rgba(251, 191, 36, 0.26);
    box-shadow: 0 0 24px rgba(251, 191, 36, 0.18);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    overflow: hidden;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a,
.footer-links a {
    color: var(--muted-2);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: #fff;
}

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

.nav-search input,
.mobile-panel input,
.page-search input,
.search-panel input,
.filter-form input,
.filter-form select {
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.86);
    color: #fff;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
    width: 220px;
    padding: 10px 12px;
}

.nav-search input:focus,
.mobile-panel input:focus,
.page-search input:focus,
.search-panel input:focus,
.filter-form input:focus,
.filter-form select:focus {
    border-color: rgba(251, 191, 36, 0.75);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.nav-search button,
.mobile-panel button,
.page-search button,
.search-panel button,
.filter-form button,
.primary-btn {
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #111827;
    font-weight: 800;
    padding: 10px 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.mobile-panel button:hover,
.page-search button:hover,
.search-panel button:hover,
.filter-form button:hover,
.primary-btn:hover {
    transform: translateY(-1px);
    background: #fcd34d;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
    color: #fff;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 18px;
    border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
    display: grid;
    gap: 14px;
}

.mobile-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.mobile-panel input {
    min-width: 0;
    padding: 11px 12px;
}

main {
    min-height: 80vh;
}

.content-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    height: 590px;
    overflow: hidden;
    background: #020617;
    margin-top: 66px;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 6s ease;
}

.hero-slide.is-active img {
    transform: scale(1.09);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 36%, rgba(15, 23, 42, 0.2) 68%, rgba(15, 23, 42, 0.74) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 38%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100% - 1240px) / 2));
    bottom: 72px;
    width: min(720px, calc(100% - 48px));
}

.hero-meta,
.eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.hero-meta span,
.eyebrow,
.tag-row span,
.tag-cloud span {
    border: 1px solid rgba(251, 191, 36, 0.28);
    background: rgba(251, 191, 36, 0.12);
    border-radius: 999px;
    padding: 6px 10px;
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 760px;
    color: var(--muted-2);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
}

.hero-movie-title {
    margin: -4px 0 10px;
    color: #fff !important;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    color: #fff;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
    transform: translateY(-1px);
    background: rgba(30, 41, 59, 0.86);
}

.hero-dots {
    position: absolute;
    left: max(24px, calc((100% - 1240px) / 2));
    bottom: 28px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 5px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--accent);
}

.hero-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: -46px;
    position: relative;
    z-index: 3;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 520px);
    gap: 28px;
    align-items: center;
    margin-top: 44px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.54);
    box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.category-overview h2,
.detail-main-text h2,
.detail-info h2,
.site-footer h2 {
    margin: 0;
    color: #fff;
}

.search-panel p,
.section-head p,
.category-overview p,
.page-hero p,
.detail-main-text p,
.detail-info dd,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.search-panel form,
.page-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.search-panel input,
.page-search input {
    padding: 13px 14px;
    min-width: 0;
}

.section-block {
    padding-top: 58px;
}

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

.section-head h2,
.category-overview h2 {
    font-size: clamp(25px, 3vw, 34px);
}

.section-more {
    color: var(--accent);
    font-weight: 800;
    white-space: nowrap;
}

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

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

.movie-card {
    min-width: 0;
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.72);
    box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
}

.landscape .card-cover {
    aspect-ratio: 16 / 9;
}

.card-cover img,
.wide-thumb img,
.rank-thumb img,
.detail-side img,
.category-covers img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.movie-card:hover .card-cover img,
.wide-card:hover .wide-thumb img,
.category-tile:hover .category-covers img {
    transform: scale(1.1);
    filter: saturate(1.08);
}

.card-cover::after,
.wide-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.16) 48%, transparent 100%);
    opacity: 0.55;
    transition: opacity 0.3s ease;
}

.movie-card:hover .card-cover::after,
.wide-card:hover .wide-thumb::after {
    opacity: 0.88;
}

.card-year,
.wide-thumb span {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.72);
    color: #fff;
    font-size: 12px;
}

.card-hover {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    color: #fff;
    line-height: 1.45;
    transform: translateY(120%);
    transition: transform 0.28s ease;
}

.movie-card:hover .card-hover {
    transform: translateY(0);
}

.card-body h3,
.wide-body h3,
.rank-body h3 {
    margin: 12px 0 6px;
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
}

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

.card-body p,
.wide-body p,
.rank-body p {
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
}

.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span,
.tag-cloud span {
    color: var(--accent);
    font-size: 12px;
    padding: 4px 8px;
}

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-width: thin;
}

.scroll-row .movie-card {
    flex: 0 0 286px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.55);
    transition: background 0.2s ease, transform 0.2s ease;
}

.wide-card:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.82);
}

.wide-thumb {
    position: relative;
    min-height: 190px;
    overflow: hidden;
}

.wide-body {
    padding: 20px;
}

.eyebrow {
    display: inline-flex;
    font-size: 13px;
}

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

.category-tile {
    display: block;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.54);
    transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    background: rgba(30, 41, 59, 0.85);
}

.category-covers {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 8px;
    height: 138px;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 16px;
}

.category-covers img {
    border-radius: 12px;
}

.category-tile h3 {
    margin: 0 0 8px;
    color: #fff;
}

.category-tile p,
.category-tile span {
    color: var(--muted);
    line-height: 1.6;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 74px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.48);
}

.rank-num {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(251, 191, 36, 0.13);
    color: var(--accent);
    font-weight: 900;
}

.rank-thumb {
    width: 74px;
    height: 94px;
    overflow: hidden;
    border-radius: 12px;
}

.rank-body h3 {
    margin-top: 0;
}

.rank-body p {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.rank-meta {
    margin-top: 8px;
    color: var(--accent);
    font-size: 13px;
}

.page-main {
    padding-top: 96px;
}

.page-hero {
    padding: 50px 0 28px;
}

.page-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 860px;
    font-size: 18px;
}

.page-search {
    max-width: 720px;
    margin-top: 24px;
}

.category-overview-list {
    display: grid;
    gap: 42px;
}

.category-overview {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.36);
}

.filter-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.48);
}

.filter-form {
    display: grid;
    grid-template-columns: 1fr 170px 190px auto;
    gap: 12px;
}

.filter-form input,
.filter-form select {
    width: 100%;
    padding: 12px;
}

.detail-main {
    padding-top: 90px;
}

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

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
    align-items: stretch;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    border: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.18), rgba(2, 6, 23, 0.48) 48%, rgba(2, 6, 23, 0.72) 100%);
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    font-size: 20px;
}

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

.play-icon {
    width: 74px;
    height: 74px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--accent);
    color: #111827;
    box-shadow: 0 16px 50px rgba(251, 191, 36, 0.35);
}

.detail-side {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.58);
}

.detail-side img {
    height: 350px;
}

.detail-side-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px;
}

.detail-side-meta span {
    padding: 6px 9px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--muted-2);
    font-size: 13px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    margin-top: 34px;
}

.detail-main-text,
.detail-info {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(30, 41, 59, 0.5);
    padding: 26px;
}

.detail-main-text h1 {
    margin: 18px 0 16px;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.14;
}

.lead-text {
    color: var(--muted-2) !important;
    font-size: 19px;
}

.detail-main-text h2 {
    margin: 30px 0 12px;
}

.detail-info dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px 14px;
    margin: 20px 0 0;
}

.detail-info dt {
    color: var(--accent);
    font-weight: 800;
}

.detail-info dd {
    margin: 0;
}

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

.footer-grid {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

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

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

.footer-copy {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
    font-size: 14px;
}

.is-filter-hidden {
    display: none !important;
}

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

    .nav-search {
        margin-left: auto;
    }

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

    .wide-grid,
    .compact-rank {
        grid-template-columns: 1fr;
    }

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

    .detail-side {
        display: grid;
        grid-template-columns: 170px 1fr;
    }

    .detail-side img {
        height: 240px;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        width: min(100% - 22px, 1240px);
        gap: 10px;
    }

    .brand {
        font-size: 18px;
    }

    .nav-search {
        display: none;
    }

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

    .hero-slider {
        height: 560px;
    }

    .hero-content {
        bottom: 72px;
    }

    .hero-actions,
    .search-panel form,
    .page-search,
    .mobile-panel form {
        grid-template-columns: 1fr;
    }

    .hero-actions a,
    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .hero-strip {
        margin-top: 22px;
    }

    .search-panel {
        margin-top: 28px;
    }

    .poster-grid,
    .small-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .wide-thumb {
        aspect-ratio: 16 / 9;
    }

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

    .rank-item {
        grid-template-columns: 44px 64px 1fr;
        gap: 10px;
    }

    .rank-thumb {
        width: 64px;
        height: 82px;
    }

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

    .detail-side img {
        height: auto;
        max-height: 380px;
    }

    .detail-main-text,
    .detail-info,
    .category-overview,
    .search-panel,
    .filter-panel {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .content-shell {
        width: min(100% - 22px, 1240px);
    }

    .poster-grid,
    .small-grid,
    .category-grid {
        gap: 12px;
    }

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

    .card-hover {
        display: none;
    }

    .hero-content p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
