:root {
    --page-bg: #f8fbff;
    --card-bg: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #0891b2;
    --dark: #0f172a;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #f1f5f9 100%);
    min-height: 100vh;
}

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

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

button,
input {
    font: inherit;
}

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

.page-shell {
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

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

.brand strong,
.footer-brand {
    display: block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.brand em {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav a,
.mobile-nav a {
    color: #334155;
    padding: 10px 16px;
    border-radius: 12px;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: #334155;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 12px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.mobile-nav.is-open {
    display: grid;
    gap: 4px;
}

.hero {
    position: relative;
    height: 520px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 70% 15%, rgba(37, 99, 235, 0.34), transparent 32%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.28) 48%, rgba(2, 6, 23, 0.42));
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    padding-bottom: 82px;
}

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

.eyebrow,
.section-heading span,
.page-title span {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 6px;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.hero .eyebrow {
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.28);
    border-color: rgba(191, 219, 254, 0.38);
    backdrop-filter: blur(14px);
}

.hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 7vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 8px 28px rgba(0, 0, 0, 0.42);
}

.hero p {
    max-width: 620px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 19px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span {
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 14px;
}

.hero-actions,
.detail-copy .btn {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.48);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background .2s ease, transform .2s ease;
}

.hero-control:hover {
    background: rgba(2, 6, 23, 0.72);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

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

.quick-search-panel {
    margin-top: -38px;
    position: relative;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search label,
.filter-panel label {
    display: block;
    color: #334155;
    font-weight: 800;
    margin-bottom: 10px;
}

.quick-search div,
.search-page-panel {
    display: flex;
    gap: 12px;
}

.quick-search input,
.search-page-panel input,
.filter-panel input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 0 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border .2s ease, box-shadow .2s ease;
}

.quick-search input:focus,
.search-page-panel input:focus,
.filter-panel input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.quick-search button,
.search-page-panel button,
.filter-actions button {
    height: 48px;
    border: 0;
    border-radius: 16px;
    padding: 0 20px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    cursor: pointer;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.quick-links a,
.text-link {
    color: var(--blue);
    background: #eff6ff;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
}

.section-block,
.page-main {
    padding-top: 64px;
}

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

.section-heading h2,
.page-title h1,
.rank-panel h2,
.detail-content h2 {
    margin: 10px 0 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading a {
    color: var(--blue);
    font-weight: 800;
}

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

.compact-grid,
.archive-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #dbeafe;
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

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

.movie-score {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.84);
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
}

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

.movie-info {
    padding: 18px;
}

.movie-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover {
    color: var(--blue);
}

.movie-info p {
    min-height: 45px;
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

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

.movie-meta span {
    color: #64748b;
    font-size: 13px;
}

.movie-tags span,
.detail-tags span,
.preview-tags span {
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-radius: 26px;
    padding: 22px;
    color: #ffffff;
    box-shadow: var(--shadow);
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

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

.category-card:hover img {
    transform: scale(1.07);
}

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

.category-card span {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 8px;
}

.category-card strong {
    color: #dbeafe;
    font-size: 14px;
    line-height: 1.6;
}

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

.rank-panel,
.detail-side {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 26px;
    padding: 22px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.rank-panel h2,
.detail-side h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.mini-item {
    display: grid;
    grid-template-columns: 32px 66px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    transition: background .2s ease, transform .2s ease;
}

.mini-item:hover {
    background: #eff6ff;
    transform: translateX(2px);
}

.mini-item img {
    width: 66px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.mini-rank {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 13px;
    font-weight: 900;
}

.mini-item strong,
.mini-item em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-item strong {
    color: #0f172a;
    font-size: 14px;
}

.mini-item em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    margin-top: 4px;
}

.page-main {
    padding-bottom: 72px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 24px;
    font-size: 14px;
}

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

.page-title {
    max-width: 860px;
    margin-bottom: 34px;
}

.page-title p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.8;
    margin: 16px 0 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 20px;
    margin-bottom: 28px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.filter-actions button {
    background: #eff6ff;
    color: #2563eb;
}

.filter-actions button.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--soft-shadow);
}

.category-cover {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 16 / 12;
}

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

.category-overview-card h2 {
    margin: 4px 0 10px;
    font-size: 24px;
}

.category-overview-card p {
    color: var(--muted);
    line-height: 1.7;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 28px;
    border-radius: 34px;
    background:
        radial-gradient(circle at 88% 18%, rgba(37, 99, 235, 0.18), transparent 30%),
        #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.20);
}

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

.detail-copy h1 {
    margin: 16px 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.06em;
}

.detail-copy p {
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

.detail-copy .detail-meta span {
    color: #334155;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.detail-tags {
    margin-bottom: 24px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity .22s ease, visibility .22s ease;
}

.player-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.36);
    font-size: 34px;
}

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

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

.detail-content article {
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--soft-shadow);
}

.detail-content h2 {
    font-size: 26px;
    margin: 0 0 12px;
}

.detail-content p {
    color: #334155;
    line-height: 1.95;
    font-size: 17px;
    margin: 0 0 22px;
}

.search-page-panel {
    padding: 18px;
    margin-bottom: 26px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

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

.search-result-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--soft-shadow);
}

.search-result-card img {
    width: 110px;
    height: 82px;
    border-radius: 16px;
    object-fit: cover;
}

.search-result-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.search-result-card p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.search-result-card span {
    color: var(--blue);
    font-weight: 800;
    font-size: 13px;
}

.site-footer {
    margin-top: 72px;
    color: #e2e8f0;
    background: linear-gradient(135deg, #1e293b, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
    padding: 48px 0;
}

.site-footer p {
    max-width: 520px;
    color: #cbd5e1;
    line-height: 1.8;
}

.site-footer h2 {
    color: #93c5fd;
    font-size: 18px;
    margin: 0 0 16px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    padding: 22px 0;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.sticky-panel {
    position: sticky;
    top: 100px;
}

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

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

    .rank-panel,
    .detail-side {
        position: static;
    }

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

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

    .nav-toggle {
        display: flex;
    }

    .header-inner {
        height: 68px;
    }

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

    .hero {
        height: 560px;
    }

    .hero-content {
        padding-bottom: 74px;
    }

    .hero-control {
        display: none;
    }

    .quick-search-panel,
    .filter-panel,
    .footer-grid,
    .detail-hero,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .hero h1 {
        font-size: 34px;
    }

    .hero p,
    .page-title p,
    .detail-copy p {
        font-size: 16px;
    }

    .quick-search div,
    .search-page-panel {
        flex-direction: column;
    }

    .movie-grid,
    .compact-grid,
    .archive-grid,
    .category-grid,
    .category-overview-grid,
    .search-results {
        grid-template-columns: 1fr;
    }

    .movie-cover {
        aspect-ratio: 16 / 10;
    }

    .detail-hero,
    .detail-content article,
    .rank-panel,
    .detail-side {
        border-radius: 22px;
        padding: 18px;
    }

    .player-box {
        border-radius: 20px;
    }
}
