:root {
    --color-bg: #fff7ed;
    --color-bg-soft: #ffedd5;
    --color-card: #ffffff;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-line: #fed7aa;
    --color-primary: #ea580c;
    --color-primary-dark: #c2410c;
    --color-rose: #e11d48;
    --shadow-card: 0 18px 45px rgba(124, 45, 18, 0.12);
    --shadow-hover: 0 28px 70px rgba(124, 45, 18, 0.22);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.24), transparent 34rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
    color: var(--color-text);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        "Noto Sans CJK SC",
        Arial,
        sans-serif;
    line-height: 1.7;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 247, 237, 0.88);
    border-bottom: 1px solid rgba(254, 215, 170, 0.9);
    backdrop-filter: blur(18px);
}

.nav-shell {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #111827;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #f97316 52%, #e11d48);
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(234, 88, 12, 0.32);
}

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

.primary-nav a,
.mobile-nav a {
    font-weight: 700;
    color: #4b5563;
    transition: color 0.2s ease;
}

.primary-nav a:hover,
.mobile-nav a:hover {
    color: var(--color-primary);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(330px, 30vw);
    padding: 6px;
    border: 1px solid var(--color-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 24px rgba(124, 45, 18, 0.06);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 8px 8px 12px;
    color: #374151;
}

.header-search button,
.button-primary,
.button-secondary {
    border: 0;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 800;
    border-radius: 999px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.header-search button,
.button-primary {
    background: linear-gradient(135deg, #f97316, #e11d48);
    color: #ffffff;
    box-shadow: 0 12px 22px rgba(225, 29, 72, 0.28);
}

.header-search button {
    padding: 8px 16px;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 22px;
}

.button-primary:hover,
.header-search button:hover,
.button-secondary:hover {
    transform: translateY(-2px);
}

.button-secondary {
    border: 1px solid rgba(255, 255, 255, 0.54);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-line);
    border-radius: 14px;
    background: #ffffff;
    color: var(--color-primary);
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 0 0 18px;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 34px 0 58px;
    background:
        linear-gradient(120deg, rgba(251, 191, 36, 0.82), rgba(249, 115, 22, 0.9) 45%, rgba(225, 29, 72, 0.9)),
        #f97316;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.46), transparent 20rem),
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.24), transparent 24rem);
    pointer-events: none;
}

.hero-carousel {
    position: relative;
    z-index: 1;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 34px;
    min-height: 540px;
}

.hero-slide.is-active {
    display: grid;
}

.hero-copy {
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 1.05;
    letter-spacing: -0.06em;
    text-shadow: 0 18px 42px rgba(124, 45, 18, 0.28);
}

.hero-summary {
    max-width: 720px;
    margin: 22px 0 0;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.92);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.hero-meta span,
.tag,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

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

.hero-poster {
    position: relative;
    overflow: hidden;
    max-width: 410px;
    margin-left: auto;
    border: 12px solid rgba(255, 255, 255, 0.24);
    border-radius: 34px;
    box-shadow: 0 36px 90px rgba(124, 45, 18, 0.36);
    transform: rotate(2deg);
}

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

.hero-poster-badge {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: #ffffff;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.hero-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition:
        width 0.2s ease,
        background 0.2s ease;
}

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

.section {
    padding: 56px 0 0;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: #111827;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: var(--color-muted);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-weight: 900;
}

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

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

.movie-card {
    position: relative;
}

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(254, 215, 170, 0.92);
    border-radius: 22px;
    background: var(--color-card);
    box-shadow: var(--shadow-card);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.movie-card-link:hover {
    transform: translateY(-8px);
    border-color: rgba(249, 115, 22, 0.62);
    box-shadow: var(--shadow-hover);
}

.poster-wrap {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.card-badges {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.card-badges span {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.74);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 15px 15px 17px;
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 16px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

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

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

.category-card {
    min-height: 192px;
    padding: 22px;
    border: 1px solid rgba(254, 215, 170, 0.95);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.92)),
        #ffffff;
    box-shadow: var(--shadow-card);
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease;
}

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

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
    color: #111827;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--color-muted);
    font-size: 14px;
}

.category-count {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
    color: #9a3412;
    font-weight: 900;
}

.page-hero {
    padding: 56px 0 34px;
    background:
        radial-gradient(circle at 18% 0%, rgba(251, 146, 60, 0.24), transparent 26rem),
        linear-gradient(180deg, #fff7ed, #ffffff);
}

.page-title {
    max-width: 860px;
}

.page-title h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0 0;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.filter-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    background: #fff7ed;
    border-radius: 999px;
    padding: 12px 16px;
}

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

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

.detail-hero {
    padding: 34px 0 0;
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow-hover);
}

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

.detail-title h1 {
    font-size: clamp(32px, 5vw, 58px);
}

.detail-title .one-line {
    margin: 18px 0 0;
    color: #4b5563;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0;
}

.detail-meta .meta-pill {
    min-height: 34px;
    background: #ffedd5;
    color: #9a3412;
}

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

.tag {
    background: #ffffff;
    border: 1px solid var(--color-line);
    color: var(--color-primary-dark);
}

.player-section {
    padding-top: 46px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.28);
}

.movie-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.1), rgba(17, 24, 39, 0.56));
    color: #ffffff;
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #e11d48);
    box-shadow: 0 18px 44px rgba(225, 29, 72, 0.38);
    font-size: 34px;
    line-height: 1;
}

.player-start strong {
    font-size: 18px;
    letter-spacing: 0.08em;
}

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

.content-panel {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.content-panel h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: #4b5563;
}

.content-panel p + p {
    margin-top: 14px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-number {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 18px;
    background: linear-gradient(135deg, #f97316, #e11d48);
    color: #ffffff;
    font-weight: 900;
}

.rank-item img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.rank-item h3 {
    margin: 0 0 6px;
    color: #111827;
}

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

.site-footer {
    margin-top: 72px;
    padding: 44px 0;
    border-top: 1px solid var(--color-line);
    background: linear-gradient(180deg, #fff7ed, #ffedd5);
}

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

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #111827;
}

.site-footer p {
    margin: 0;
    color: var(--color-muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: #9a3412;
    font-weight: 800;
}

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

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

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

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

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

    .header-search {
        width: min(280px, 28vw);
    }
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

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

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 18px;
    }

    .hero-poster {
        width: min(360px, 86vw);
        margin: 0 auto;
    }

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

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

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

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

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

@media (max-width: 620px) {
    .container {
        width: min(100% - 22px, var(--container));
    }

    .brand {
        font-size: 18px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .hero {
        padding-bottom: 42px;
    }

    .hero h1 {
        font-size: 38px;
    }

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

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

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

    .content-panel {
        padding: 20px;
    }
}
