* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.82);
    --panel-solid: #111827;
    --line: rgba(251, 191, 36, 0.18);
    --line-soft: rgba(148, 163, 184, 0.18);
    --text: #f8fafc;
    --muted: #cbd5e1;
    --dim: #94a3b8;
    --amber: #f59e0b;
    --amber-light: #fde68a;
    --red: #dc2626;
    --red-dark: #7f1d1d;
    --radius: 18px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 0%, rgba(220, 38, 38, 0.2), transparent 28rem),
        radial-gradient(circle at 88% 12%, rgba(245, 158, 11, 0.18), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: var(--amber-light);
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: #fff;
    box-shadow: 0 10px 26px rgba(220, 38, 38, 0.32);
}

.desktop-nav,
.category-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.desktop-nav a,
.category-nav a,
.mobile-panel a {
    color: #e5e7eb;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.category-nav a:hover,
.mobile-panel a:hover {
    color: var(--amber);
}

.category-nav {
    margin-left: auto;
    gap: 12px;
}

.category-nav a {
    padding: 8px 12px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    font-size: 14px;
    color: #d1d5db;
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.86);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #f8fafc;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.mobile-panel.is-open {
    display: block;
}

.mobile-panel-links {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.page-main {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 72px;
}

.hero {
    position: relative;
    min-height: 680px;
    margin-top: 0;
    overflow: hidden;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
}

.hero-slider {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.9s ease, transform 1.1s ease;
    background-size: cover;
    background-position: center;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.75) 42%, rgba(2, 6, 23, 0.28) 100%),
        linear-gradient(0deg, #020617 0%, transparent 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 420px;
    gap: 42px;
    align-items: center;
    padding: 70px 0 92px;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    background: rgba(127, 29, 29, 0.28);
    color: var(--amber-light);
    font-size: 14px;
    font-weight: 760;
}

.hero h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 88px);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.hero-title-gradient {
    display: block;
    margin-top: 10px;
    background: linear-gradient(90deg, #fde68a, #f59e0b, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5));
}

.hero p {
    max-width: 660px;
    margin: 24px 0 0;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.tag-list span,
.movie-card-body span,
.detail-meta span,
.search-filter button,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.13);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.hero-tags span,
.tag-list span {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.secondary-button,
.section-action,
.search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-button {
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: #fff;
    box-shadow: 0 16px 42px rgba(220, 38, 38, 0.32);
}

.secondary-button,
.section-action {
    border: 1px solid rgba(245, 158, 11, 0.26);
    background: rgba(15, 23, 42, 0.74);
    color: #fef3c7;
}

.primary-button:hover,
.secondary-button:hover,
.section-action:hover,
.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.18);
}

.hero-feature-card {
    align-self: center;
    border: 1px solid rgba(245, 158, 11, 0.18);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.68), rgba(2, 6, 23, 0.82));
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-feature-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #1e293b, #111827);
}

.hero-feature-card div {
    padding: 22px;
}

.hero-feature-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.hero-feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

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

.hero-dots button.is-active {
    background: linear-gradient(90deg, var(--amber), var(--red));
}

.section {
    margin-top: 58px;
}

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

.section-heading h1,
.section-heading h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
    margin: 10px 0 0;
    color: var(--dim);
    line-height: 1.8;
}

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

.movie-grid.tight {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.movie-card {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.64);
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 18px 50px rgba(127, 29, 29, 0.28);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.movie-card-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #111827, #312e81 48%, #7f1d1d);
}

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

.movie-card-cover img,
.horizontal-card img,
.compact-movie img,
.detail-cover img,
.related-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease, opacity 0.2s ease;
}

.movie-card:hover img,
.compact-movie:hover img,
.related-poster:hover img {
    transform: scale(1.06);
}

img.is-missing {
    opacity: 0;
}

.movie-duration,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.movie-duration {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 8px 22px rgba(220, 38, 38, 0.34);
}

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

.movie-card-body h3,
.horizontal-card h3,
.related-poster h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 17px;
    line-height: 1.35;
}

.movie-card-body p,
.horizontal-card p {
    margin: 10px 0 0;
    color: var(--dim);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.movie-card-body .movie-meta-line span {
    padding: 4px 8px;
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.12);
    font-size: 12px;
}

.feature-layout,
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
    gap: 26px;
}

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

.horizontal-card {
    border: 1px solid var(--line-soft);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.62);
    overflow: hidden;
    transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.horizontal-card:hover {
    transform: translateX(4px);
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(15, 23, 42, 0.9);
}

.horizontal-card a {
    display: grid;
    grid-template-columns: 52px 142px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.horizontal-card img {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.horizontal-rank {
    display: grid;
    place-items: center;
}

.horizontal-rank strong {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.14);
    color: var(--amber-light);
}

.horizontal-card span {
    display: inline-flex;
    margin-top: 9px;
    color: var(--dim);
    font-size: 13px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.44), rgba(15, 23, 42, 0.82)),
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.28), transparent 16rem);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-tile h2,
.category-tile h3 {
    margin: 0;
    font-size: 26px;
}

.category-tile p {
    margin: 12px 0 0;
    color: #d1d5db;
    line-height: 1.75;
}

.category-tile .category-chip {
    margin-top: 20px;
    padding: 8px 12px;
    font-weight: 760;
}

.search-panel,
.page-title,
.detail-panel,
.player-section,
.related-section {
    border: 1px solid var(--line-soft);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.64);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.page-title {
    padding: 34px;
    margin-bottom: 34px;
}

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

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
}

.search-form input,
.search-form select {
    min-height: 48px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.72);
    color: var(--text);
    padding: 0 14px;
    outline: none;
}

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

.search-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.search-filter button {
    min-height: 36px;
    padding: 0 12px;
    cursor: pointer;
}

.search-filter button.is-active {
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: #fff;
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.24), transparent 15rem),
        rgba(2, 6, 23, 0.3);
    cursor: pointer;
}

.play-overlay.is-hidden {
    display: none;
}

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 178px;
    min-height: 64px;
    padding: 0 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber), var(--red));
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    box-shadow: 0 18px 48px rgba(220, 38, 38, 0.42);
}

.detail-panel {
    padding: 26px;
}

.detail-cover {
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.detail-panel h1 {
    margin: 22px 0 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
}

.detail-panel .lead {
    margin: 16px 0 0;
    color: #e2e8f0;
    line-height: 1.8;
}

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

.detail-meta span {
    padding: 7px 11px;
    font-weight: 720;
    font-size: 13px;
}

.content-block {
    margin-top: 26px;
}

.content-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
    color: var(--amber-light);
}

.content-block p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.95;
}

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

.related-poster {
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.64);
    overflow: hidden;
}

.related-poster img {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.related-poster h3 {
    padding: 14px;
    font-size: 15px;
}

.compact-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.compact-movie {
    position: relative;
    min-height: 188px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #7f1d1d);
}

.compact-movie::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 62%);
}

.compact-movie span {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    font-weight: 800;
    line-height: 1.35;
}

.site-footer {
    border-top: 1px solid rgba(127, 29, 29, 0.42);
    background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    gap: 24px;
}

.footer-inner p {
    max-width: 640px;
    margin: 12px 0 0;
    color: var(--dim);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: #d1d5db;
}

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

.copyright {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    padding-top: 20px;
    font-size: 14px;
}

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

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

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

    .hero-content,
    .feature-layout,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-feature-card {
        max-width: 460px;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

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

    .hero-content {
        padding: 40px 0 84px;
    }

    .hero h1 {
        font-size: 46px;
    }

    .movie-grid,
    .movie-grid.tight,
    .category-grid,
    .related-grid,
    .compact-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .horizontal-card a {
        grid-template-columns: 42px 100px minmax(0, 1fr);
        gap: 10px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid.tight,
    .category-grid,
    .related-grid,
    .compact-strip,
    .mobile-panel-links {
        grid-template-columns: 1fr;
    }

    .header-inner {
        min-height: 64px;
    }

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

    .hero h1 {
        font-size: 38px;
    }

    .hero p {
        font-size: 16px;
    }

    .page-title,
    .detail-panel,
    .search-panel {
        padding: 22px;
    }
}
