* {
    box-sizing: border-box;
}

:root {
    --orange: #f97316;
    --deep-orange: #ea580c;
    --red: #ef4444;
    --yellow: #fde047;
    --blue: #0ea5e9;
    --green: #10b981;
    --purple: #a855f7;
    --dark: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff7ed;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--dark);
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 48%, #fff1f2 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--red));
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.28);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--orange);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s ease;
}

.logo:hover .logo-mark {
    transform: rotate(12deg) scale(1.04);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    font-weight: 600;
}

.nav-links a,
.mobile-menu a,
.footer-links a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
    color: var(--yellow);
}

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

.nav-search input,
.mobile-search input,
.filter-panel input {
    border: 0;
    outline: 0;
    border-radius: 999px;
}

.nav-search input,
.mobile-search input {
    width: 210px;
    color: #ffffff;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.20);
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.nav-search button,
.mobile-search button,
.menu-button {
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 999px;
    padding: 10px 15px;
}

.menu-button {
    display: none;
    font-size: 22px;
    line-height: 1;
}

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-menu nav {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

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

.hero {
    position: relative;
    height: 540px;
    overflow: hidden;
    background: #111827;
}

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-gradient {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-gradient {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.14));
}

.hero-angle {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 170px solid rgba(249, 115, 22, 0.86);
    border-left: 170px solid transparent;
}

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 650px;
    color: #ffffff;
}

.hero-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(249, 115, 22, 0.92);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.hero-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
}

.hero-copy p {
    margin: 0;
    color: #f3f4f6;
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 24px 0 28px;
    color: #ffffff;
    font-weight: 650;
}

.hero-actions,
.section-head,
.card-meta,
.rank-row,
.detail-meta-box,
.crumbs {
    display: flex;
    align-items: center;
}

.hero-actions {
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--orange), var(--red));
    color: #ffffff;
    box-shadow: 0 18px 35px rgba(239, 68, 68, 0.32);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.22);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.48);
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--orange);
}

.home-panel {
    padding: 44px 0 64px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 42px;
}

.stat-card,
.category-card,
.movie-card,
.side-card,
.filter-panel,
.page-hero,
.rank-list {
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.stat-card {
    min-height: 128px;
    color: #ffffff;
    padding: 26px;
    position: relative;
    overflow: hidden;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.stat-card::after,
.category-card::after {
    content: "";
    position: absolute;
    top: -45px;
    right: -45px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    transition: transform 0.4s ease;
}

.stat-card:hover,
.category-card:hover,
.movie-card:hover {
    transform: translateY(-7px);
}

.stat-card:hover::after,
.category-card:hover::after {
    transform: scale(1.45);
}

.stat-card strong {
    display: block;
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-card span {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.orange {
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.blue {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
}

.green {
    background: linear-gradient(135deg, #22c55e, #10b981);
}

.purple {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.content-section {
    margin: 44px 0;
}

.section-head {
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.section-head h2,
.page-hero h1,
.detail-main h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 40px);
}

.section-head p,
.page-hero p,
.detail-subtitle,
.category-intro {
    color: var(--muted);
    line-height: 1.75;
}

.section-head p {
    margin: 8px 0 0;
}

.section-more {
    color: var(--deep-orange);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    display: block;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    box-shadow: 0 28px 60px rgba(249, 115, 22, 0.18);
}

.card-cover {
    position: relative;
    display: block;
    height: 290px;
    overflow: hidden;
    background: #111827;
}

.movie-card-large .card-cover {
    height: 340px;
}

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

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

.cover-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
    transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade {
    opacity: 1;
}

.play-bubble {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: var(--orange);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.25s ease;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

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

.card-badge,
.card-duration {
    position: absolute;
    z-index: 2;
    top: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    left: 12px;
    background: var(--orange);
}

.card-duration {
    right: 12px;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.card-body {
    display: block;
    padding: 16px;
}

.card-body strong {
    display: -webkit-box;
    min-height: 48px;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.movie-card:hover strong {
    color: var(--deep-orange);
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 8px 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    justify-content: space-between;
    gap: 8px;
    color: #9ca3af;
    font-size: 12px;
}

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

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

.category-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    padding: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #ef4444);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-art {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    height: 110px;
    margin-bottom: 18px;
}

.category-art img {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.24);
}

.category-name {
    position: relative;
    z-index: 2;
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.category-intro {
    position: relative;
    z-index: 2;
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.simple-page {
    padding: 44px 0 62px;
}

.page-hero {
    margin-bottom: 28px;
    padding: 34px;
    color: #ffffff;
    background: radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.24), transparent 24%), linear-gradient(135deg, var(--orange), var(--red));
}

.page-hero h1,
.page-hero p,
.page-hero .crumbs,
.page-hero a {
    color: #ffffff;
}

.page-hero p {
    max-width: 760px;
    margin-bottom: 0;
}

.crumbs {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #fef3c7;
    font-size: 14px;
}

.crumbs a {
    color: inherit;
}

.filter-panel {
    margin-bottom: 30px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.filter-panel input {
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    color: #111827;
    background: #f3f4f6;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-chips button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--deep-orange);
    cursor: pointer;
    background: #ffedd5;
    font-weight: 750;
}

.filter-chips button:hover,
.filter-chips button.is-active {
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

.rank-list {
    overflow: hidden;
    background: #ffffff;
}

.rank-row {
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #fff7ed;
    transform: translateX(4px);
}

.rank-row img {
    width: 84px;
    height: 112px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-no {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--deep-orange);
    background: #ffedd5;
    font-weight: 900;
}

.top-rank .rank-no {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-info strong,
.rank-info em,
.rank-info span {
    display: block;
}

.rank-info strong {
    color: #111827;
    font-size: 18px;
}

.rank-info em {
    margin: 8px 0;
    color: var(--muted);
    font-style: normal;
    line-height: 1.55;
}

.rank-info span,
.rank-score {
    color: #9ca3af;
    font-size: 13px;
}

.rank-score {
    min-width: 95px;
    text-align: right;
    font-weight: 800;
}

.detail-page {
    padding: 34px 0 62px;
}

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

.detail-main,
.detail-side {
    min-width: 0;
}

.detail-main h1 {
    margin-bottom: 12px;
}

.detail-subtitle {
    margin: 0 0 22px;
    font-size: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    background-size: cover;
    background-position: center;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.70));
}

.player-cover span {
    position: relative;
    z-index: 2;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-size: 36px;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
}

.player-cover.is-hidden {
    display: none;
}

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

.detail-meta-box div,
.detail-section,
.side-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-meta-box strong,
.detail-meta-box span {
    display: block;
}

.detail-meta-box strong {
    color: #9ca3af;
    font-size: 13px;
    margin-bottom: 6px;
}

.detail-meta-box span {
    color: #111827;
    font-weight: 800;
}

.detail-section {
    margin-bottom: 18px;
}

.detail-section h2,
.side-card h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

.detail-poster {
    width: 100%;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.side-card {
    margin-top: 18px;
}

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

.side-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #fff7ed;
    transition: background 0.2s ease, color 0.2s ease;
}

.side-links a:hover {
    color: var(--deep-orange);
    background: #ffedd5;
}

.side-links span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}

.side-links em {
    color: #9ca3af;
    font-size: 12px;
    font-style: normal;
    white-space: nowrap;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #030712);
}

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

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-wrap p {
    max-width: 760px;
    color: #9ca3af;
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 22px;
    margin: 24px 0;
}

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

.copyright {
    margin: 0;
    font-size: 14px;
}

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

@media (max-width: 1080px) {
    .nav-links,
    .nav-search {
        display: none;
    }

    .menu-button {
        display: inline-flex;
        margin-left: auto;
    }

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 18px;
    }

    .side-card {
        margin-top: 0;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        min-height: 64px;
    }

    .logo,
    .footer-logo {
        font-size: 20px;
    }

    .hero {
        height: 620px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 78px;
    }

    .hero-gradient {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.88));
    }

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

    .hero-arrow {
        width: 42px;
        height: 42px;
        font-size: 30px;
    }

    .stat-grid,
    .movie-grid,
    .category-grid,
    .category-grid-wide,
    .detail-meta-box {
        grid-template-columns: 1fr;
    }

    .card-cover {
        height: 330px;
    }

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

    .rank-row {
        align-items: flex-start;
    }

    .rank-row img {
        width: 72px;
        height: 98px;
    }

    .rank-score {
        display: none;
    }

    .detail-side {
        display: block;
    }

    .side-card {
        margin-top: 18px;
    }

    .player-cover span {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
