:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --indigo: #4f46e5;
    --green: #16a34a;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    backdrop-filter: blur(16px);
}

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

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

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

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

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

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: #475569;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

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

.site-search {
    position: relative;
    margin-left: auto;
    width: min(320px, 35vw);
}

.search-input,
.filter-input,
.filter-select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    color: #0f172a;
    background: #ffffff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, 92vw);
    max-height: 440px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
    display: none;
}

.search-panel.is-open {
    display: block;
}

.search-item {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.search-item:hover {
    background: #f1f5f9;
}

.search-item img {
    width: 54px;
    height: 74px;
    border-radius: 10px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

.search-item strong {
    display: block;
    font-size: 15px;
    line-height: 1.4;
}

.search-item small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.5;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #0f172a;
    background: #eff6ff;
}

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
}

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

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

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

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

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

.hero-bg {
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
}

.hero-shade {
    background:
        radial-gradient(circle at 78% 20%, rgba(37, 99, 235, 0.42), transparent 35%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.62) 48%, rgba(15, 23, 42, 0.12));
}

.hero-content {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    margin: 0 0 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 700;
}

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

.hero-copy p {
    margin: 0 0 24px;
    color: #e2e8f0;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.meta-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.meta-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 700;
}

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

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

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

.btn-primary {
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
    background: var(--blue-dark);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-dots {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 30px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

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

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

.main-section,
.page-section {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 62px 0;
}

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

.section-head h2,
.page-heading h1,
.detail-title h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head p,
.page-heading p,
.detail-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

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

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

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 15px;
}

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

.card-body h3 a:hover {
    color: var(--blue);
}

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

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-meta span {
    max-width: 100%;
    padding: 5px 9px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: var(--radius);
    background: #0f172a;
    box-shadow: var(--shadow);
}

.category-tile img,
.category-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.category-tile img {
    object-fit: cover;
    opacity: 0.78;
    transition: transform 0.35s ease;
}

.category-tile:hover img {
    transform: scale(1.08);
}

.category-layer {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.90));
}

.category-content {
    position: absolute;
    inset: auto 18px 18px;
    color: #ffffff;
}

.category-content strong {
    display: block;
    font-size: 22px;
    line-height: 1.25;
}

.category-content small {
    display: block;
    margin-top: 8px;
    color: #e2e8f0;
    line-height: 1.6;
}

.rank-panel {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

.rank-feature {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    border-radius: 26px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.rank-feature img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.78;
}

.rank-feature-content {
    position: absolute;
    inset: auto 30px 30px;
    color: #ffffff;
}

.rank-feature-content h3 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.08;
}

.rank-feature-content p {
    margin: 0 0 22px;
    color: #e2e8f0;
    line-height: 1.75;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 48px 64px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
    transform: translateX(4px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.rank-index {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    font-weight: 900;
}

.rank-row img {
    width: 64px;
    height: 84px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

.rank-text strong,
.rank-text small {
    display: block;
}

.rank-text strong {
    line-height: 1.35;
}

.rank-text small {
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.5;
}

.page-hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, 0.18), transparent 32%),
        linear-gradient(135deg, #ffffff, #eef2ff);
    border-bottom: 1px solid var(--line);
}

.page-heading {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

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

.filters {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 12px;
    margin: 24px 0 0;
}

.empty-tip {
    display: none;
    margin-top: 28px;
    padding: 18px;
    border: 1px dashed #bfdbfe;
    border-radius: 16px;
    color: var(--blue);
    background: #eff6ff;
    font-weight: 800;
}

.empty-tip.is-open {
    display: block;
}

.detail-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 72px;
}

.detail-title {
    margin-bottom: 26px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.36);
    cursor: pointer;
}

.player-cover.is-hidden {
    display: none;
}

.player-button {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.45);
    font-size: 34px;
    transform: translateX(3px);
}

.detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    margin-top: 34px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
    box-shadow: var(--shadow);
}

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

.detail-info {
    display: grid;
    gap: 20px;
}

.info-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.info-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
    line-height: 1.3;
}

.info-card p {
    margin: 0;
    color: #334155;
    line-height: 1.9;
}

.meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.meta-list div {
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.meta-list small {
    display: block;
    color: var(--muted);
    font-weight: 700;
}

.meta-list strong {
    display: block;
    margin-top: 5px;
    line-height: 1.5;
}

.tag-list span {
    color: var(--blue);
    background: #eff6ff;
    backdrop-filter: none;
}

.site-footer {
    background: #0f172a;
    color: #cbd5e1;
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 30px;
}

.brand-in-footer {
    color: #ffffff;
}

.footer-brand p {
    max-width: 620px;
    margin: 16px 0 0;
    color: #94a3b8;
    line-height: 1.75;
}

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

.footer-links a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px;
    text-align: center;
    color: #94a3b8;
}

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

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

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

    .site-search {
        width: min(100%, 420px);
    }

    .menu-toggle {
        display: grid;
        place-items: center;
    }

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

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

@media (max-width: 760px) {
    .nav-container {
        min-height: 66px;
        gap: 10px;
    }

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

    .site-search {
        display: none;
    }

    .hero-slider {
        height: 72vh;
        min-height: 540px;
    }

    .hero-copy h1 {
        font-size: 42px;
    }

    .section-head {
        display: block;
    }

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

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

    .filters {
        grid-template-columns: 1fr;
    }

    .card-body {
        padding: 12px;
    }

    .meta-list {
        grid-template-columns: 1fr;
    }
}
