:root {
    --primary: #e14f11;
    --primary-soft: #fef6ee;
    --primary-glow: #f0691b;
    --accent: #f59e0b;
    --secondary: #50675e;
    --warm-50: #faf8f5;
    --warm-100: #f2ede4;
    --ink: #111827;
    --muted: #6b7280;
    --line: #ece7df;
    --card: #ffffff;
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 18px 45px rgba(17, 24, 39, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #ffffff 0%, var(--warm-50) 45%, var(--warm-100) 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(236, 231, 223, 0.7);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

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

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.brand,
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-mark {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-glow), var(--primary));
    box-shadow: 0 8px 20px rgba(225, 79, 17, 0.26);
    font-weight: 800;
}

.brand-text {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--primary), var(--primary-glow));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link,
.mobile-link {
    position: relative;
    color: #374151;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--primary);
}

.nav-link.is-active::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 2px;
    border-radius: 99px;
    background: var(--primary);
    content: "";
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--primary);
    background: var(--primary-soft);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px 0 16px;
    border-top: 1px solid var(--line);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: #ffffff;
}

.hero-carousel {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(90deg, #111827, #1f2937);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    z-index: 1;
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide.is-active img {
    animation: heroZoom 6s ease forwards;
}

@keyframes heroZoom {
    from {
        transform: scale(1.06);
    }
    to {
        transform: scale(1.01);
    }
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.55) 46%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-inner {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding-bottom: 78px;
}

.hero-copy {
    width: min(720px, calc(100% - 32px));
    margin: 0 auto;
    margin-left: max(16px, calc((100% - 1180px) / 2));
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fbbf24;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 900;
    line-height: 1.08;
    text-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

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

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

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    font-weight: 700;
}

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

.btn,
.filter-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 12px 28px rgba(225, 79, 17, 0.28);
}

.btn-primary:hover,
.filter-link:hover {
    transform: translateY(-2px);
    background: #c84610;
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.28);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-medium);
    transform: translateY(-50%);
    backdrop-filter: blur(8px);
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.3s ease, background 0.3s ease;
}

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

.main-space {
    padding: 54px 0 72px;
}

.stack {
    display: grid;
    gap: 64px;
}

.section-card,
.page-card {
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid rgba(236, 231, 223, 0.85);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-medium);
}

.section-warm {
    background: linear-gradient(135deg, #fff7ed, #fff1d6);
}

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

.section-head > div:first-child {
    display: grid;
    gap: 8px;
}

.section-head h2,
.page-title h1,
.detail-copy h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 900;
    line-height: 1.15;
}

.section-head p,
.page-title p,
.detail-copy p,
.footer-brand p {
    margin: 0;
    color: var(--muted);
    line-height: 1.75;
}

.section-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-glow), var(--primary));
    box-shadow: 0 10px 20px rgba(240, 105, 27, 0.25);
}

.section-more {
    color: var(--primary);
    font-weight: 800;
}

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

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

.wide-list {
    display: grid;
    gap: 18px;
}

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card[hidden] {
    display: none;
}

.poster-wrap {
    position: relative;
    height: 255px;
    overflow: hidden;
    background: linear-gradient(135deg, #f7efe6, #fff7ed);
}

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

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

.corner-label,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 9px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    right: auto;
    left: 12px;
    background: var(--primary);
}

.play-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 24px;
}

.movie-card:hover .play-hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    display: grid;
    gap: 9px;
    padding: 16px;
}

.card-body h3 {
    overflow: hidden;
    margin: 0;
    color: #111827;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-body p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 42px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span:last-child {
    color: var(--primary);
    font-weight: 800;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: stretch;
}

.poster-wide {
    height: 148px;
}

.movie-card-wide .card-body {
    align-content: center;
}

.movie-card-wide .card-body h3 {
    font-size: 19px;
}

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

.tag-row span,
.detail-tags span {
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    display: grid;
    min-height: 150px;
    align-content: space-between;
    padding: 22px;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #1f2937, var(--secondary));
    box-shadow: var(--shadow-medium);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:nth-child(2n) {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #334155, #0f172a);
}

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

.category-tile strong {
    font-size: 21px;
}

.category-tile span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.65;
}

.page-title {
    display: grid;
    gap: 14px;
    margin-bottom: 30px;
    padding: 44px 0 12px;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 160px 160px auto;
    gap: 12px;
    margin-bottom: 26px;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: #111827;
    background: #ffffff;
    outline: 0;
    box-shadow: var(--shadow-soft);
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(225, 79, 17, 0.55);
    box-shadow: 0 0 0 4px rgba(225, 79, 17, 0.12);
}

.filter-link {
    color: #ffffff;
    background: var(--primary);
}

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

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

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

.detail-hero {
    padding: 48px 0;
    background: radial-gradient(circle at 10% 0%, rgba(240, 105, 27, 0.22), transparent 34%), linear-gradient(135deg, #111827, #1f2937 58%, #2f1c11);
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
    background: linear-gradient(135deg, #f7efe6, #fff7ed);
}

.detail-cover img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.detail-copy h1,
.detail-copy p {
    color: #ffffff;
}

.detail-copy p {
    margin-top: 20px;
    color: #e5e7eb;
    font-size: 17px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 22px;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.player-section,
.detail-text,
.related-section {
    margin-top: 38px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #050505;
    box-shadow: var(--shadow-strong);
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    background: #050505;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(225, 79, 17, 0.2), rgba(0, 0, 0, 0.72));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    font-size: 36px;
    transition: transform 0.2s ease;
}

.player-button:hover {
    transform: scale(1.06);
}

.text-block {
    display: grid;
    gap: 18px;
    padding: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.text-block h2,
.player-section h2,
.related-section h2 {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: 28px;
    font-weight: 900;
}

.text-block p {
    margin: 0;
    color: #374151;
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--warm-50), var(--warm-100));
}

.footer-inner {
    display: grid;
    gap: 28px;
    padding: 44px 0;
}

.footer-brand strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer-links a {
    color: #4b5563;
    font-weight: 700;
}

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

.copyright {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

    .filter-panel {
        grid-template-columns: 1fr 1fr;
    }

    .ranking-list {
        grid-template-columns: 1fr;
    }
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-carousel {
        height: 620px;
    }

    .hero-inner {
        padding-bottom: 82px;
    }

    .hero-copy {
        width: calc(100% - 32px);
        margin: 0 auto;
    }

    .hero-control {
        top: auto;
        bottom: 24px;
        width: 42px;
        height: 42px;
        transform: none;
    }

    .hero-prev {
        left: 16px;
    }

    .hero-next {
        right: 16px;
    }

    .hero-dots {
        bottom: 38px;
    }

    .section-head {
        display: grid;
        align-items: start;
    }

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

    .poster-wrap {
        height: 210px;
    }

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

    .poster-wide {
        height: 150px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .detail-cover img {
        height: auto;
        max-height: 520px;
    }
}

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

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 34px;
    }

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

    .section-card,
    .page-card {
        padding: 20px;
        border-radius: 22px;
    }
}
