:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --panel: #ffffff;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --blue: #2563eb;
    --blue-deep: #1d4ed8;
    --cyan: #38bdf8;
    --orange: #f97316;
    --border: #e2e8f0;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
}

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

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand small {
    display: block;
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 12px;
}

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

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

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

.nav-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 11px;
    cursor: pointer;
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 210px;
}

.nav-search input {
    width: 150px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 13px;
    outline: none;
}

.nav-search input::placeholder {
    color: #cbd5e1;
}

.nav-search button {
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue);
    padding: 8px 13px;
    cursor: pointer;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 640px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 12%, rgba(56, 189, 248, 0.3), transparent 35%), linear-gradient(135deg, #020617, #1e3a8a 52%, #0f172a);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.16;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.42) 1px, transparent 1px);
    background-size: 32px 32px;
}

.hero-slider {
    position: relative;
    min-height: 640px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 52px;
    padding: 64px 0 74px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.22);
    border: 1px solid rgba(191, 219, 254, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 16px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero h1 span {
    color: #60a5fa;
}

.hero-lead {
    max-width: 680px;
    color: #dbeafe;
    font-size: clamp(18px, 2.5vw, 25px);
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 30px;
}

.hero-meta span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(226, 232, 240, 0.18);
    font-size: 13px;
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 0;
    border-radius: 12px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--blue);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    background: var(--blue-deep);
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.32);
}

.btn.secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: none;
    backdrop-filter: blur(14px);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-card {
    position: relative;
    z-index: 2;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(15, 23, 42, 0.4);
}

.hero-card img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-card:hover img {
    transform: scale(1.04);
}

.hero-card-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    border-radius: 999px;
    padding: 9px 13px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    font-weight: 800;
}

.hero-card-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 60px 22px 22px;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.hero-card-title strong {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 28px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 38px;
    height: 6px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #60a5fa;
}

.section {
    padding: 72px 0;
}

.section.dark {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

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

.section-head h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.section.dark .section-head h2 {
    color: #ffffff;
}

.section-head p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
}

.section.dark .section-head p {
    color: #cbd5e1;
}

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

.feature-box,
.category-tile,
.info-panel,
.search-box {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.feature-box {
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-box:hover,
.category-tile:hover,
.movie-card:hover,
.rank-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: var(--blue);
    background: #dbeafe;
    font-size: 24px;
    margin-bottom: 14px;
}

.feature-box h3,
.category-tile h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.feature-box p,
.category-tile p,
.card-summary,
.detail-copy p,
.content-card p,
.rank-copy p {
    color: var(--muted);
    line-height: 1.7;
}

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

.category-tile {
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile .arrow {
    color: var(--blue);
    font-weight: 900;
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.88);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #f1f5f9);
}

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

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

.poster-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-overlay {
    background: rgba(0, 0, 0, 0.32);
    opacity: 1;
}

.play-symbol {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    font-size: 22px;
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.3);
}

.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: var(--blue);
    font-size: 12px;
    font-weight: 800;
}

.year-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 8px;
    padding: 5px 8px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    font-size: 12px;
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-title {
    margin: 0;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover .card-title {
    color: var(--blue);
}

.card-summary {
    margin: 0;
    font-size: 14px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    margin-top: auto;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    -webkit-line-clamp: 1;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 15px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.88);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-poster {
    position: relative;
    height: 122px;
    overflow: hidden;
}

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

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

.rank-copy {
    padding: 13px 14px 13px 0;
}

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

.rank-copy p {
    margin: 0 0 8px;
    font-size: 13px;
}

.page-hero {
    padding: 62px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e40af 54%, #0f172a);
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
}

.filter-bar input,
.search-box input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 12px 14px;
    outline: none;
}

.filter-bar input:focus,
.search-box input:focus,
.nav-search input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.15);
}

.search-box {
    padding: 20px;
    margin: -36px auto 32px;
    position: relative;
    z-index: 3;
}

.search-box form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.breadcrumb {
    padding: 20px 0;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--blue);
    font-weight: 700;
}

.detail-hero {
    color: #ffffff;
    background: radial-gradient(circle at 16% 12%, rgba(37, 99, 235, 0.33), transparent 36%), linear-gradient(135deg, #020617, #1e293b 48%, #1e3a8a);
    padding: 30px 0 64px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 34px;
    align-items: center;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.76));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-cover .play-symbol {
    width: 72px;
    height: 72px;
    font-size: 30px;
}

.play-cover strong {
    max-width: 82%;
    text-align: center;
    font-size: clamp(20px, 3vw, 32px);
    line-height: 1.3;
}

.detail-copy h1 {
    color: #ffffff;
    margin: 14px 0 16px;
}

.detail-copy .lead {
    color: #dbeafe;
    font-size: 18px;
}

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

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

.content-card {
    border-radius: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
    margin: 0 0 14px;
    color: #0f172a;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 22px;
}

.detail-table {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.detail-table div {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-table dt {
    color: #475569;
    font-weight: 800;
}

.detail-table dd {
    margin: 0;
    color: #0f172a;
}

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

.side-link {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.side-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.side-link img {
    width: 76px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.side-link strong {
    display: block;
    color: #0f172a;
    line-height: 1.35;
}

.side-link span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 12px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
    padding: 52px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 32px;
    margin-bottom: 28px;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.site-footer p,
.site-footer a {
    color: #cbd5e1;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(226, 232, 240, 0.14);
    padding-top: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
}

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

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

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

    .hero-card img {
        height: 420px;
    }

    .content-grid {
        gap: 22px;
    }
}

@media (max-width: 860px) {
    .nav-inner {
        height: auto;
        min-height: 66px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

    .site-nav.is-open .nav-links,
    .site-nav.is-open .nav-search {
        display: flex;
    }

    .site-nav.is-open .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding-top: 10px;
    }

    .site-nav.is-open .nav-search input {
        flex: 1;
        width: auto;
    }

    .hero,
    .hero-slider {
        min-height: 920px;
    }

    .hero-slide {
        align-content: start;
        padding-top: 44px;
        gap: 28px;
    }

    .hero-dots {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 640px) {
    .section {
        padding: 50px 0;
    }

    .feature-grid,
    .category-grid,
    .movie-grid,
    .rank-list,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .filter-bar,
    .search-box form {
        display: block;
    }

    .filter-bar .btn,
    .search-box .btn {
        width: 100%;
        margin-top: 10px;
    }

    .hero,
    .hero-slider {
        min-height: 870px;
    }

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

    .rank-card {
        grid-template-columns: 96px 1fr;
    }

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