:root {
    --orange: #f97316;
    --red: #ef4444;
    --pink: #ec4899;
    --amber: #f59e0b;
    --dark: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--dark);
    background: #f3f4f6;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1240px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.34);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(135deg, #ea580c, #dc2626);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
    color: var(--orange);
}

.header-search {
    display: flex;
    align-items: center;
    width: 270px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
    overflow: hidden;
}

.header-search input,
.mobile-nav input,
.filter-input,
.filter-select {
    width: 100%;
    border: 0;
    outline: 0;
    color: #111827;
    background: transparent;
}

.header-search input {
    padding: 10px 14px;
}

.header-search button,
.mobile-nav button,
.filter-button,
.hero-search button,
.primary-button,
.secondary-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button {
    padding: 10px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.nav-toggle {
    display: none;
    border: 0;
    background: #fff7ed;
    color: #ea580c;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 0 18px;
    border-top: 1px solid #ffedd5;
}

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

.mobile-nav form {
    display: flex;
    overflow: hidden;
    border: 1px solid #fed7aa;
    border-radius: 18px;
    background: #fff7ed;
}

.mobile-nav input {
    padding: 11px 14px;
}

.mobile-nav button {
    padding: 11px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.main-shell,
.section-wrap,
.page-hero-inner {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 52%, #ec4899 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -120px -80px auto auto;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    filter: blur(8px);
}

.hero-slider {
    position: relative;
    min-height: 620px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.58), rgba(17, 24, 39, 0.35)), var(--hero-image);
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.65fr);
    gap: 42px;
    align-items: center;
    min-height: 620px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 86px;
}

.hero-label,
.page-label,
.detail-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(249, 115, 22, 0.88);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.28);
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 0 0 18px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    letter-spacing: -1.5px;
}

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

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

.hero-meta span,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 30px 0 24px;
}

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

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 16px 30px rgba(239, 68, 68, 0.34);
}

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

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

.hero-search {
    display: flex;
    max-width: 560px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    padding: 15px 18px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
    color: #ea580c;
    background: #fff;
    padding: 0 24px;
}

.hero-cover-card {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    transform: rotate(1.5deg);
}

.hero-cover-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.35), rgba(236, 72, 153, 0.35));
}

.hero-cover-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.72));
}

.hero-cover-title {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    bottom: 20px;
    font-size: 22px;
    font-weight: 900;
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #fff;
}

.section {
    padding: 58px 0;
}

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

.section-kicker {
    margin: 0 0 8px;
    color: var(--orange);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section h2,
.page-hero h1,
.detail-title {
    margin: 0;
    color: #111827;
    line-height: 1.16;
}

.section h2,
.page-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-header p,
.page-hero p,
.category-card p,
.detail-intro p,
.rich-text p {
    color: var(--muted);
}

.view-all {
    color: #ea580c;
    font-weight: 900;
}

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

.category-tile,
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    color: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile {
    min-height: 160px;
    padding: 22px;
}

.category-tile strong,
.category-card strong {
    display: block;
    font-size: 23px;
}

.category-tile span,
.category-card span {
    display: inline-flex;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 800;
}

.category-tile p {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.88);
}

.grad-a { background: linear-gradient(135deg, #f97316, #dc2626); }
.grad-b { background: linear-gradient(135deg, #fb923c, #ec4899); }
.grad-c { background: linear-gradient(135deg, #ef4444, #a855f7); }
.grad-d { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.grad-e { background: linear-gradient(135deg, #dc2626, #7c2d12); }
.grad-f { background: linear-gradient(135deg, #ec4899, #f97316); }
.grad-g { background: linear-gradient(135deg, #f97316, #facc15); }
.grad-h { background: linear-gradient(135deg, #8b5cf6, #ef4444); }
.grad-i { background: linear-gradient(135deg, #92400e, #f97316); }
.grad-j { background: linear-gradient(135deg, #0f766e, #f97316); }

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:not(.movie-card-small) .movie-poster img {
    aspect-ratio: 16 / 11;
}

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

.movie-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.68));
    opacity: 0.9;
}

.play-mark {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    color: #fff;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
    position: absolute;
    z-index: 3;
    left: 14px;
    top: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.movie-card-body {
    padding: 18px;
}

.movie-meta-line {
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.movie-meta-line span {
    padding: 4px 8px;
    background: #f3f4f6;
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: #111827;
    font-size: 20px;
    line-height: 1.25;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
    color: var(--orange);
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #6b7280;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.chip-row span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    color: #c2410c;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 800;
}

.card-link {
    color: var(--orange);
    font-weight: 900;
    font-size: 14px;
}

.page-hero {
    padding: 64px 0;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ef4444 55%, #ec4899);
}

.page-hero h1 {
    color: #fff;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
    gap: 12px;
    align-items: center;
    margin: -32px auto 34px;
    padding: 18px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.filter-input,
.filter-select {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: #fff7ed;
}

.filter-button {
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.results-count {
    margin: 0 0 22px;
    color: #6b7280;
    font-weight: 800;
}

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

.category-card {
    min-height: 210px;
    padding: 26px;
}

.category-card p {
    color: rgba(255, 255, 255, 0.88);
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 120px minmax(0, 1fr) 86px;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #fff;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-weight: 900;
}

.rank-thumb img {
    width: 120px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

.rank-info h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-info p {
    margin: 0 0 8px;
    color: #6b7280;
}

.rank-row strong {
    color: #ea580c;
    font-size: 22px;
    text-align: right;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: #111827;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.55)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    transform: scale(1.04);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

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

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #fecdd3);
}

.detail-title {
    color: #fff;
    font-size: clamp(36px, 5vw, 62px);
}

.detail-intro {
    max-width: 820px;
}

.detail-intro p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.breadcrumb {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
}

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

.player-card,
.content-card {
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.player-card {
    overflow: hidden;
}

.player-card video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.player-heading,
.content-card {
    padding: 24px;
}

.player-heading h2,
.content-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
}

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

.rich-text p {
    margin: 0 0 18px;
    font-size: 17px;
}

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

.side-panel {
    display: grid;
    gap: 18px;
    align-content: start;
}

.side-card {
    padding: 20px;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.side-card a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-weight: 800;
}

.side-card a:last-child {
    border-bottom: 0;
}

.side-card a:hover {
    color: var(--orange);
}

.site-footer {
    margin-top: 58px;
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 0.7fr;
    gap: 32px;
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
}

.footer-brand {
    color: #fff;
    font-size: 20px;
}

.site-footer p {
    max-width: 560px;
    color: #9ca3af;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #fff;
}

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #9ca3af;
}

.empty-state {
    display: none;
    padding: 32px;
    border-radius: var(--radius);
    color: #6b7280;
    background: #fff;
    box-shadow: var(--shadow-soft);
    text-align: center;
    font-weight: 800;
}

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

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .header-search {
        margin-left: auto;
    }

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

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

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

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

    .hero-cover-card,
    .detail-poster {
        max-width: 360px;
    }

    .hero-slider,
    .hero-content {
        min-height: auto;
    }

    .hero-slide {
        position: relative;
        display: none;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
        margin-top: -24px;
    }

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

    .rank-row {
        grid-template-columns: 44px 92px minmax(0, 1fr);
    }

    .rank-row strong {
        grid-column: 3;
        text-align: left;
    }

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

@media (max-width: 560px) {
    .header-inner,
    .main-shell,
    .section-wrap,
    .page-hero-inner,
    .detail-hero-inner {
        width: min(100% - 22px, 1240px);
    }

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

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

    .hero p,
    .detail-intro p {
        font-size: 16px;
    }

    .hero-search {
        border-radius: 20px;
        flex-direction: column;
    }

    .hero-search button {
        min-height: 44px;
    }

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

    .rank-row {
        grid-template-columns: 40px 1fr;
    }

    .rank-thumb {
        display: none;
    }

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

    .rank-row strong {
        grid-column: 2;
    }

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

    .section {
        padding: 42px 0;
    }
}
