:root {
    --page-bg: #f8fafc;
    --text-main: #111827;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --brand-blue: #2563eb;
    --brand-indigo: #4f46e5;
    --brand-rose: #e11d48;
    --soft-border: rgba(148, 163, 184, 0.28);
    --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 30px rgba(37, 99, 235, 0.16);
}

* {
    box-sizing: border-box;
}

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

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #e5e7eb;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--soft-border);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    min-height: 74px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-indigo));
    box-shadow: var(--shadow-soft);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 20px;
    font-weight: 800;
}

.brand-text em {
    font-style: normal;
    font-size: 12px;
    color: var(--text-muted);
}

.header-search {
    flex: 1;
    max-width: 440px;
    display: flex;
    align-items: center;
    border: 2px solid #bfdbfe;
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
}

.header-search input {
    flex: 1;
    min-width: 0;
    padding: 10px 16px;
    outline: none;
    color: #111827;
}

.header-search button {
    margin-right: 4px;
    padding: 8px 16px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--brand-blue);
    transition: 0.2s ease;
}

.header-search button:hover,
.primary-btn:hover {
    background: #1d4ed8;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-link {
    color: #374151;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--brand-blue);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 210px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
    font-size: 14px;
}

.dropdown-panel a:hover {
    color: var(--brand-blue);
    background: #eff6ff;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eff6ff;
    color: var(--brand-blue);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    padding: 8px 20px 18px;
    border-top: 1px solid var(--soft-border);
    background: rgba(255, 255, 255, 0.96);
}

.mobile-nav a {
    display: block;
    padding: 12px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
}

.mobile-nav a:hover {
    background: #eff6ff;
    color: var(--brand-blue);
}

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

.hero-slider {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-bg,
.hero-mask {
    position: absolute;
    inset: 0;
}

.hero-img {
    filter: saturate(1.05) contrast(1.05);
    transform: scale(1.04);
}

.hero-mask {
    background:
        radial-gradient(circle at 78% 35%, rgba(37, 99, 235, 0.34), transparent 32%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.22) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.05));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 620px;
    margin: 0 auto;
    padding: 80px 24px 72px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) 380px;
    gap: 48px;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(10px);
    margin-bottom: 22px;
}

.hero-copy h1 {
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 900;
    margin-bottom: 20px;
}

.hero-copy p {
    max-width: 680px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.9;
    margin-bottom: 22px;
}

.hero-tags,
.detail-tags,
.movie-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    color: #1d4ed8;
    background: #dbeafe;
}

.hero-tags .tag-pill {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.primary-btn,
.ghost-btn,
.text-link,
.full-link,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.22s ease;
}

.primary-btn {
    padding: 13px 24px;
    color: #ffffff;
    background: var(--brand-blue);
    box-shadow: var(--shadow-soft);
}

.ghost-btn {
    padding: 13px 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.26);
}

.hero-poster {
    position: relative;
    display: block;
    height: 500px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
    transform: rotate(1.2deg);
}

.hero-poster:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.46), transparent 56%);
}

.hero-poster span {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

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

.hero-dot {
    width: 32px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: 0.2s ease;
}

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

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

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

.section-heading > div {
    position: relative;
    padding-left: 18px;
}

.section-bar {
    position: absolute;
    left: 0;
    top: 5px;
    width: 6px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand-blue), var(--brand-indigo));
}

.section-heading h2 {
    font-size: clamp(26px, 3.2vw, 36px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin-top: 8px;
    color: var(--text-muted);
}

.section-more,
.text-link,
.full-link {
    color: var(--brand-blue);
}

.section-more:hover,
.text-link:hover,
.full-link:hover {
    color: #1d4ed8;
    transform: translateX(2px);
}

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    background: var(--card-bg);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-cover-img {
    transition: transform 0.42s ease;
}

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

.movie-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.movie-play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-50%, -50%) scale(0.76);
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transition: 0.24s ease;
}

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

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

.movie-card-title {
    margin-bottom: 6px;
    font-size: 17px;
    font-weight: 900;
}

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

.movie-card-meta,
.movie-card-desc {
    color: var(--text-muted);
    font-size: 13px;
}

.movie-card-desc {
    min-height: 40px;
    margin-top: 8px;
    line-height: 1.55;
}

.movie-card-tags {
    margin-top: 12px;
}

.category-section {
    padding-top: 24px;
}

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

.category-card {
    position: relative;
    min-height: 160px;
    border-radius: 26px;
    overflow: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.category-card:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.12));
}

.category-bg {
    position: absolute;
    inset: 0;
    transform: scale(1.02);
    transition: transform 0.36s ease;
}

.category-card:hover .category-bg {
    transform: scale(1.1);
}

.category-card span,
.category-card small {
    position: relative;
    z-index: 2;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card small {
    margin-top: 6px;
    color: #dbeafe;
    line-height: 1.5;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 32px;
    align-items: start;
}

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

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-panel h2 {
    margin-bottom: 18px;
    font-size: 24px;
    font-weight: 900;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    color: #334155;
    background: #f8fafc;
    transition: 0.2s ease;
}

.rank-item:hover {
    color: var(--brand-blue);
    background: #eff6ff;
}

.rank-num {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    background: #e2e8f0;
    font-weight: 900;
}

.rank-hot {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-rose), #f97316);
}

.rank-score {
    color: var(--brand-rose);
    font-weight: 900;
}

.page-main {
    min-height: 70vh;
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 24px 20px;
}

.compact-hero {
    padding-top: 62px;
    padding-bottom: 24px;
}

.page-hero h1,
.detail-info h1 {
    max-width: 920px;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.page-hero p,
.detail-one-line {
    max-width: 780px;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.9;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #64748b;
    font-size: 14px;
    margin-bottom: 18px;
}

.breadcrumbs a:hover {
    color: var(--brand-blue);
}

.filter-bar {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-bar input,
.filter-bar select {
    min-height: 46px;
    padding: 0 16px;
    border: 1px solid var(--soft-border);
    border-radius: 999px;
    background: #ffffff;
    outline: none;
    color: #111827;
}

.filter-bar input {
    min-width: min(420px, 100%);
}

.filter-bar button {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--brand-blue);
    font-weight: 800;
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.category-overview-cover {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 20px;
}

.category-overview-card h2 {
    margin-bottom: 8px;
    font-size: 23px;
    font-weight: 900;
}

.category-overview-card p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
}

.top-rank-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.top-rank-card {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: var(--shadow-card);
}

.top-rank-card:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.06));
}

.top-rank-card strong,
.top-rank-card span,
.top-rank-card em {
    position: absolute;
    z-index: 2;
    left: 22px;
}

.top-rank-card strong {
    top: 20px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.top-rank-card span {
    bottom: 54px;
    right: 22px;
    font-size: 22px;
    font-weight: 900;
}

.top-rank-card em {
    bottom: 22px;
    font-style: normal;
    color: #fde68a;
    font-weight: 900;
}

.ranking-table {
    display: grid;
    gap: 10px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 220px 100px 70px;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-radius: 18px;
    background: #ffffff;
    color: #334155;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.ranking-row:hover {
    color: var(--brand-blue);
    background: #eff6ff;
}

.ranking-index {
    font-weight: 900;
    color: var(--brand-rose);
}

.ranking-name {
    font-weight: 900;
}

.detail-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    padding: 28px;
    border-radius: 34px;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 12%, rgba(96, 165, 250, 0.34), transparent 32%),
        linear-gradient(135deg, #0f172a, #1e3a8a 56%, #4c1d95);
    box-shadow: var(--shadow-card);
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 28px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
    color: #ffffff;
}

.detail-one-line {
    color: #dbeafe;
}

.detail-meta {
    margin: 18px 0;
    color: #bfdbfe;
    font-weight: 700;
}

.detail-section {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px;
}

.detail-section h2,
.player-section h2 {
    margin-bottom: 14px;
    font-size: 28px;
    font-weight: 900;
}

.detail-section p {
    color: #334155;
    line-height: 2;
    font-size: 17px;
}

.player-section {
    padding-top: 38px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #020617;
}

.player-cover:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.18));
}

.player-poster {
    position: absolute;
    inset: 0;
}

.play-circle {
    position: relative;
    z-index: 3;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    background: #ffffff;
    font-size: 30px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease;
}

.player-cover:hover .play-circle {
    transform: scale(1.08);
}

.player-shell.is-playing .player-cover {
    display: none;
}

.related-section {
    padding-top: 28px;
}

.site-footer {
    margin-top: 48px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 52px 24px;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 0.7fr;
    gap: 32px;
}

.brand-footer {
    color: #ffffff;
    margin-bottom: 14px;
}

.footer-brand p {
    max-width: 520px;
    line-height: 1.85;
}

.site-footer h4 {
    color: #ffffff;
    margin-bottom: 14px;
    font-size: 18px;
    font-weight: 900;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

.is-hidden-by-filter {
    display: none !important;
}

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

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

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

    .hero-poster {
        display: none;
    }

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

    .rank-panel {
        position: static;
    }

    .ranking-row {
        grid-template-columns: 48px minmax(0, 1fr) 70px;
    }

    .ranking-row span:nth-child(3),
    .ranking-row span:nth-child(4) {
        display: none;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 66px;
        padding: 0 16px;
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text em {
        display: none;
    }

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

    .hero-content {
        padding: 58px 18px 64px;
    }

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

    .content-section,
    .page-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .movie-grid,
    .split-layout .movie-grid,
    .category-grid,
    .category-overview-grid,
    .top-rank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .movie-card-title {
        font-size: 15px;
    }

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

    .detail-layout {
        padding: 18px;
    }

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

    .player-shell {
        border-radius: 18px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        padding: 42px 16px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .split-layout .movie-grid,
    .category-grid,
    .top-rank-grid {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 140px;
    }

    .filter-bar input,
    .filter-bar select,
    .filter-bar button {
        width: 100%;
    }
}
