:root {
    --bg: #fff7ed;
    --bg-soft: #fff1f2;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(248, 113, 113, 0.18);
    --brand: #f97316;
    --brand-dark: #dc2626;
    --brand-hot: #ec4899;
    --shadow: 0 24px 60px rgba(127, 29, 29, 0.12);
    --radius: 24px;
}

* {
    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(--text);
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.15), transparent 32rem),
        linear-gradient(180deg, #fff7ed 0%, #fff 42%, #fff7ed 100%);
}

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

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

button,
input {
    font: inherit;
}

.container,
.content-section,
.header-inner,
.footer-inner,
.hero-search-card {
    width: min(1180px, 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(249, 115, 22, 0.16);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #991b1b;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark), var(--brand-hot));
    box-shadow: 0 10px 26px rgba(239, 68, 68, 0.34);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 10px 16px;
    border-radius: 999px;
    color: #7f1d1d;
    font-weight: 700;
    transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 9px;
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(127, 29, 29, 0.10);
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #991b1b;
}

.home-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.hero-track,
.hero-slide {
    min-height: 560px;
}

.hero-slide {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: space-between;
    gap: 44px;
    padding: 82px max(32px, calc((100vw - 1180px) / 2)) 132px;
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: flex;
    animation: fadeIn 0.6s ease both;
}

.hero-copy {
    max-width: 660px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(16px);
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

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

.hero-tags,
.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.detail-meta a,
.tag-list span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #7f1d1d;
    background: rgba(255, 247, 237, 0.92);
    font-size: 13px;
    font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.text-link,
.search-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.2s ease;
}

.primary-btn {
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark), var(--brand-hot));
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.34);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.text-link:hover,
.search-panel button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    z-index: 2;
    width: min(330px, 28vw);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 36px;
    line-height: 1;
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dots button.is-active {
    width: 32px;
    background: #fff;
}

.hero-search-wrap {
    position: relative;
    margin-top: -70px;
    z-index: 8;
}

.hero-search-card {
    padding: 30px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-search-card h1 {
    margin: 0 0 10px;
    color: #7f1d1d;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: -0.04em;
}

.hero-search-card p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 17px;
}

.hero-search,
.search-panel {
    display: flex;
    gap: 12px;
}

.hero-search input,
.search-panel input {
    flex: 1;
    min-width: 0;
    height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 18px;
    color: var(--text);
    background: #fff;
    outline: none;
}

.hero-search input:focus,
.search-panel input:focus {
    border-color: rgba(249, 115, 22, 0.70);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.hero-search button {
    min-width: 130px;
    border: 0;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    font-weight: 900;
}

.quick-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.quick-category,
.category-tile,
.category-card-large,
.movie-card,
.rank-item,
.detail-article,
.player-shell {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 46px rgba(127, 29, 29, 0.08);
}

.quick-category,
.category-tile {
    padding: 16px;
    border-radius: 18px;
    transition: 0.2s ease;
}

.quick-category span,
.category-tile strong {
    display: block;
    color: #991b1b;
    font-weight: 900;
}

.quick-category small,
.category-tile span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.6;
}

.content-section {
    padding: 58px 0 0;
}

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

.section-heading h2 {
    margin: 0;
    color: #7f1d1d;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.04em;
}

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

.section-more,
.text-link,
.search-panel button {
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid rgba(249, 115, 22, 0.22);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    transition: 0.22s ease;
}

.movie-card:hover,
.quick-category:hover,
.category-tile:hover,
.category-card-large:hover,
.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 70px rgba(127, 29, 29, 0.15);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #fed7aa;
}

.poster-link img,
.detail-poster img,
.category-preview img,
.rank-cover img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

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

.poster-link img {
    transition: 0.3s ease;
}

.poster-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(127, 29, 29, 0.78);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 14px;
}

.card-title {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    color: #7f1d1d;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.rank-meta {
    margin-top: 7px;
    color: #f97316;
    font-size: 13px;
    font-weight: 800;
}

.card-body p {
    display: -webkit-box;
    min-height: 60px;
    margin: 8px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

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

.rank-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 82px 1fr;
    gap: 16px;
    align-items: center;
    padding: 12px;
    border-radius: 20px;
    transition: 0.2s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark), var(--brand-hot));
    font-size: 20px;
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
}

.rank-title {
    color: #7f1d1d;
    font-size: 18px;
    font-weight: 900;
}

.rank-content p {
    margin: 7px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.page-hero,
.detail-hero {
    color: #fff;
    background:
        linear-gradient(135deg, rgba(127, 29, 29, 0.94), rgba(249, 115, 22, 0.88), rgba(236, 72, 153, 0.82)),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 28rem);
}

.page-hero .container {
    padding: 72px 0;
}

.page-hero h1 {
    margin: 10px 0 12px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.05em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 800;
}

.breadcrumb a:hover {
    color: #fff;
}

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

.category-card-large {
    overflow: hidden;
    border-radius: 24px;
    transition: 0.2s ease;
}

.category-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 10px;
    background: linear-gradient(135deg, #fff7ed, #ffe4e6);
}

.category-preview a {
    overflow: hidden;
    border-radius: 12px;
}

.category-card-body {
    padding: 20px;
}

.category-card-body h2 {
    margin: 0 0 8px;
    color: #7f1d1d;
}

.category-card-body p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.search-panel {
    margin: 0 0 24px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 32px rgba(127, 29, 29, 0.06);
}

.search-panel button {
    min-width: 92px;
}

.detail-hero-inner {
    padding: 58px 0;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 42px;
    align-items: center;
    margin-top: 28px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

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

.detail-copy .tag-list {
    margin: 18px 0 28px;
}

.detail-main {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
}

.play-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(17, 24, 39, 0.74));
    cursor: pointer;
}

.play-layer.is-hidden {
    display: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark), var(--brand-hot));
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
    font-size: 28px;
}

.play-layer strong {
    max-width: 80%;
    text-align: center;
    font-size: 22px;
}

.detail-article {
    padding: 26px;
    border-radius: 28px;
}

.detail-article h2 {
    margin: 0 0 14px;
    color: #7f1d1d;
    font-size: 26px;
}

.detail-article h2:not(:first-child) {
    margin-top: 28px;
}

.detail-text {
    margin: 0 0 14px;
    color: #4b5563;
    line-height: 1.9;
}

.site-footer {
    margin-top: 72px;
    padding: 48px 0 24px;
    color: #7f1d1d;
    background: linear-gradient(180deg, rgba(255, 247, 237, 0.42), #ffedd5);
    border-top: 1px solid rgba(249, 115, 22, 0.18);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.footer-inner p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #9a3412;
    background: rgba(255, 255, 255, 0.72);
    font-weight: 800;
}

.footer-copy {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    padding-top: 20px;
    color: var(--muted);
    border-top: 1px solid rgba(249, 115, 22, 0.16);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.01);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

    .rank-grid,
    .category-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .mobile-toggle {
        display: block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        padding: 14px;
        border-radius: 22px;
        background: #fff;
        box-shadow: var(--shadow);
    }

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

    .site-nav a {
        width: 100%;
        text-align: center;
    }

    .hero-slide {
        min-height: 620px;
        flex-direction: column;
        justify-content: center;
        padding: 62px 24px 126px;
        text-align: center;
    }

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

    .hero-tags,
    .hero-actions {
        justify-content: center;
    }

    .hero-poster {
        width: min(210px, 54vw);
    }

    .hero-prev,
    .hero-next {
        display: none;
    }

    .hero-search-card {
        padding: 20px;
    }

    .hero-search,
    .search-panel {
        flex-direction: column;
    }

    .quick-categories,
    .category-grid,
    .category-list-grid,
    .rank-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item {
        grid-template-columns: 48px 72px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .rank-title {
        font-size: 16px;
    }

    .rank-content p {
        display: none;
    }

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }

    .card-title {
        min-height: auto;
    }
}
