:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --card: #ffffff;
    --dark: #020617;
    --dark-2: #0f172a;
    --cyan: #06b6d4;
    --cyan-deep: #0891b2;
    --teal: #14b8a6;
    --amber: #f59e0b;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.92);
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    font-size: 14px;
    color: #cbd5e1;
}

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

.main-nav a:hover,
.mobile-nav a:hover {
    color: #67e8f9;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: #ffffff;
    border-radius: 999px;
}

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

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
}

main {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-section {
    position: relative;
    width: 100%;
    min-height: 680px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.36), transparent 28%), linear-gradient(135deg, #020617 0%, #0f172a 48%, #075985 100%);
}

.hero-slider {
    position: relative;
    min-height: 680px;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(4px) saturate(1.2);
}

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

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.86));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    align-items: center;
    gap: 54px;
    padding: 72px 0;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border: 1px solid rgba(103, 232, 249, 0.42);
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.14);
    backdrop-filter: blur(10px);
}

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

.hero-copy p {
    max-width: 680px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: #0e7490;
    background: #ecfeff;
}

.hero-tags span {
    color: #cffafe;
    background: rgba(6, 182, 212, 0.22);
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 16px 34px rgba(6, 182, 212, 0.28);
}

.ghost-btn {
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.36);
}

.inline-btn {
    color: var(--cyan-deep);
    background: #ecfeff;
}

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

.hero-poster {
    position: relative;
    width: min(390px, 100%);
    justify-self: end;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    box-shadow: 0 40px 90px rgba(2, 6, 23, 0.45);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span,
.play-hover {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.92);
    box-shadow: 0 18px 40px rgba(6, 182, 212, 0.32);
}

.hero-poster span {
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    font-size: 24px;
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 34px;
    width: min(1200px, calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    transform: translateX(-50%);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.is-active {
    width: 32px;
    background: #67e8f9;
}

.hero-control-buttons {
    display: flex;
    gap: 10px;
}

.hero-control-buttons button {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.44);
}

.section {
    margin-top: 68px;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-wrap img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.year-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
}

.play-hover {
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

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

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

.movie-card-body p {
    min-height: 48px;
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: #475569;
    font-size: 12px;
}

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

.category-card {
    padding: 22px;
    min-height: 190px;
    border: 1px solid rgba(6, 182, 212, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(145deg, #ffffff, #ecfeff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.category-count {
    display: inline-flex;
    margin-top: 16px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #0e7490;
    background: #cffafe;
    font-weight: 800;
    font-size: 12px;
}

.rank-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    padding: 24px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.35), transparent 34%), linear-gradient(135deg, #020617, #0f172a 58%, #155e75);
    box-shadow: var(--shadow);
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
}

.rank-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 10px;
}

.rank-item strong {
    display: block;
    color: #ffffff;
}

.rank-item em {
    display: block;
    margin-top: 3px;
    color: #a5f3fc;
    font-style: normal;
    font-size: 12px;
}

.rank-num {
    color: #67e8f9;
    font-size: 24px;
    font-weight: 900;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.breadcrumb {
    margin: 28px 0 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.page-hero {
    padding: 46px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.38), transparent 34%), linear-gradient(135deg, #020617, #0f172a 58%, #164e63);
    box-shadow: var(--shadow);
}

.page-hero h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

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

.player-card,
.detail-card,
.side-card,
.text-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.player-card {
    overflow: hidden;
    background: #020617;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.48);
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.95);
    box-shadow: 0 24px 54px rgba(6, 182, 212, 0.35);
    font-size: 30px;
}

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

.detail-title {
    margin: 0;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #0e7490;
    background: #ecfeff;
    font-weight: 700;
    font-size: 13px;
}

.detail-card h2,
.side-card h2,
.text-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-card p,
.text-card p {
    color: #334155;
}

.detail-cover {
    overflow: hidden;
    border-radius: 22px;
    background: #0f172a;
}

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

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

.empty-state {
    padding: 26px;
    border-radius: 22px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: #020617;
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 32px;
}

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

.site-footer p {
    margin: 0;
    color: #94a3b8;
}

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

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: #67e8f9;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-content,
    .rank-panel,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        justify-self: start;
        width: min(320px, 100%);
    }

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

    .search-panel {
        grid-template-columns: 1fr;
    }
}

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

    .brand {
        font-size: 17px;
    }

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

    .hero-content {
        padding: 46px 0 80px;
        gap: 28px;
    }

    .hero-poster {
        display: none;
    }

    .hero-controls {
        bottom: 22px;
    }

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

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

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

    .page-hero {
        padding: 28px;
    }

    .detail-card,
    .side-card,
    .text-card {
        padding: 18px;
    }

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

    .rank-item img {
        width: 48px;
        height: 64px;
    }
}
