:root {
    --color-primary: #f97316;
    --color-secondary: #ef4444;
    --color-accent: #ec4899;
    --color-green: #10b981;
    --color-blue: #2563eb;
    --color-dark: #111827;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-line: #e5e7eb;
    --color-soft: #f9fafb;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-card: 0 14px 35px rgba(17, 24, 39, 0.08);
    --shadow-strong: 0 24px 70px rgba(239, 68, 68, 0.28);
}

* {
    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(--color-text);
    background: #f5f7fb;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    box-shadow: 0 14px 35px rgba(239, 68, 68, 0.22);
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: var(--color-primary);
    background: #ffffff;
    box-shadow: inset 0 -4px 12px rgba(249, 115, 22, 0.16);
}

.logo-text {
    font-size: 1.3rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 0.95rem;
    font-weight: 700;
}

.main-nav a {
    opacity: 0.96;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 9px 12px;
}

.mobile-nav {
    display: none;
    padding: 0 0 16px;
}

.mobile-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.10);
    margin-top: 8px;
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 214, 102, 0.35), transparent 32%),
        radial-gradient(circle at 82% 18%, rgba(236, 72, 153, 0.32), transparent 34%),
        linear-gradient(135deg, #7c2d12 0%, #991b1b 42%, #831843 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    opacity: 0.28;
    filter: blur(2px) saturate(1.2);
    transform: scale(1.03);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.56), rgba(17, 24, 39, 0.86));
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 48px;
    min-height: 620px;
    padding: 54px 0;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
    font-weight: 800;
    font-size: 0.88rem;
}

.hero-title {
    margin: 22px 0 18px;
    font-size: clamp(2.45rem, 5.5vw, 5rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

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

.hero-desc {
    max-width: 660px;
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.84);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.9rem;
    font-weight: 700;
}

.hero-actions,
.card-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #9a3412;
    background: #ffffff;
    box-shadow: 0 18px 30px rgba(255, 255, 255, 0.18);
}

.btn-gradient {
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.26);
}

.btn-soft {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
}

.btn-line {
    color: var(--color-primary);
    border: 1px solid #fed7aa;
    background: #fff7ed;
}

.hero-panel {
    position: relative;
    border-radius: 32px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.20);
    box-shadow: var(--shadow-strong);
    backdrop-filter: blur(20px);
}

.hero-stage {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #111827;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-poster {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

.hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 80px 24px 24px;
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.64), transparent);
}

.hero-caption h2 {
    margin: 10px 0 6px;
    font-size: 1.75rem;
    line-height: 1.2;
}

.hero-caption p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
}

.hero-dots {
    position: absolute;
    z-index: 3;
    right: 24px;
    top: 24px;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

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

.search-panel {
    position: relative;
    z-index: 3;
    margin-top: -42px;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    border-radius: 24px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(17, 24, 39, 0.12);
}

.search-box input,
.toolbar input,
.toolbar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--color-line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--color-text);
    background: #ffffff;
    outline: none;
}

.search-box input:focus,
.toolbar input:focus,
.toolbar select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.page-hero {
    color: #ffffff;
    padding: 64px 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(253, 186, 116, 0.32), transparent 28%),
        linear-gradient(135deg, #9a3412, #b91c1c 55%, #9d174d);
}

.page-hero h1 {
    margin: 10px 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.1;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

.section {
    padding: 56px 0;
}

.section-soft {
    background: #ffffff;
}

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

.section-head h2 {
    margin: 10px 0 0;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1.2;
}

.section-head p {
    margin: 6px 0 0;
    color: var(--color-muted);
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.15);
}

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

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

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

.cover-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.24);
}

.year-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.72);
    font-size: 0.76rem;
    font-weight: 800;
}

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

.movie-title {
    margin: 0 0 8px;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 900;
    color: #111827;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--color-muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.movie-desc {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0;
    overflow: hidden;
    color: #4b5563;
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 0.78rem;
    font-weight: 800;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-accent));
    box-shadow: var(--shadow-card);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #2563eb, #7c3aed, #ec4899);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #059669, #0d9488, #2563eb);
}

.category-card-icon {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.45rem;
    font-weight: 900;
}

.category-card h2,
.category-card h3 {
    margin: 18px 0 8px;
}

.category-card p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.82);
}

.category-count {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 900;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.empty-tip {
    display: none;
    padding: 28px;
    border-radius: 20px;
    color: var(--color-muted);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    font-weight: 950;
    font-size: 1.25rem;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
    box-shadow: var(--shadow-card);
}

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

.detail-panel {
    border-radius: 28px;
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--color-primary);
    font-weight: 800;
}

.detail-title {
    margin: 12px 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.1;
    color: #111827;
}

.detail-one-line {
    color: #4b5563;
    font-size: 1.08rem;
}

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

.meta-box {
    border-radius: 18px;
    padding: 14px;
    background: #f9fafb;
    border: 1px solid var(--color-line);
}

.meta-box strong {
    display: block;
    color: #111827;
    font-size: 1rem;
}

.meta-box span {
    color: var(--color-muted);
    font-size: 0.82rem;
}

.player-card {
    margin-top: 28px;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.player-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 45%, rgba(249, 115, 22, 0.28), transparent 34%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.86));
    transition: opacity 0.24s ease;
}

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

.play-trigger {
    display: inline-grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: 0 18px 42px rgba(239, 68, 68, 0.38);
    font-size: 2rem;
}

.player-text {
    margin-top: 14px;
    text-align: center;
    font-weight: 900;
}

.content-card {
    border-radius: 26px;
    padding: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.content-card h2 {
    margin: 0 0 14px;
    color: #111827;
}

.content-card p {
    margin: 0 0 16px;
    color: #374151;
}

.footer {
    color: #d1d5db;
    background: #111827;
    padding: 44px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 30px;
}

.footer h3 {
    color: #ffffff;
    margin: 0 0 12px;
}

.footer p,
.footer li {
    color: #cbd5e1;
    margin: 0 0 8px;
}

.footer a:hover {
    color: #fdba74;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.back-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 45;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.26);
}

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

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

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

    .nav-toggle {
        display: inline-flex;
    }

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

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

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

    .hero-stage,
    .hero-poster {
        min-height: 460px;
    }

    .search-box,
    .toolbar {
        grid-template-columns: 1fr;
    }

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

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

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

    .hero-title {
        font-size: 2.45rem;
    }

    .hero-stage,
    .hero-poster {
        min-height: 380px;
    }

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

    .section-head {
        display: block;
    }

    .rank-item {
        grid-template-columns: 52px 1fr;
    }

    .rank-item .btn {
        grid-column: 1 / -1;
    }

    .detail-panel,
    .content-card {
        padding: 20px;
    }

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

@media (max-width: 460px) {
    .logo-text {
        font-size: 1.05rem;
    }

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

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