:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-solid: #111827;
    --line: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #92400e;
    --shadow: 0 24px 80px rgba(2, 6, 23, 0.48);
    --radius: 22px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 8%, rgba(245, 158, 11, 0.14), transparent 28rem),
        radial-gradient(circle at 82% 14%, rgba(217, 119, 6, 0.12), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.header-inner {
    width: min(100% - 32px, var(--max));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    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: grid;
    place-items: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.main-nav a,
.nav-dropdown button {
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 10px 0;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.nav-dropdown button:hover {
    color: var(--accent-light);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 188px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
}

.nav-dropdown-panel a:hover {
    background: rgba(245, 158, 11, 0.12);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
}

.header-search input,
.hero-search input,
.search-main-form input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    outline: none;
    color: var(--text);
    background: rgba(15, 23, 42, 0.9);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 170px;
    border: 0;
    padding: 8px 6px 8px 12px;
    background: transparent;
}

.header-search input:focus,
.hero-search input:focus,
.search-main-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.header-search button,
.hero-search button,
.search-main-form button,
.primary-button {
    border: 0;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 16px 36px rgba(245, 158, 11, 0.26);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button {
    padding: 8px 14px;
}

.header-search button:hover,
.hero-search button:hover,
.search-main-form button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.78);
}

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

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

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
}

.mobile-nav a:hover {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-light);
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--bg);
}

.hero-slides,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-bg,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 36%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 44%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(100% - 32px, var(--max));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding-bottom: 112px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-light);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    max-width: 780px;
    margin: 14px 0 18px;
    color: var(--text);
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 1.05;
}

.hero-content h1 {
    font-size: clamp(42px, 7vw, 80px);
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.detail-meta,
.hero-meta,
.detail-tags,
.movie-tags,
.movie-meta-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

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

.ghost-button {
    border: 1px solid rgba(248, 250, 252, 0.2);
    border-radius: 999px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(16px);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ghost-button:hover {
    border-color: rgba(245, 158, 11, 0.65);
    background: rgba(245, 158, 11, 0.12);
}

.hero-meta {
    margin-top: 22px;
    color: var(--subtle);
}

.hero-meta span,
.detail-meta span,
.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(248, 250, 252, 0.18);
    border-radius: 999px;
    color: var(--text);
    background: rgba(2, 6, 23, 0.48);
    backdrop-filter: blur(10px);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease;
}

.hero-arrow:hover {
    transform: translateY(-50%) scale(1.06);
    background: rgba(245, 158, 11, 0.28);
}

.hero-prev {
    left: 28px;
    transform: translateY(-50%);
}

.hero-next {
    right: 28px;
    transform: translateY(-50%);
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.42);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

.hero-search {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 86px;
    transform: translateX(-50%);
    width: min(620px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(18px);
}

.hero-search input,
.search-main-form input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
}

.hero-search button,
.search-main-form button {
    min-height: 48px;
    padding: 0 24px;
}

.page-shell {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 64px 0;
}

.content-section {
    margin-bottom: 76px;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    color: var(--text);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.section-heading a {
    color: var(--accent-light);
    font-weight: 800;
}

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

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

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.46));
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.24);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.movie-card a:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.55);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.62));
}

.movie-card figure {
    position: relative;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.8);
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.year-badge,
.rank-number {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    right: 12px;
    padding: 4px 10px;
    color: #111827;
    background: var(--accent-light);
}

.rank-number {
    left: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), #fb923c);
}

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

.movie-meta-line {
    color: var(--subtle);
    font-size: 12px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 10px 0 8px;
    color: var(--text);
    font-size: 19px;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.movie-card a:hover h3 {
    color: var(--accent-light);
}

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

.movie-tags span {
    min-height: 24px;
    padding: 2px 8px;
    color: var(--subtle);
    font-size: 12px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: auto 92px 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.5);
}

.compact-card img {
    width: 92px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.compact-card strong,
.compact-card em {
    display: block;
}

.compact-card strong {
    color: var(--text);
    line-height: 1.35;
}

.compact-card em {
    color: var(--subtle);
    font-size: 13px;
    font-style: normal;
}

.compact-rank {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #111827;
    background: var(--accent-light);
    font-weight: 900;
}

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

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

.category-card {
    display: block;
    overflow: hidden;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.5));
    box-shadow: 0 18px 52px rgba(2, 6, 23, 0.22);
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.5);
}

.category-covers {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 8px;
    height: 136px;
    margin-bottom: 18px;
}

.category-covers img {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.category-card span {
    color: var(--accent-light);
    font-size: 13px;
    font-weight: 800;
}

.category-card h2 {
    margin: 8px 0;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.17), transparent 26rem),
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.98));
}

.page-hero > div {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 78px 0 64px;
}

.page-hero h1 {
    font-size: clamp(36px, 6vw, 62px);
}

.page-hero p {
    max-width: 720px;
    color: var(--muted);
    font-size: 18px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.64);
}

.filter-panel label {
    display: block;
    margin-bottom: 8px;
    color: var(--subtle);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 14px;
}

.empty-state {
    margin: 32px 0 0;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.64);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    background: var(--bg);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.38;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.52) 100%),
        linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.72) 58%, rgba(2, 6, 23, 0.22) 100%);
}

.detail-content {
    position: relative;
    z-index: 1;
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 56px 0 72px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 42px;
    align-items: end;
}

.detail-cover {
    overflow: hidden;
    margin: 0;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(38px, 6vw, 74px);
}

.detail-one-line {
    max-width: 760px;
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 20px;
}

.detail-tags {
    margin: 18px 0 28px;
}

.detail-tags span {
    color: var(--muted);
}

.detail-shell {
    padding-top: 0;
}

.player-section {
    margin: -68px 0 54px;
}

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 28px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 12px;
    border: 0;
    color: var(--text);
    background: radial-gradient(circle at center, rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-button span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 999px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    box-shadow: 0 20px 42px rgba(245, 158, 11, 0.32);
    font-size: 30px;
}

.play-button strong {
    font-size: 20px;
}

.player-box.is-playing .play-button {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin-bottom: 68px;
}

.detail-text-grid article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.62);
}

.detail-text-grid article:nth-child(3) {
    grid-column: 1 / -1;
}

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

.detail-text-grid p {
    margin: 0;
    color: var(--muted);
}

.info-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.info-list div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.38);
}

.info-list dt {
    color: var(--subtle);
    font-size: 13px;
}

.info-list dd {
    margin: 6px 0 0;
    color: var(--text);
    font-weight: 800;
}

.search-main-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 26px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
}

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

.footer-inner {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 34px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--subtle);
}

.footer-inner nav {
    display: flex;
    gap: 18px;
}

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

@media (max-width: 1080px) {
    .header-search,
    .main-nav {
        display: none;
    }

    .mobile-menu-button {
        display: inline-grid;
        place-items: center;
    }

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

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

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

    .detail-layout {
        grid-template-columns: 260px 1fr;
    }

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

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

    .site-logo,
    .footer-logo {
        font-size: 18px;
    }

    .hero-carousel {
        min-height: 620px;
        height: 78vh;
    }

    .hero-content {
        padding-bottom: 148px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-search {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .movie-grid,
    .compact-list,
    .category-grid,
    .category-grid-wide,
    .detail-text-grid {
        grid-template-columns: 1fr;
    }

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

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .detail-cover {
        width: min(100%, 320px);
    }

    .player-section {
        margin-top: -34px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-inner nav {
        flex-wrap: wrap;
    }
}
