:root {
    --brand: #ea580c;
    --brand-dark: #c2410c;
    --brand-soft: #fff7ed;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --paper: #ffffff;
    --bg: #f9fafb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--brand);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-decoration: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #dc2626);
    box-shadow: 0 12px 30px rgba(234, 88, 12, 0.38);
}

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

.desktop-nav a,
.mobile-nav a {
    color: #374151;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--brand);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 18px;
    border-top: 1px solid var(--line);
}

.mobile-nav a {
    padding: 12px 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.hero-section {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 20% 15%, rgba(251, 191, 36, 0.36), transparent 32%), linear-gradient(135deg, #ea580c, #dc2626 55%, #7f1d1d);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.64));
    z-index: 1;
}

.hero-slider {
    position: relative;
    z-index: 2;
    min-height: 650px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s ease;
}

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

.hero-slide-grid {
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.72fr);
    align-items: center;
    gap: 54px;
    padding-top: 70px;
    padding-bottom: 70px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
    color: #fed7aa;
}

.hero-title {
    margin: 22px 0 18px;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.hero-title span {
    display: block;
    color: #fde68a;
}

.hero-desc {
    margin: 0 0 28px;
    max-width: 660px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.86;
}

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

.hero-meta {
    margin-bottom: 28px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta .pill {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions,
.section-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #dc2626);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.32);
}

.btn-primary:hover {
    color: #ffffff;
    box-shadow: 0 20px 42px rgba(220, 38, 38, 0.4);
}

.btn-light {
    color: #ea580c;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-poster-wrap {
    position: relative;
}

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.2);
    aspect-ratio: 3 / 4.1;
    background: rgba(255, 255, 255, 0.1);
}

.hero-poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-poster-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
}

.hero-poster-caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 22px;
    z-index: 2;
}

.hero-poster-caption strong {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

.hero-poster-caption span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

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

.hero-dot.is-active {
    background: #ffffff;
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: #ffffff;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.14;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-subtitle {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.search-panel {
    margin-top: -34px;
    position: relative;
    z-index: 4;
}

.search-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    border: 1px solid rgba(229, 231, 235, 0.72);
}

.search-card input,
.search-card select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-card input:focus,
.search-card select:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.18);
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.72);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.movie-cover-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fecaca);
}

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

.movie-card:hover .movie-cover-link img {
    transform: scale(1.06);
}

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    color: #ffffff;
    background: rgba(234, 88, 12, 0.94);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

.movie-body {
    padding: 18px;
}

.movie-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.34;
    font-weight: 900;
}

.movie-title a {
    color: #111827;
    text-decoration: none;
}

.movie-title a:hover {
    color: var(--brand);
}

.movie-desc {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    color: #6b7280;
    font-size: 13px;
    justify-content: space-between;
}

.category-band {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #ffffff;
}

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

.category-card {
    padding: 28px;
    min-height: 178px;
    border-radius: 22px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    text-decoration: none;
    transition: transform 0.22s ease, background 0.22s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.2);
}

.category-card strong {
    display: block;
    margin: 12px 0 8px;
    font-size: 23px;
}

.category-card span {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.rank-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.78);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateX(5px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.rank-num {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #dc2626);
    font-size: 18px;
    font-weight: 900;
}

.rank-thumb {
    width: 82px;
    height: 110px;
    border-radius: 14px;
    object-fit: cover;
    background: #ffedd5;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.62;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.38), transparent 30%), linear-gradient(135deg, #ea580c, #b91c1c);
    padding: 74px 0 84px;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 60px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.05em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

.breadcrumb a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.player-card,
.detail-card,
.sidebar-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.78);
    box-shadow: var(--shadow);
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    cursor: pointer;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ea580c;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.28);
}

.play-button svg {
    margin-left: 5px;
}

.player-title {
    padding: 18px 22px;
}

.player-title h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.player-title p {
    margin: 0;
    color: var(--muted);
    line-height: 1.72;
}

.detail-card {
    padding: 28px;
}

.detail-card h2,
.sidebar-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 900;
}

.detail-card p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.92;
}

.detail-meta {
    margin: 0 0 22px;
}

.sidebar-card {
    padding: 22px;
}

.poster-large {
    overflow: hidden;
    border-radius: 22px;
    margin-bottom: 20px;
    aspect-ratio: 3 / 4;
    background: #ffedd5;
}

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

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

.related-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.related-item img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    background: #ffedd5;
}

.related-item strong {
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 72px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px;
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 36px;
}

.footer-inner h2,
.footer-inner h3 {
    color: #ffffff;
    margin: 0 0 16px;
}

.footer-inner p {
    margin: 0;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 24px;
    text-align: center;
    color: #9ca3af;
}

.hidden-card {
    display: none !important;
}

.empty-state {
    display: none;
    margin-top: 28px;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

@media (max-width: 1100px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .detail-shell aside {
        order: -1;
    }
}

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .mobile-nav.is-open {
        display: flex;
    }

    .hero-section,
    .hero-slider,
    .hero-slide-grid {
        min-height: 760px;
    }

    .hero-slide-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 48px;
        padding-bottom: 86px;
    }

    .hero-poster-card {
        max-width: 320px;
        margin: 0 auto;
    }

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

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

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

@media (max-width: 560px) {
    .container,
    .header-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand {
        font-size: 22px;
    }

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

    .rank-item {
        grid-template-columns: 46px 72px minmax(0, 1fr);
        gap: 12px;
    }

    .rank-thumb {
        width: 72px;
        height: 96px;
    }

    .section {
        padding: 50px 0;
    }

    .detail-card,
    .sidebar-card {
        padding: 18px;
    }
}
