:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --purple: #7c3aed;
    --pink: #db2777;
    --orange: #f97316;
    --slate: #111827;
    --card: #ffffff;
    --line: rgba(148, 163, 184, 0.26);
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg);
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a, #4c1d95 48%, #111827);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
}

.nav-wrap {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 12px 24px rgba(124, 58, 237, 0.38);
}

.logo-text {
    font-size: 22px;
    background: linear-gradient(90deg, #d8b4fe, #f9a8d4);
    -webkit-background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
    transition: color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
}

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

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

.mobile-nav a {
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-carousel {
    position: relative;
    height: 78vh;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #1e1b4b, #581c87, #831843);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 680ms ease, visibility 680ms ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img,
.detail-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    transform: scale(1.02);
}

.hero-mask,
.detail-backdrop-mask {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 24%, rgba(236, 72, 153, 0.35), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(46, 16, 101, 0.78) 48%, rgba(15, 23, 42, 0.46));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.28);
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
    margin: 18px 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.05;
    font-weight: 900;
}

.hero-copy p,
.page-hero p,
.detail-intro p {
    max-width: 780px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

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

.hero-tags span,
.tag-row span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #6d28d9;
    background: #f3e8ff;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.secondary-button,
.text-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
    padding: 13px 26px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--purple), var(--pink));
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.32);
}

.secondary-button {
    padding: 13px 22px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.secondary-button:hover,
.text-button:hover,
.section-link:hover {
    transform: translateY(-2px) scale(1.02);
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.58;
}

.hero-dot.active {
    width: 34px;
    border-radius: 999px;
    opacity: 1;
    background: linear-gradient(90deg, var(--purple), var(--pink));
}

.search-panel {
    position: relative;
    z-index: 10;
    margin-top: -34px;
}

.search-panel-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
    align-items: center;
    gap: 24px;
    padding: 24px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel h2 {
    margin: 0 0 4px;
    font-size: 24px;
}

.search-panel p {
    margin: 0;
    color: var(--muted);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
}

.search-box input {
    width: 100%;
    height: 48px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
}

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

.warm-section {
    background: linear-gradient(135deg, #fff7ed, #fdf2f8, #f5f3ff);
}

.category-section {
    background: #ffffff;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 0 0 5px;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 900;
}

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

.section-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.section-link,
.text-button {
    margin-left: auto;
    padding: 10px 18px;
    color: var(--purple);
    background: #f3e8ff;
}

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

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

.movie-card {
    min-width: 0;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    background: linear-gradient(135deg, #312e81, #7e22ce);
    box-shadow: var(--soft-shadow);
}

.movie-cover img,
.horizontal-cover img,
.category-tile img,
.category-cover-stack img,
.podium-card img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 520ms ease;
}

.movie-card:hover .movie-cover img,
.horizontal-card:hover img,
.category-tile:hover img,
.podium-card:hover img {
    transform: scale(1.08);
}

.play-chip,
.card-badge {
    position: absolute;
    z-index: 3;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    border-radius: 999px;
}

.play-chip {
    left: 12px;
    bottom: 12px;
    padding: 7px 10px;
    background: rgba(15, 23, 42, 0.78);
}

.card-badge {
    top: 12px;
    right: 12px;
    padding: 6px 9px;
    background: #dc2626;
}

.movie-info {
    padding: 14px 2px 0;
}

.movie-info h3,
.horizontal-card h3,
.podium-card h2 {
    margin: 0 0 7px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
}

.movie-info h3 a:hover,
.horizontal-card h3 a:hover,
.podium-card h2 a:hover {
    color: var(--purple);
}

.movie-meta,
.movie-desc,
.horizontal-card p,
.podium-card p {
    color: var(--muted);
}

.movie-meta {
    margin: 0 0 8px;
    font-size: 13px;
}

.movie-desc {
    display: -webkit-box;
    margin: 0 0 10px;
    min-height: 42px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.horizontal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.horizontal-cover {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #4c1d95, #be185d);
}

.horizontal-card h3 {
    font-size: 18px;
}

.horizontal-card p {
    display: -webkit-box;
    margin: 0 0 12px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.horizontal-card span {
    color: #94a3b8;
    font-size: 13px;
}

.rank-number {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), #dc2626);
}

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

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

.category-grid,
.category-large-grid,
.podium-grid {
    display: grid;
    gap: 22px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.82));
}

.category-tile span,
.category-tile strong {
    position: absolute;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.category-tile span {
    bottom: 58px;
    font-size: 24px;
    font-weight: 900;
}

.category-tile strong {
    bottom: 22px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    line-height: 1.45;
}

.page-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 84% 0%, rgba(236, 72, 153, 0.4), transparent 32%), linear-gradient(135deg, #0f172a, #4c1d95 56%, #831843);
}

.compact-hero {
    padding: 86px 0 74px;
}

.page-hero h1 {
    font-size: clamp(34px, 5vw, 58px);
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
    padding: 22px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.category-card-large h2 {
    margin: 4px 0 10px;
    font-size: 26px;
}

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

.category-cover-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 170px;
}

.category-cover-stack img {
    min-width: 0;
    height: 100%;
    border-radius: 16px;
}

.category-cover-stack img:first-child {
    grid-row: span 2;
}

.mini-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.mini-link-row a {
    padding: 6px 10px;
    border-radius: 999px;
    color: #6d28d9;
    background: #f3e8ff;
    font-size: 13px;
    font-weight: 700;
}

.podium-section {
    padding-bottom: 16px;
}

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

.podium-card {
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.podium-card a:first-child {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    margin-bottom: 16px;
}

.podium-card span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), #dc2626);
}

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

.detail-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    min-height: 560px;
    padding: 62px 0;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.34);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

.detail-intro h1 {
    font-size: clamp(34px, 5vw, 62px);
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-intro .primary-button {
    margin-top: 28px;
}

.player-section {
    padding-top: 52px;
}

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

.player-card,
.detail-side-card,
.text-columns article {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.player-card {
    padding: 22px;
}

.player-card h2,
.detail-side-card h2,
.text-columns h2 {
    margin: 0 0 18px;
    font-size: 26px;
    font-weight: 900;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.26), rgba(0, 0, 0, 0.34));
    cursor: pointer;
    transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-large {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 18px 38px rgba(124, 58, 237, 0.45);
}

.detail-side-card {
    padding: 24px;
}

dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

dt {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
}

dd {
    margin: -8px 0 4px;
    font-weight: 750;
    line-height: 1.55;
}

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

.text-columns article {
    padding: 28px;
}

.text-columns p {
    margin: 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937 54%, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1.2fr;
    gap: 36px;
    padding: 54px 0;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-grid a:not(.footer-logo) {
    display: inline-block;
    margin: 0 12px 10px 0;
    color: #d1d5db;
}

.footer-grid a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.no-results {
    grid-column: 1 / -1;
    padding: 38px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #ffffff;
}

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

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

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

    .mobile-menu-button {
        display: block;
    }

    .hero-carousel {
        min-height: 640px;
        height: 78vh;
    }

    .search-panel-inner,
    .detail-layout,
    .text-columns,
    .footer-grid,
    .detail-hero-grid,
    .category-card-large {
        grid-template-columns: 1fr;
    }

    .detail-hero-grid {
        gap: 24px;
    }

    .detail-poster {
        width: min(240px, 78vw);
    }

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

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

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

    .hero-copy h1,
    .page-hero h1,
    .detail-intro h1 {
        font-size: 36px;
    }

    .movie-grid,
    .all-movie-grid,
    .category-grid,
    .horizontal-grid,
    .ranking-list,
    .long-ranking {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .horizontal-card h3,
    .movie-info h3 {
        font-size: 15px;
    }

    .horizontal-card p,
    .movie-desc {
        font-size: 13px;
    }

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

    .section-link {
        display: none;
    }

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

    .category-cover-stack {
        height: 150px;
    }
}
