:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;
    --accent: #f97316;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f8fafc;
    --card: #ffffff;
    --dark: #0f172a;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

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: 80;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #7c3aed 55%, var(--accent));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-links a {
    white-space: nowrap;
    font-weight: 700;
    color: #475569;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.filter-toolbar input,
.filter-toolbar select,
.search-panel input {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 11px 16px;
    outline: none;
    color: var(--text);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 190px;
}

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

.header-search button,
.primary-btn,
.secondary-btn,
.search-panel button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn,
.search-panel button {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.secondary-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.search-panel button:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    color: var(--text);
}

.hero-carousel {
    position: relative;
    min-height: 590px;
    overflow: hidden;
    background: var(--dark);
}

.hero-slides {
    position: relative;
    min-height: 590px;
}

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

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

.hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 30%, rgba(249, 115, 22, 0.34), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.9), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    min-height: 590px;
    margin: 0 auto;
    padding: 86px 20px 58px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) 360px;
    gap: 42px;
    align-items: center;
    color: #fff;
}

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

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(191, 219, 254, 0.28);
    font-weight: 800;
    margin-bottom: 18px;
}

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

.hero-copy h2 {
    font-size: clamp(38px, 5vw, 68px);
}

.hero-title-small {
    display: block;
    margin-top: 8px;
    color: #bfdbfe;
    font-size: clamp(22px, 3vw, 34px);
    letter-spacing: 0;
}

.hero-copy p {
    margin: 0 0 24px;
    max-width: 680px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.hero-side-card {
    padding: 22px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px);
}

.hero-side-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 22px;
    margin-bottom: 16px;
}

.hero-side-card strong {
    display: block;
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero-side-card span {
    color: #cbd5e1;
}

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

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

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

.section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 58px 20px;
}

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

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.section-head p,
.page-hero p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.more-link {
    color: var(--primary);
    font-weight: 900;
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.92);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.movie-card:hover .poster-box img {
    transform: scale(1.05);
}

.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.poster-type {
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

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

.movie-meta {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    margin-bottom: 6px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
    font-weight: 900;
}

.movie-card h3 a:hover {
    color: var(--primary);
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    align-items: end;
    border-radius: 28px;
    background: var(--dark);
    box-shadow: var(--shadow);
}

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

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.1));
}

.category-card-content {
    position: relative;
    z-index: 2;
    padding: 22px;
    color: #fff;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
}

.feature-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    align-items: start;
}

.ranking-panel {
    border-radius: 28px;
    padding: 24px;
    background: linear-gradient(135deg, #111827, #172554);
    color: #fff;
    box-shadow: var(--shadow);
}

.ranking-panel h2,
.ranking-panel h3 {
    margin: 0 0 16px;
    font-size: 26px;
    font-weight: 950;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 36px 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
}

.rank-item b {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.rank-item img {
    width: 64px;
    height: 82px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-item strong {
    display: block;
    overflow: hidden;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-item span {
    color: #cbd5e1;
    font-size: 13px;
}

.page-hero {
    max-width: 1240px;
    margin: 30px auto 0;
    padding: 52px 20px;
}

.page-hero-card {
    position: relative;
    overflow: hidden;
    padding: 46px;
    border-radius: 32px;
    background:
        radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.28), transparent 26%),
        linear-gradient(135deg, #0f172a, #1e3a8a 60%, #312e81);
    color: #fff;
    box-shadow: var(--shadow);
}

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

.page-hero p {
    max-width: 720px;
    color: #dbeafe;
    font-size: 17px;
}

.breadcrumb {
    max-width: 1240px;
    margin: 22px auto 0;
    padding: 0 20px;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
}

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

.filter-toolbar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    margin-bottom: 26px;
}

.filter-toolbar input {
    flex: 1;
    min-width: 220px;
}

.filter-toolbar select {
    min-width: 150px;
}

.search-panel input {
    flex: 1;
    min-width: 240px;
}

.detail-title {
    max-width: 1240px;
    margin: 0 auto;
    padding: 34px 20px 18px;
}

.detail-layout {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 44px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 26px;
    align-items: start;
}

.player-panel,
.detail-card,
.side-info {
    border-radius: 28px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.player-panel {
    overflow: hidden;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.play-mask {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #020617;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-mask img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    filter: saturate(1.05) contrast(1.06);
}

.play-mask::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle, rgba(37, 99, 235, 0.35), transparent 34%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.2));
}

.play-button {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 13px;
    border: 0;
    cursor: pointer;
    color: #fff;
    padding: 18px 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.36);
    font-weight: 950;
}

.play-button span {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--primary);
    background: #fff;
}

.player-caption {
    padding: 20px;
}

.player-caption h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 950;
}

.player-caption p {
    margin: 0;
    color: var(--muted);
}

.side-info {
    overflow: hidden;
}

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

.side-body {
    padding: 20px;
}

.side-body dl {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 10px;
    margin: 0 0 18px;
}

.side-body dt {
    color: var(--muted);
}

.side-body dd {
    margin: 0;
    font-weight: 800;
}

.detail-card {
    padding: 28px;
    margin-bottom: 24px;
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
}

.detail-card p {
    margin: 0;
    color: #334155;
}

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

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 46px 20px;
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 1fr;
    gap: 34px;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
    margin-bottom: 12px;
}

.site-footer p {
    margin: 10px 0 0;
    max-width: 460px;
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

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

.footer-cats a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 20px;
    text-align: center;
    color: #94a3b8;
}

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

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

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

    .hero-side-card {
        display: none;
    }

    .header-search input {
        width: 150px;
    }
}

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

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

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        order: 4;
        padding-top: 10px;
    }

    .site-header.nav-open .nav-links {
        display: flex;
    }

    .nav-links a {
        padding: 12px 14px;
        border-radius: 14px;
        background: #f8fafc;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .header-search input {
        flex: 1;
        width: auto;
    }

    .hero-carousel,
    .hero-slides,
    .hero-content {
        min-height: 620px;
    }

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

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

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

    .page-hero-card {
        padding: 30px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    .brand-text {
        font-size: 18px;
    }

    .hero-content {
        padding-top: 58px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 40px;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        text-align: center;
    }

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

    .rank-item {
        grid-template-columns: 32px 58px minmax(0, 1fr);
    }

    .detail-card,
    .player-caption {
        padding: 20px;
    }
}
