:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.10);
    --blue: #2563eb;
    --cyan: #06b6d4;
    --slate: #0f172a;
    --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #eef6ff 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    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: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.96), rgba(15, 23, 42, 0.98));
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(10px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee, #2563eb);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
    font-weight: 800;
}

.brand-name {
    display: block;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-subtitle {
    display: block;
    color: #67e8f9;
    font-size: 12px;
    line-height: 1.2;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #e2e8f0;
    font-weight: 600;
}

.nav-links a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
    color: #67e8f9;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 12px 0 18px;
}

.mobile-nav a {
    display: block;
    color: #e2e8f0;
    padding: 10px 0;
}

.hero-slider {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #0f172a 52%, #155e75);
}

.hero-glow {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background:
        radial-gradient(circle at 16% 24%, rgba(34, 211, 238, 0.75), transparent 34%),
        radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.7), transparent 36%),
        linear-gradient(90deg, rgba(6, 182, 212, 0.25), rgba(37, 99, 235, 0.35));
    animation: pulseGlow 8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 42px;
    align-items: center;
    padding: 76px 0 92px;
}

.hero-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.gradient-text {
    color: transparent;
    background: linear-gradient(90deg, #22d3ee, #60a5fa, #a5f3fc);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-title {
    margin: 0 0 14px;
    font-size: clamp(26px, 4vw, 44px);
    line-height: 1.15;
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 8px 14px;
    backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.36);
}

.btn-secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    min-height: 520px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
    transform: rotate(1.5deg);
}

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

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.86));
}

.poster-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
}

.poster-caption strong {
    display: block;
    font-size: 20px;
}

.rating-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 42px;
    border-radius: 14px;
    color: #facc15;
    background: rgba(15, 23, 42, 0.72);
    font-weight: 900;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: max(16px, calc((100% - 1180px) / 2));
    bottom: 28px;
    display: flex;
    gap: 10px;
}

.hero-controls button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.section {
    padding: 62px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

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

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

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

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

.card-overlay {
    position: absolute;
    inset: auto 10px 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.card-badge {
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--blue);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-line {
    display: -webkit-box;
    min-height: 42px;
    margin: 8px 0 0;
    overflow: hidden;
    color: #475569;
    font-size: 13px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    border-radius: 24px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 55%, #0891b2);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.18);
}

.category-card::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -45px;
    bottom: -45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
}

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

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #dbeafe;
}

.inline-links {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.inline-links a {
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 10px;
    font-size: 13px;
}

.page-hero {
    color: #fff;
    background: linear-gradient(135deg, #172554, #0f172a 52%, #155e75);
    padding: 74px 0;
}

.page-hero p {
    color: #dbeafe;
    max-width: 760px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 24px;
}

.search-box {
    width: min(100%, 520px);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    padding: 0 16px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.search-box input {
    width: 100%;
    min-height: 48px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 16px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 110px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
    background: #0f172a;
}

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

.rank-info h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

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

.detail-hero {
    color: #fff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(8, 145, 178, 0.92));
    padding: 52px 0 60px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #bfdbfe;
    font-size: 14px;
    margin-bottom: 24px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(240px, 330px) minmax(0, 1fr);
    gap: 36px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
    background: #0f172a;
}

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

.detail-title h1 {
    color: #fff;
}

.detail-title p {
    color: #dbeafe;
    font-size: 18px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

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

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.56));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.44);
    font-size: 32px;
}

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

.prose-card,
.aside-card {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    padding: 24px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.prose-card h2,
.aside-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.prose-card p {
    margin: 0 0 18px;
    color: #334155;
}

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

.related-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 58px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.related-item strong {
    display: block;
    line-height: 1.35;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

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

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

[hidden] {
    display: none !important;
}

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

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

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

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

    .nav-links {
        display: none;
    }

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

    .mobile-nav.is-open {
        display: block;
    }

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

    .brand-subtitle {
        display: none;
    }

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

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 44px 0 86px;
    }

    .hero-poster {
        min-height: 360px;
        transform: none;
    }

    .hero-poster img {
        height: 360px;
    }

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

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

    .section-heading,
    .footer-inner,
    .toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .rank-item {
        grid-template-columns: 48px 84px minmax(0, 1fr);
    }

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

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

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

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

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

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

    .rank-item {
        grid-template-columns: 42px 74px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }
}
