:root {
    --bg: #f7f7f8;
    --panel: #ffffff;
    --panel-soft: #fff5f5;
    --text: #171717;
    --muted: #686b73;
    --line: #ececf0;
    --brand: #dc2626;
    --brand-dark: #b91c1c;
    --brand-soft: #fee2e2;
    --gold: #f59e0b;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.86);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.site-header-inner {
    max-width: 1280px;
    height: 74px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.brand-name {
    font-size: 22px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: 8px;
    color: #424651;
    font-weight: 700;
}

.desktop-nav a {
    transition: color 0.2s ease;
}

.desktop-nav a:hover {
    color: var(--brand);
}

.top-search,
.mobile-search,
.wide-search {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-search {
    margin-left: auto;
    min-width: 290px;
    padding: 6px;
    border-radius: 999px;
    background: #f1f2f4;
}

.top-search input,
.mobile-search input,
.wide-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.top-search input {
    padding: 8px 8px 8px 14px;
}

.top-search button,
.mobile-search button,
.wide-search button {
    border: 0;
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    background: var(--brand);
    transition: transform 0.2s ease, background 0.2s ease;
}

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

.top-search button:hover,
.mobile-search button:hover,
.wide-search button:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f2f4;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #22252c;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px 18px;
    gap: 12px;
}

.mobile-nav.open {
    display: grid;
}

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f5f5f6;
    font-weight: 800;
}

.mobile-search {
    padding: 8px;
    border-radius: 18px;
    background: #f1f2f4;
}

.mobile-search input {
    padding: 10px;
}

.mobile-search button {
    padding: 10px 16px;
}

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    color: #ffffff;
    background: #101014;
}

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

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

.hero-bg,
.detail-backdrop {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 18%, rgba(248, 113, 113, 0.34), transparent 28%), linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(247, 247, 248, 1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 650px;
    margin: 0 auto;
    padding: 90px 22px 120px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) 390px;
    align-items: center;
    gap: 56px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 6px 13px;
    color: #ffffff;
    border-radius: 999px;
    background: var(--brand);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-weight: 950;
    line-height: 1.06;
    letter-spacing: -0.06em;
}

.hero-copy h1 {
    max-width: 760px;
    font-size: clamp(42px, 6.4vw, 78px);
}

.hero-copy p {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.hero-tags,
.detail-tags,
.movie-card-tags,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags,
.detail-tags {
    margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.movie-card-tags span,
.rank-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span,
.detail-tags span {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.32);
}

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

.ghost-btn.dark {
    color: var(--text);
    background: #ffffff;
    border-color: var(--line);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: inherit;
}

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

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

.hero-dots button {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.active {
    width: 34px;
    background: #ffffff;
}

.search-panel,
.content-section,
.page-hero,
.breadcrumb,
.detail-page > .content-section,
.player-section {
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 22px;
    padding-right: 22px;
}

.search-panel {
    margin-top: -46px;
    position: relative;
    z-index: 6;
}

.search-panel,
.page-hero {
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.search-panel {
    padding-top: 28px;
    padding-bottom: 28px;
    display: grid;
    grid-template-columns: minmax(0, 0.74fr) minmax(320px, 1fr);
    align-items: center;
    gap: 26px;
}

.search-panel h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 36px);
    letter-spacing: -0.04em;
}

.wide-search {
    padding: 8px;
    border-radius: 999px;
    background: #f1f2f4;
}

.wide-search input {
    padding: 13px 10px 13px 18px;
}

.wide-search button {
    min-width: 118px;
    padding: 13px 18px;
}

.content-section {
    margin-top: 54px;
}

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

.section-heading h2,
.detail-text h2 {
    margin: 0;
    color: #171717;
    font-size: clamp(26px, 3.5vw, 40px);
    line-height: 1.14;
    letter-spacing: -0.05em;
}

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

.section-link {
    min-height: 42px;
    color: var(--brand);
    background: var(--brand-soft);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 46px rgba(15, 23, 42, 0.14);
}

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

.poster-link img {
    aspect-ratio: 3 / 4.15;
    object-fit: cover;
    transition: transform 0.32s ease;
}

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 9px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.64);
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card-tags {
    margin-bottom: 10px;
}

.movie-card-tags span {
    padding: 4px 8px;
    color: var(--brand);
    background: var(--brand-soft);
}

.movie-card h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

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

.movie-card p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.movie-card-meta {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    color: #7a7d86;
    font-size: 13px;
}

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

.category-tile {
    min-height: 132px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #171717, #3f1010 50%, #dc2626);
    box-shadow: var(--shadow);
    transition: transform 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
}

.category-tile strong {
    display: block;
    font-size: 24px;
    letter-spacing: -0.04em;
}

.category-tile span {
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.78);
}

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 78px 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.rank-no {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    font-weight: 950;
    font-size: 20px;
}

.rank-poster {
    overflow: hidden;
    border-radius: 14px;
    background: #e5e7eb;
}

.rank-poster img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.rank-card h3 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -0.02em;
}

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

.rank-meta span {
    padding: 4px 9px;
    color: #555b66;
    background: #f0f1f3;
}

.page-shell {
    padding-top: 34px;
    padding-bottom: 70px;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding-top: 56px;
    padding-bottom: 56px;
}

.simple-hero,
.ranking-hero,
.search-hero {
    color: #ffffff;
    background: radial-gradient(circle at 74% 10%, rgba(248, 113, 113, 0.45), transparent 28%), linear-gradient(135deg, #111827, #2b0b0b 58%, #dc2626);
}

.page-hero h1 {
    max-width: 850px;
    font-size: clamp(36px, 5vw, 64px);
}

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

.breadcrumb {
    padding-top: 26px;
    padding-bottom: 20px;
    color: #747782;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--brand);
}

.breadcrumb span {
    margin: 0 6px;
}

.detail-page {
    padding-bottom: 76px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px;
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 42px;
    color: #ffffff;
    border-radius: 34px;
    background: #111114;
    box-shadow: var(--shadow);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 82% 15%, rgba(239, 68, 68, 0.38), transparent 34%);
}

.detail-cover,
.detail-info {
    position: relative;
    z-index: 2;
}

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

.detail-cover img {
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
}

.detail-info h1 {
    font-size: clamp(36px, 5vw, 64px);
}

.detail-lead {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.detail-meta li {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.detail-meta strong {
    display: block;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
}

.detail-meta span {
    display: block;
    margin-top: 3px;
    font-weight: 800;
}

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

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.55));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.play-circle {
    width: 84px;
    height: 84px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 18px 42px rgba(220, 38, 38, 0.42);
    font-size: 34px;
}

.player-overlay strong {
    font-size: 20px;
}

.detail-text {
    max-width: 980px;
}

.detail-text p {
    margin: 16px 0 0;
    color: #3f434d;
    font-size: 18px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 72px;
    color: #ffffff;
    background: #111114;
}

.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.footer-brand {
    font-size: 24px;
    font-weight: 950;
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
}

.site-footer nav {
    display: flex;
    gap: 16px;
    font-weight: 800;
}

.site-footer a:hover {
    color: #fca5a5;
}

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

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

@media (max-width: 920px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .site-header-inner {
        height: 68px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-top: 68px;
    }

    .hero-poster {
        max-width: 280px;
        transform: none;
    }

    .search-panel {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .detail-cover {
        max-width: 280px;
    }

    .site-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .brand-name {
        font-size: 19px;
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        letter-spacing: -0.04em;
    }

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

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

    .rank-card {
        grid-template-columns: 48px 74px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .rank-no {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        font-size: 17px;
    }

    .rank-card p {
        display: none;
    }

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

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

    .wide-search {
        align-items: stretch;
        flex-direction: column;
        border-radius: 22px;
    }

    .wide-search button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .site-header-inner,
    .mobile-nav,
    .hero-content,
    .search-panel,
    .content-section,
    .page-hero,
    .breadcrumb,
    .detail-page > .content-section,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .hero-content {
        padding-bottom: 96px;
    }

    .movie-card h3 {
        font-size: 16px;
    }

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

    .movie-card p,
    .movie-card-meta {
        font-size: 12px;
    }
}
