* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --cyan: #06b6d4;
    --red: #ef4444;
    --amber: #f59e0b;
    --green: #10b981;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, 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 {
    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.88);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #0f172a;
    white-space: nowrap;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.brand-name {
    font-size: 18px;
    letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #475569;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--blue);
    background: #eff6ff;
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.nav-search input,
.mobile-search input,
.hero-search-form input,
.filter-input {
    border: 0;
    outline: 0;
    background: transparent;
    min-width: 210px;
    padding: 8px 12px;
    color: #0f172a;
}

.nav-search button,
.mobile-search button,
.hero-search-form button,
.filter-button,
.primary-btn {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    font-weight: 800;
    border-radius: 999px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.hero-search-form button:hover,
.filter-button:hover,
.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.3);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #eff6ff;
    padding: 10px;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: var(--blue-dark);
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.mobile-panel.open {
    display: block;
}

.mobile-link {
    display: block;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
}

main {
    overflow: hidden;
}

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

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    border-radius: 32px;
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 58%, #164e63);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: saturate(1.15);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%, rgba(6, 182, 212, 0.28), transparent 32%),
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.42), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.28));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: 1.1fr 0.72fr;
    align-items: center;
    gap: 48px;
    padding: 64px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #bfdbfe;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    max-width: 780px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-line {
    max-width: 680px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 18px;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span,
.movie-tags span,
.filter-chip,
.hero-category-links a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-meta span {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #e0f2fe;
}

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

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    aspect-ratio: 4 / 5;
    transform: rotate(1.5deg);
}

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

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.35);
}

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

.hero-dot {
    width: 44px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.35);
}

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

.hero-search-card {
    position: relative;
    z-index: 6;
    width: min(980px, calc(100% - 32px));
    margin: -42px auto 0;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero-search-form {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #f8fafc;
}

.hero-search-form input {
    flex: 1;
    min-width: 0;
    font-size: 16px;
}

.hero-category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.hero-category-links a {
    padding: 8px 12px;
    color: var(--blue-dark);
    background: #eff6ff;
}

.section {
    padding: 72px 0;
}

.section.white {
    background: #ffffff;
}

.section.hot {
    background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.section.latest {
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.section.gold {
    background: linear-gradient(135deg, #fefce8, #fffbeb);
}

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

.section.dark .section-head p,
.section.dark .card-meta,
.section.dark .movie-card p {
    color: #cbd5e1;
}

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

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

.section-head h2,
.page-title h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p,
.page-title p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    font-weight: 900;
}

.section-link span {
    font-size: 28px;
    line-height: 1;
    transition: transform 0.2s ease;
}

.section-link:hover span {
    transform: translateX(4px);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.85);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: rgba(37, 99, 235, 0.22);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

.movie-card:not(.wide-card) .card-cover {
    aspect-ratio: 3 / 4;
}

.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease, opacity 0.32s ease;
}

.movie-card:hover .card-cover img {
    transform: scale(1.08);
    opacity: 0.92;
}

.type-badge,
.rank-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--blue);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.26);
}

.rank-badge {
    left: auto;
    right: 14px;
    background: var(--red);
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 52px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.45;
}

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

.card-meta {
    margin-top: 8px;
    color: var(--muted);
    font-size: 13px;
}

.movie-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 76px;
    margin: 10px 0 0;
    color: #475569;
    font-size: 14px;
}

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

.tag-row {
    margin-top: 14px;
}

.tag-row span,
.movie-tags span {
    padding: 5px 9px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
}

.wide-card {
    display: grid;
    grid-template-columns: 42% 1fr;
}

.wide-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.category-card {
    min-height: 160px;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #10b981, #14b8a6);
}

.category-card:nth-child(4n) {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

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

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

.category-card span {
    color: rgba(255, 255, 255, 0.86);
}

.ranking-layout {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 28px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 54px 76px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(4px);
}

.ranking-num {
    font-size: 22px;
    color: #67e8f9;
    font-weight: 900;
    text-align: center;
}

.ranking-row img {
    width: 76px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.ranking-info strong,
.ranking-info em {
    display: block;
}

.ranking-info strong {
    color: #ffffff;
    font-size: 16px;
}

.ranking-info em {
    margin-top: 3px;
    color: #cbd5e1;
    font-size: 12px;
    font-style: normal;
}

.page-banner {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 58px;
    border-radius: 32px;
    color: #ffffff;
    background:
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.35), transparent 30%),
        linear-gradient(135deg, #0f172a, #1e3a8a 62%, #164e63);
    box-shadow: var(--shadow);
}

.page-title h1 {
    color: #ffffff;
}

.page-title p {
    max-width: 780px;
    color: #dbeafe;
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-input {
    flex: 1;
    min-width: 220px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
}

.filter-chip {
    border: 1px solid var(--line);
    cursor: pointer;
    padding: 9px 13px;
    color: #334155;
    background: #ffffff;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: var(--blue);
    border-color: var(--blue);
}

.no-results {
    display: none;
    margin-top: 20px;
    padding: 22px;
    border-radius: 20px;
    color: #475569;
    background: #ffffff;
    border: 1px solid var(--line);
}

.no-results.show {
    display: block;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 42px 0 76px;
    color: #ffffff;
    background: #0f172a;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.22;
    filter: blur(2px) saturate(1.2);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 10%, rgba(6, 182, 212, 0.28), transparent 34%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.8));
}

.detail-wrap {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 36px;
    align-items: center;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #bfdbfe;
    font-weight: 700;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 45px rgba(37, 99, 235, 0.46);
    font-size: 34px;
    padding-left: 5px;
}

.play-overlay strong {
    font-size: 18px;
    letter-spacing: 0.08em;
}

.detail-info h1 {
    margin-bottom: 18px;
}

.detail-meta {
    margin-bottom: 18px;
}

.detail-meta span {
    padding: 8px 12px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 24px 55px rgba(0, 0, 0, 0.28);
}

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

.content-layout {
    width: min(1180px, calc(100% - 32px));
    margin: -42px auto 0;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
}

.content-card {
    padding: 30px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid var(--line);
}

.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.content-card p {
    margin: 0 0 18px;
    color: #334155;
    font-size: 16px;
}

.side-card {
    padding: 22px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid var(--line);
}

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

.side-list .ranking-row {
    grid-template-columns: 44px 64px 1fr;
    background: #f8fafc;
    border-color: var(--line);
}

.side-list .ranking-info strong {
    color: #0f172a;
}

.side-list .ranking-info em {
    color: var(--muted);
}

.side-list .ranking-num {
    color: var(--blue);
    font-size: 16px;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
}

.footer-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-inner p {
    margin: 10px 0 0;
    max-width: 560px;
}

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

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

@media (max-width: 1024px) {
    .desktop-nav,
    .nav-search {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-content,
    .detail-wrap,
    .content-layout,
    .ranking-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 48px 34px 84px;
    }

    .hero-poster,
    .detail-poster {
        display: none;
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .nav-wrap {
        height: 64px;
    }

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

    .hero,
    .page-banner {
        width: calc(100% - 20px);
        margin-top: 16px;
    }

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

    .hero-content,
    .page-banner {
        padding: 30px 20px 84px;
    }

    .hero-dots {
        left: 24px;
        bottom: 28px;
    }

    .hero-search-card {
        width: calc(100% - 20px);
        margin-top: -30px;
    }

    .hero-search-form,
    .mobile-search {
        border-radius: 22px;
        flex-direction: column;
    }

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

    .wide-card {
        grid-template-columns: 1fr;
    }

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

    .ranking-row {
        grid-template-columns: 42px 64px 1fr;
    }

    .detail-hero {
        padding-top: 24px;
    }

    .content-card,
    .side-card {
        padding: 22px;
    }
}
