:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-cyan: #0891b2;
    --color-bg: #f8fafc;
    --color-card: #ffffff;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-border: #e2e8f0;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius-lg: 22px;
    --radius-md: 16px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(110deg, var(--color-primary), var(--color-primary-dark) 52%, var(--color-cyan));
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0 14px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 190px;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.brand-text {
    display: grid;
    gap: 1px;
}

.brand-text strong {
    font-size: 1.45rem;
    letter-spacing: 0.08em;
}

.brand-text em {
    color: rgba(255, 255, 255, 0.76);
    font-style: normal;
    font-size: 0.82rem;
}

.main-nav,
.quick-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.main-nav a,
.quick-nav a {
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a {
    padding: 9px 15px;
    background: rgba(255, 255, 255, 0.11);
    font-weight: 700;
}

.quick-nav {
    padding: 0 0 18px;
}

.quick-nav a {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.92rem;
}

.main-nav a:hover,
.quick-nav a:hover,
.main-nav a.active {
    background: #ffffff;
    color: var(--color-primary);
    transform: translateY(-1px);
}

.hero-section {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: linear-gradient(180deg, #0f172a, #1e293b);
    color: #ffffff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background:
        radial-gradient(circle at 22% 22%, rgba(56, 189, 248, 0.52), transparent 32%),
        radial-gradient(circle at 84% 12%, rgba(250, 204, 21, 0.38), transparent 28%),
        linear-gradient(135deg, rgba(59, 130, 246, 0.36), rgba(8, 145, 178, 0.18));
}

.hero-container {
    position: relative;
    min-height: 620px;
    display: grid;
    align-items: center;
    padding: 62px 0 76px;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    align-items: center;
    gap: 44px;
}

.hero-slide.active {
    display: grid;
    animation: fadeUp 0.55s ease both;
}

.hero-copy {
    display: grid;
    gap: 22px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-section .eyebrow,
.detail-hero .eyebrow,
.page-hero .eyebrow {
    background: rgba(255, 255, 255, 0.12);
    color: #facc15;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.84rem;
}

.tag-row span {
    background: #eff6ff;
    color: #2563eb;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(135deg, #facc15, #fb923c);
    color: #1e293b;
    box-shadow: 0 12px 28px rgba(251, 146, 60, 0.32);
}

.button-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

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

.hero-dot.active {
    background: #facc15;
}

.search-panel,
.section-block,
.content-card {
    margin-top: 34px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-card);
    box-shadow: var(--shadow-soft);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
    gap: 24px;
    align-items: end;
    padding: 26px;
}

.search-panel h2,
.section-heading h2,
.content-card h2,
.category-overview-card h2,
.ranking-card h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.6vw, 2.1rem);
    line-height: 1.2;
}

.search-panel p,
.category-overview-card p,
.ranking-card p,
.content-card p {
    margin: 8px 0 0;
    color: var(--color-muted);
}

.search-box {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 15px;
    padding: 0 16px;
    color: var(--color-text);
    outline: none;
}

.search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.section-block {
    padding: 28px;
}

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

.section-heading a {
    color: var(--color-primary);
    font-weight: 800;
}

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

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

.category-movie-grid {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #dbeafe;
}

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

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

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 15px;
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 2.7em;
    margin: 0;
    overflow: hidden;
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 0.93rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-muted);
    font-size: 0.84rem;
}

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

.category-tile {
    display: grid;
    gap: 10px;
    min-height: 180px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px;
    background: linear-gradient(145deg, #eff6ff, #ffffff 48%, #ecfeff);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.category-tile span {
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: 900;
}

.category-tile strong {
    font-size: 2rem;
}

.category-tile em,
.category-tile small {
    color: var(--color-muted);
    font-style: normal;
}

.dual-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-radius: 16px;
    padding: 10px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.rank-number {
    color: var(--color-primary);
    font-weight: 900;
}

.rank-item img {
    width: 58px;
    height: 76px;
    border-radius: 12px;
    object-fit: cover;
    background: #dbeafe;
}

.rank-content {
    display: grid;
    min-width: 0;
}

.rank-content strong,
.rank-content em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-content em {
    color: var(--color-muted);
    font-style: normal;
    font-size: 0.84rem;
}

.page-hero,
.detail-hero {
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.32), transparent 26%),
        linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2);
    color: #ffffff;
}

.page-hero .container {
    padding: 70px 0;
}

.page-hero p {
    margin-top: 16px;
}

.category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 34px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.category-poster-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.category-poster-stack img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    object-fit: cover;
    background: #dbeafe;
}

.category-sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.category-sample-links a {
    border-radius: 999px;
    padding: 5px 9px;
    background: #eff6ff;
    color: var(--color-primary);
    font-size: 0.86rem;
    font-weight: 700;
}

.ranking-list-page {
    grid-column: 1 / -1;
    display: grid;
    gap: 16px;
    margin-top: 8px;
}

.ranking-card {
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px;
    background: #ffffff;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #dbeafe;
}

.ranking-poster img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.ranking-poster span {
    position: absolute;
    left: 10px;
    top: 10px;
    border-radius: 999px;
    padding: 5px 9px;
    background: #facc15;
    color: #1e293b;
    font-weight: 900;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 64px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow-soft);
    background: rgba(255, 255, 255, 0.1);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-copy {
    display: grid;
    gap: 18px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

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

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

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

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(2, 6, 23, 0.62));
    color: #ffffff;
    cursor: pointer;
}

.play-cover span {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: linear-gradient(135deg, #facc15, #fb923c);
    color: #0f172a;
    font-size: 2rem;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.3);
}

.play-cover strong {
    font-size: 1.2rem;
}

.player-shell.is-playing .play-cover {
    display: none;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
    margin-top: 34px;
}

.content-card {
    padding: 24px;
}

.detail-meta-card dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 16px 0 0;
}

.detail-meta-card dt {
    color: var(--color-muted);
}

.detail-meta-card dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 48px;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.82);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 28px 0;
}

.footer-inner strong {
    color: #ffffff;
    letter-spacing: 0.08em;
}

.is-hidden {
    display: none !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .dual-section,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        order: -1;
    }
}

@media (max-width: 820px) {
    .header-inner,
    .search-panel,
    .hero-slide,
    .detail-hero-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .header-inner {
        align-items: flex-start;
    }

    .main-nav {
        width: 100%;
    }

    .hero-container,
    .hero-section {
        min-height: auto;
    }

    .hero-poster {
        max-width: 360px;
    }

    .hero-dots {
        position: static;
        margin-top: 24px;
    }

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

    .detail-poster {
        max-width: 320px;
    }
}

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

    .site-header {
        position: static;
    }

    .brand-icon {
        width: 42px;
        height: 42px;
    }

    .main-nav a,
    .quick-nav a {
        font-size: 0.88rem;
        padding: 7px 10px;
    }

    .hero-container,
    .page-hero .container,
    .detail-hero-grid {
        padding: 42px 0;
    }

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

    .section-block,
    .search-panel,
    .content-card {
        padding: 18px;
    }

    .ranking-card {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .ranking-poster img {
        height: 138px;
    }
}
