* {
    box-sizing: border-box;
}

:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --pink: #ec4899;
    --purple: #8b5cf6;
    --text: #1f2937;
    --muted: #6b7280;
    --soft: #fff7ed;
    --line: #f3e8dc;
    --shadow: 0 20px 45px rgba(249, 115, 22, 0.16);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 45%, #faf5ff 100%);
    line-height: 1.65;
}

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

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

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

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

.nav {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    font-size: 14px;
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.32);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link {
    color: #374151;
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: #374151;
    border-radius: 999px;
}

.mobile-menu {
    display: none;
    padding: 0 16px 16px;
    background: white;
    border-top: 1px solid #f3f4f6;
}

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

.mobile-link {
    padding: 12px 10px;
    border-radius: 12px;
    color: #374151;
    font-weight: 700;
}

.mobile-link:hover {
    background: #fff7ed;
    color: var(--orange);
}

.hero {
    position: relative;
    height: 78vh;
    min-height: 560px;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: white;
    padding-bottom: 80px;
}

.hero-tag {
    display: inline-flex;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--orange);
    color: white;
    font-weight: 800;
    margin-bottom: 18px;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.32);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0 0 32px;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 23px);
}

.hero-actions,
.inline-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

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

.btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-primary {
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    box-shadow: 0 18px 40px rgba(236, 72, 153, 0.3);
}

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

.btn-light {
    color: var(--orange);
    background: white;
    box-shadow: var(--shadow);
}

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

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

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

.hero-search {
    position: absolute;
    left: 50%;
    bottom: 82px;
    z-index: 6;
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-search-card {
    width: min(720px, 100%);
    margin-left: auto;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(18px);
    color: white;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.24);
    pointer-events: auto;
}

.hero-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin: 10px 0;
}

.hero-form input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(249, 115, 22, 0.18);
    border-radius: 999px;
    padding: 0 16px;
    background: white;
    color: #111827;
    outline: none;
}

.hero-form button {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    color: white;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    font-weight: 900;
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-category-links a {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
}

.section {
    padding: 72px 0;
}

.section-soft {
    padding: 72px 0;
    background: linear-gradient(90deg, rgba(255, 237, 213, 0.85), rgba(252, 231, 243, 0.85));
}

.section-heading {
    margin-bottom: 34px;
    text-align: center;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.14;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 28px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
    box-shadow: var(--shadow);
    isolation: isolate;
    transform: translateZ(0);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    transition: transform 0.45s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(249, 115, 22, 0.78));
}

.category-tile:hover img {
    transform: scale(1.1);
}

.category-tile span {
    font-size: 24px;
    font-weight: 950;
}

.category-tile p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: white;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 48px rgba(249, 115, 22, 0.2);
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 180px 1fr;
}

.movie-card-large .poster-link {
    aspect-ratio: 1 / 1;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

.movie-card-horizontal .poster-link {
    aspect-ratio: auto;
    height: 100%;
}

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

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

.poster-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--orange);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.movie-title {
    color: #111827;
    font-size: 18px;
    font-weight: 950;
    line-height: 1.35;
}

.movie-title:hover {
    color: var(--orange);
}

.movie-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.movie-stats,
.detail-meta,
.rank-info div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-meta span,
.detail-meta span,
.rank-info span {
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

.movie-stats {
    margin-top: auto;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.rating,
.rank-score {
    color: #d97706;
    font-weight: 950;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 0.45fr) 1fr;
    gap: 22px;
    align-items: center;
    margin-bottom: 28px;
    padding: 24px;
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow);
}

.filter-copy h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.filter-copy p {
    margin: 0;
    color: var(--muted);
}

.filter-controls {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, minmax(130px, 1fr));
    gap: 12px;
}

.page-hero {
    padding: 56px 0;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    color: white;
}

.page-title h1,
.page-title p {
    color: white;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.breadcrumbs {
    padding: 16px 0;
    background: white;
    border-bottom: 1px solid #f3f4f6;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumbs .container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-index {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    font-size: 20px;
    font-weight: 950;
}

.rank-poster {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    background: #fed7aa;
}

.rank-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-info a {
    display: inline-block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 19px;
    font-weight: 950;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
}

.detail-wrap {
    padding: 42px 0 76px;
}

.detail-panel {
    display: grid;
    grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.35fr);
    gap: 34px;
    padding: 28px;
    border-radius: 32px;
    background: white;
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #fed7aa, #fbcfe8);
}

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

.detail-title h1 {
    margin-top: 0;
}

.detail-lead {
    color: #374151;
    font-size: 18px;
}

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

.tag-list span {
    padding: 7px 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
}

.content-card {
    margin-top: 24px;
    padding: 24px;
    border-radius: 26px;
    background: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 26px;
}

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

.player-section {
    margin-top: 30px;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.55));
    transition: opacity 0.25s ease;
}

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

.player-start {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    font-size: 36px;
    box-shadow: 0 20px 45px rgba(236, 72, 153, 0.34);
}

.player-message {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.66);
    color: white;
    font-size: 13px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-message.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.site-footer {
    background: linear-gradient(135deg, #fff7ed, #fdf2f8);
    border-top: 1px solid #ffedd5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 32px;
    padding: 50px 0;
}

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

.site-footer h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

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

.footer-bottom {
    padding: 18px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid #ffedd5;
}

.back-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    display: none;
    border: 0;
    border-radius: 999px;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: var(--shadow);
    font-size: 20px;
    font-weight: 900;
}

.back-top.is-visible {
    display: block;
}

.empty-state {
    display: none;
    padding: 36px;
    border-radius: 24px;
    background: white;
    text-align: center;
    color: var(--muted);
    box-shadow: var(--shadow);
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

    .hero {
        height: 72vh;
        min-height: 620px;
    }

    .hero-content {
        align-items: flex-start;
        padding-top: 80px;
    }

    .hero-search {
        bottom: 70px;
    }

    .hero-form {
        grid-template-columns: 1fr;
    }

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

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

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

    .rank-score {
        grid-column: 3;
    }
}

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

    .brand {
        font-size: 21px;
    }

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

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

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

    .movie-card-horizontal {
        grid-template-columns: 118px 1fr;
    }

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

    .section,
    .section-soft {
        padding: 46px 0;
    }
}
