:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --soft: #f1f5f9;
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --cyan-soft: #cffafe;
    --blue-soft: #dbeafe;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
}

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: 50;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #0f172a;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    border-radius: 999px;
    box-shadow: 0 14px 24px rgba(8, 145, 178, 0.28);
    font-size: 15px;
    padding-left: 2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--cyan-dark);
    background: var(--cyan-soft);
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #0f172a;
    border-radius: 999px;
}

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

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 18%, rgba(8, 145, 178, 0.2), transparent 26%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.62) 42%, rgba(3, 7, 18, 0.22) 100%);
}

.hero-content {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 78px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.96);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(8, 145, 178, 0.28);
}

.hero h1 {
    margin: 18px 0 16px;
    color: #ffffff;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 28px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.8;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: var(--cyan);
    box-shadow: 0 16px 30px rgba(8, 145, 178, 0.3);
}

.btn-primary:hover {
    background: var(--cyan-dark);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.btn-light {
    color: var(--cyan-dark);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    cursor: pointer;
    font-size: 28px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: max(18px, calc((100% - 1180px) / 2 - 72px));
    transform: translateY(-50%);
}

.hero-next {
    right: max(18px, calc((100% - 1180px) / 2 - 72px));
    transform: translateY(-50%);
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

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

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

.page-hero {
    position: relative;
    overflow: hidden;
    margin: 30px auto 0;
    padding: 54px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.35), transparent 30%),
        linear-gradient(135deg, #0f172a, #155e75 52%, #0f172a);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 780px;
    margin: 10px 0 14px;
    font-size: clamp(34px, 4.8vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.8;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--cyan-dark);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section {
    margin-top: 64px;
}

.section-soft {
    padding: 44px;
    border-radius: 34px;
    background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.section-dark {
    padding: 44px;
    border-radius: 34px;
    background: #111827;
}

.section-dark .section-heading h2,
.section-dark .section-heading p,
.section-dark .movie-info h3 a,
.section-dark .movie-meta,
.section-dark .movie-stats,
.section-dark .eyebrow {
    color: #ffffff;
}

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

.section-heading h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 700px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-height: 42px;
    padding: 0 18px;
    color: var(--cyan-dark);
    background: var(--cyan-soft);
    border-radius: 999px;
    font-weight: 800;
}

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

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

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 18px;
    background: #e5e7eb;
    box-shadow: var(--shadow-soft);
}

.movie-card-large .movie-cover {
    aspect-ratio: 21 / 9;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-cover:hover img,
.movie-card:hover .movie-cover img {
    transform: scale(1.1);
}

.cover-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.82), rgba(3, 7, 18, 0.18) 52%, rgba(3, 7, 18, 0));
    transition: opacity 0.25s ease;
}

.movie-cover:hover .cover-shade,
.movie-card:hover .cover-shade {
    opacity: 1;
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--cyan);
    background: rgba(255, 255, 255, 0.93);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 24px;
    padding-left: 3px;
}

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

.card-chip,
.card-duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    color: #ffffff;
    background: rgba(3, 7, 18, 0.72);
    border-radius: 999px;
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.card-chip {
    left: 12px;
    top: 12px;
}

.card-duration {
    right: 12px;
    top: 12px;
}

.rank-badge {
    left: 12px;
    bottom: 12px;
    background: rgba(8, 145, 178, 0.94);
}

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

.movie-info h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.45;
}

.movie-info h3 a {
    transition: color 0.2s ease;
}

.movie-card:hover .movie-info h3 a {
    color: var(--cyan-dark);
}

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

.movie-meta,
.movie-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

.movie-stats {
    color: #0f172a;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(14, 116, 144, 0.92), rgba(37, 99, 235, 0.9)),
        var(--panel);
    box-shadow: var(--shadow-soft);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -36px;
    bottom: -46px;
    width: 130px;
    height: 130px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    font-size: 14px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 18px;
    font-weight: 900;
}

.filter-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) repeat(3, 180px);
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-toolbar label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.filter-toolbar input,
.filter-toolbar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    color: #0f172a;
    background: #f8fafc;
    padding: 0 14px;
    outline: none;
}

.filter-toolbar input:focus,
.filter-toolbar select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.empty-state {
    display: none;
    padding: 26px;
    color: #64748b;
    border-radius: 18px;
    background: #f8fafc;
    text-align: center;
}

.empty-state.active {
    display: block;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 26px 0 22px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--cyan-dark);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 360px;
    gap: 34px;
    align-items: start;
}

.player-panel,
.detail-card {
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #020617;
}

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-action {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: var(--cyan);
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    font-size: 34px;
    padding-left: 5px;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.player-info {
    padding: 30px;
}

.player-info h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: -0.04em;
    line-height: 1.12;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 0;
}

.detail-meta span,
.tag-list span {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 12px;
    color: #0f172a;
    background: #f1f5f9;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.detail-meta span:first-child {
    color: var(--cyan-dark);
    background: var(--cyan-soft);
}

.detail-text {
    margin-top: 26px;
}

.detail-text h2 {
    margin: 28px 0 10px;
    font-size: 24px;
}

.detail-text p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.side-cover {
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.side-cover img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

.side-cover-content {
    padding: 22px;
}

.side-cover-content h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.prev-next a {
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 62px 150px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-num {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), #2563eb);
    border-radius: 16px;
    font-weight: 900;
}

.rank-cover {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
}

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

.rank-main h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-main p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
}

.rank-score {
    color: var(--cyan-dark);
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
}

.site-footer {
    margin-top: 64px;
    padding: 42px 0;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 28px;
}

.footer-logo {
    color: #ffffff;
}

.footer-inner p {
    max-width: 480px;
    margin: 14px 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
}

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

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

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

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

    .side-cover {
        max-width: 520px;
    }
}

@media (max-width: 780px) {
    .site-header-inner {
        min-height: 64px;
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        border-radius: 14px;
    }

    .hero {
        height: 76vh;
        min-height: 560px;
    }

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

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

    .hero-arrow {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .hero-prev {
        left: 14px;
    }

    .hero-next {
        right: 14px;
    }

    .main-wrap {
        padding: 44px 0;
    }

    .page-hero {
        padding: 34px 24px;
        border-radius: 26px;
    }

    .section,
    .site-footer {
        margin-top: 46px;
    }

    .section-soft,
    .section-dark {
        padding: 28px 18px;
        border-radius: 26px;
    }

    .section-heading {
        display: block;
    }

    .section-more {
        margin-top: 16px;
    }

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

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

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

    .player-info {
        padding: 22px;
    }

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

    .rank-cover,
    .rank-score {
        display: none;
    }

    .footer-inner {
        display: block;
    }

    .footer-links {
        justify-content: flex-start;
        margin-top: 20px;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid.compact,
    .movie-grid.featured-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .inline-actions {
        display: grid;
    }

    .btn {
        width: 100%;
    }

    .prev-next {
        grid-template-columns: 1fr;
    }
}
