:root {
    --page-bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --panel: #ffffff;
    --slate: #111827;
    --slate-2: #1f2937;
    --amber: #f59e0b;
    --amber-2: #ea580c;
    --blue: #2563eb;
    --red: #ef4444;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #fff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.28);
}

.nav-bar {
    min-height: 68px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand span:last-child,
.footer-brand {
    background: linear-gradient(90deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

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

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

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #fbbf24;
}

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

.header-search input,
.mobile-nav input,
.search-panel input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 999px;
    padding: 10px 14px;
    outline: none;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.96);
}

.header-search button,
.mobile-nav button,
.search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    font-weight: 800;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 24px 20px;
    background: #111827;
}

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

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

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #020617;
}

.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.05);
    transition: transform 6s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 40%, rgba(245, 158, 11, 0.33), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 54%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(720px, 100%);
    color: #fff;
    padding-top: 46px;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.hero-copy h2 + p,
.hero-copy p {
    color: #e5e7eb;
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.8;
    margin: 0 0 22px;
}

.hero-copy h1 + h2 {
    color: #fbbf24;
    font-size: clamp(22px, 3vw, 38px);
    letter-spacing: 0;
}

.hero-tags,
.tag-list,
.quick-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-list span,
.quick-links a {
    border-radius: 999px;
    padding: 7px 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    font-size: 14px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn-primary,
.btn-ghost,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    min-height: 46px;
    padding: 0 22px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 16px 28px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover,
.section-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(245, 158, 11, 0.36);
}

.btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.12);
}

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

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

.hero-dots button.is-active {
    width: 34px;
    background: #f59e0b;
}

.search-panel {
    position: relative;
    z-index: 10;
    margin-top: -56px;
    border-radius: 28px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel h2 {
    margin: 0 0 16px;
    font-size: clamp(22px, 3vw, 32px);
}

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

.search-panel input {
    border-radius: 16px;
    padding: 15px 18px;
}

.search-panel button {
    border-radius: 16px;
    padding: 14px 24px;
}

.quick-links {
    margin-top: 16px;
}

.quick-links a {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-weight: 700;
}

.page-main {
    min-height: 70vh;
    padding: 34px 0 70px;
}

.page-hero {
    border-radius: 28px;
    padding: 46px;
    color: #fff;
    background:
        radial-gradient(circle at 18% 22%, rgba(245, 158, 11, 0.36), transparent 28%),
        linear-gradient(135deg, #111827, #1e293b 58%, #0f172a);
    box-shadow: var(--shadow);
}

.small-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 54px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.small-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    line-height: 1.8;
    font-size: 18px;
}

.home-section,
.category-overview-block {
    margin: 64px 0;
}

.soft-section {
    border-radius: 32px;
    padding: 28px;
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.rank-section {
    border-radius: 32px;
    padding: 28px;
    background: linear-gradient(135deg, #fef2f2, #fff7ed);
}

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

.section-heading h2 {
    margin: 0 0 6px;
    color: #1e293b;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.section-link {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

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

.archive-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start;
}

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

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

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

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

.movie-card figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.15);
}

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

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

.movie-card h3 {
    margin: 12px 0 4px;
    color: #1e293b;
    font-size: 16px;
    line-height: 1.45;
    font-weight: 850;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.score-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 28px;
    border-radius: 999px;
    color: #fff;
    font-weight: 850;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}

.score-badge {
    right: 10px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.rank-badge {
    left: 10px;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.movie-card-wide a {
    display: grid;
    grid-template-columns: 42% 1fr;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-wide a:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.movie-card-wide figure {
    border-radius: 0;
    aspect-ratio: 16 / 11;
    box-shadow: none;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

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

.category-card {
    border-radius: 24px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.7;
}

.category-card div {
    display: grid;
    gap: 8px;
}

.category-card div a {
    color: #b45309;
    font-size: 14px;
}

.filter-panel {
    margin: 32px 0 28px;
    border-radius: 24px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.filter-controls {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, minmax(130px, 0.5fr));
    gap: 12px;
}

.filter-panel input,
.filter-panel select {
    border-radius: 14px;
    padding: 12px 14px;
    background: #f8fafc;
}

.no-result {
    border-radius: 18px;
    padding: 22px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

.breadcrumb-wrap {
    margin-bottom: 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #fef3c7;
    font-size: 14px;
}

.breadcrumb-wrap .breadcrumb {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #f59e0b;
}

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

.detail-content,
.detail-aside {
    min-width: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 24px 58px rgba(2, 6, 23, 0.34);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    cursor: pointer;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    text-align: center;
    background:
        radial-gradient(circle at 50% 45%, rgba(245, 158, 11, 0.24), transparent 28%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.82));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.4);
    padding-left: 6px;
}

.detail-card,
.side-card {
    margin-top: 22px;
    border-radius: 24px;
    padding: 26px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.title-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 46px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 7px 12px;
    color: #475569;
    background: #f1f5f9;
    font-size: 14px;
    font-weight: 700;
}

.lead-text {
    margin: 0 0 18px;
    color: #334155;
    line-height: 1.8;
    font-size: 18px;
    font-weight: 700;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: #1e293b;
    font-size: 24px;
    font-weight: 900;
}

.detail-card p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
    font-size: 16px;
}

.accent-card {
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.tag-list span {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-weight: 750;
}

.small-tags span {
    font-size: 12px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
}

.full-btn {
    width: 100%;
    margin-top: 18px;
}

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

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

.info-list dd {
    margin: 0;
    color: #1e293b;
    font-weight: 750;
}

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

.side-link {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: center;
}

.side-link img {
    width: 88px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
    background: #cbd5e1;
}

.side-link span {
    display: grid;
    gap: 5px;
    color: #1e293b;
    font-weight: 800;
    line-height: 1.45;
}

.side-link small {
    color: var(--muted);
    font-size: 12px;
}

.inline-heading {
    margin-bottom: 18px;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
    padding-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 28px;
}

.footer-grid p {
    max-width: 560px;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-grid div:not(:first-child) {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-grid strong {
    color: #fff;
    margin-bottom: 6px;
}

.footer-grid a:hover {
    color: #fbbf24;
}

.footer-bottom {
    margin-top: 34px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    padding: 18px;
    color: #94a3b8;
    text-align: center;
    font-size: 13px;
}

[hidden] {
    display: none !important;
}

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

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

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

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

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

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

    .detail-aside .side-card {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .nav-bar {
        min-height: 62px;
        gap: 14px;
    }

    .brand {
        font-size: 17px;
    }

    .hero-carousel {
        min-height: 660px;
    }

    .hero-copy {
        padding-top: 20px;
    }

    .hero-actions,
    .search-panel form,
    .filter-controls {
        grid-template-columns: 1fr;
        display: grid;
    }

    .search-panel,
    .page-hero {
        border-radius: 22px;
        padding: 24px;
    }

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

    .wide-grid,
    .category-grid,
    .footer-grid,
    .detail-aside {
        grid-template-columns: 1fr;
    }

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

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

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

    .soft-section,
    .rank-section {
        padding: 20px;
        border-radius: 24px;
    }

    .detail-card,
    .side-card {
        padding: 20px;
        border-radius: 20px;
    }

    .play-icon {
        width: 74px;
        height: 74px;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .archive-grid,
    .compact-grid {
        grid-template-columns: 1fr;
    }
}
