:root {
    --bg: #f8fafc;
    --ink: #172033;
    --muted: #64748b;
    --line: rgba(148, 163, 184, 0.28);
    --orange: #f97316;
    --amber: #f59e0b;
    --yellow: #eab308;
    --slate: #0f172a;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #ea580c, #d97706, #ca8a04);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.25);
}

.nav-shell {
    max-width: 1240px;
    margin: 0 auto;
    min-height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #f97316;
    background: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.brand-text {
    font-size: 20px;
    letter-spacing: 0.04em;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    padding: 8px 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #fff7ed;
    transform: translateY(-1px);
}

.top-search,
.mobile-search,
.page-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.mobile-search input,
.page-filter input {
    border: 1px solid rgba(255, 255, 255, 0.35);
    outline: none;
    border-radius: 999px;
    padding: 10px 16px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    min-width: 250px;
    backdrop-filter: blur(8px);
}

.top-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.76);
}

.top-search button,
.mobile-search button,
.page-filter button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #9a3412;
    font-weight: 800;
    cursor: pointer;
    background: #fff7ed;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.page-filter button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(154, 52, 18, 0.18);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: #fff;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.mobile-panel {
    padding: 14px 20px 20px;
    background: rgba(154, 52, 18, 0.96);
    backdrop-filter: blur(12px);
}

.mobile-link,
.mobile-group {
    display: block;
    padding: 10px 12px;
    color: #fff;
    border-radius: 12px;
}

.mobile-link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.mobile-group {
    color: rgba(255, 255, 255, 0.62);
    font-weight: 800;
    font-size: 13px;
    margin-top: 8px;
}

.hero {
    position: relative;
    min-height: 610px;
    overflow: hidden;
    background: #451a03;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -28px;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(13px);
    transform: scale(1.08);
    opacity: 0.72;
}

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(67, 20, 7, 0.95), rgba(146, 64, 14, 0.82), rgba(202, 138, 4, 0.58));
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    min-height: 610px;
    margin: 0 auto;
    padding: 56px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 48px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    color: #fed7aa;
    font-weight: 800;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero h1 {
    margin: 20px 0 14px;
    color: #fff;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.hero-subtitle {
    max-width: 710px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 3vw, 25px);
    line-height: 1.7;
    margin: 0 0 24px;
}

.hero-feature {
    max-width: 720px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(12px);
}

.hero-feature h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 28px;
}

.hero-feature p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

.hero-meta,
.detail-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-meta {
    margin-top: 14px;
}

.hero-meta span,
.detail-meta span,
.meta-row span {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
}

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

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

.primary-button {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--amber));
    box-shadow: 0 20px 35px rgba(194, 65, 12, 0.35);
}

.ghost-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-side {
    display: grid;
    gap: 16px;
}

.hero-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-mini-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.hero-mini-card {
    position: relative;
    overflow: hidden;
    min-height: 92px;
    border-radius: 16px;
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.26);
}

.hero-mini-card img {
    width: 100%;
    height: 100%;
    min-height: 92px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.hero-mini-card span {
    position: absolute;
    inset: auto 0 0;
    padding: 28px 8px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
}

.hero-mini-card:hover img {
    transform: scale(1.08);
}

.section-shell,
.footer-grid,
.detail-main,
.page-main {
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.section-shell {
    padding-top: 56px;
    padding-bottom: 20px;
}

.narrow-shell {
    max-width: 980px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.1;
}

.section-head a {
    color: var(--orange);
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #fed7aa;
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72));
    opacity: 0.75;
}

.rank-badge,
.duration-badge {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    top: 10px;
    left: 10px;
    background: #ef4444;
}

.duration-badge {
    right: 10px;
    bottom: 10px;
    background: rgba(15, 23, 42, 0.78);
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 8px;
    min-height: 2.8em;
    color: #1f2937;
    font-size: 17px;
    line-height: 1.4;
}

.movie-info h3 a:hover {
    color: var(--orange);
}

.movie-info p {
    min-height: 4.8em;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.meta-row span {
    color: #9a3412;
    background: #fff7ed;
}

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

.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    background: #f1f5f9;
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    border-radius: 24px;
    box-shadow: var(--soft-shadow);
    background: #7c2d12;
}

.category-tile img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.82));
}

.tile-content {
    position: absolute;
    inset: auto 0 0;
    padding: 22px;
    color: #fff;
}

.tile-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.tile-content em {
    display: block;
    color: rgba(255, 255, 255, 0.82);
    font-style: normal;
    line-height: 1.55;
}

.page-main,
.detail-main {
    padding-top: 32px;
    padding-bottom: 50px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    margin: 26px 0 10px;
    padding: 54px;
    color: #fff;
    background: radial-gradient(circle at top left, #f97316, transparent 34%), linear-gradient(135deg, #7c2d12, #0f172a 65%, #111827);
    box-shadow: var(--shadow);
}

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

.compact-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.page-filter {
    margin-top: 24px;
}

.page-filter input {
    min-width: min(480px, 100%);
    color: #1f2937;
    background: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

.page-filter button {
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--amber));
}

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

.rank-row {
    display: grid;
    grid-template-columns: 110px 54px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-cover {
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 3 / 4;
}

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

.rank-number {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.rank-detail h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-detail p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
    overflow: hidden;
    border-radius: 32px;
    padding: 34px;
    color: #fff;
    background: radial-gradient(circle at 10% 15%, rgba(249, 115, 22, 0.5), transparent 30%), linear-gradient(135deg, #431407, #0f172a 72%);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-copy h1 {
    margin: 20px 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.15;
}

.detail-one-line {
    max-width: 840px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    line-height: 1.8;
}

.detail-meta span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.14);
}

.detail-tags span {
    color: #fed7aa;
    background: rgba(255, 255, 255, 0.12);
}

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

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

.movie-player,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.movie-player {
    background: #020617;
}

.player-cover {
    z-index: 2;
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
    object-fit: cover;
    opacity: 0.72;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.16), rgba(2, 6, 23, 0.72));
}

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

.play-cover-button {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--orange), var(--amber));
    box-shadow: 0 18px 50px rgba(249, 115, 22, 0.45);
}

.content-card {
    border-radius: 24px;
    padding: 28px;
    background: #fff;
    box-shadow: var(--soft-shadow);
    margin-bottom: 18px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 25px;
}

.content-card p {
    margin: 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 50px;
    color: #e5e7eb;
    background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding-top: 46px;
    padding-bottom: 34px;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fb923c;
    font-size: 20px;
}

.site-footer p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 9px;
}

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

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

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

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

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

    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-side {
        max-width: 640px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .nav-shell {
        min-height: 60px;
    }

    .mobile-search input {
        min-width: 0;
        width: 100%;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-inner {
        padding: 42px 20px;
    }

    .hero-side {
        display: none;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .category-grid,
    .category-grid.large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .page-hero {
        padding: 34px 24px;
        border-radius: 24px;
    }

    .page-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .page-filter input {
        min-width: 0;
        width: 100%;
    }

    .rank-row {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .rank-number {
        position: absolute;
        left: 20px;
        top: 20px;
    }

    .rank-detail {
        grid-column: 2;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .detail-poster {
        max-width: 260px;
    }

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

@media (max-width: 520px) {
    .brand-text {
        font-size: 17px;
    }

    .movie-grid,
    .featured-grid,
    .catalog-grid,
    .category-grid,
    .category-grid.large {
        grid-template-columns: 1fr;
    }

    .movie-info h3,
    .movie-info p {
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }
}
