:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --green: #16a34a;
    --red: #ef4444;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: white;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.brand-name,
.footer-brand {
    font-size: 21px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--ink);
    background: #f3f4f6;
}

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

.hero-shell {
    padding-top: 32px;
}

.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 28px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.1) 100%);
}

.hero-copy {
    width: min(650px, 100%);
    padding: 54px 70px;
    color: white;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 13px;
    color: white;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 14px;
    font-weight: 700;
}

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

.hero-copy p {
    max-width: 620px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 14px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 13px;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
}

.primary-btn.compact {
    min-height: 42px;
    padding-inline: 18px;
    white-space: nowrap;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: white;
    background: rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
    transform: translateY(-50%);
    transition: background 0.2s ease;
    font-size: 34px;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.42);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 32px;
    background: white;
}

.search-panel-wrap,
.section-block,
.title-block,
.detail-shell,
.player-section,
.detail-content,
.category-list,
.ranking-layout {
    margin-top: 42px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1.4fr 1.8fr auto;
    gap: 18px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.search-panel strong {
    display: block;
    font-size: 20px;
}

.search-panel span {
    color: var(--muted);
}

input[type="search"],
select {
    width: 100%;
    min-height: 46px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: white;
    outline: 0;
}

input[type="search"]:focus,
select:focus {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

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

.section-head h2,
.title-block h1,
.ranking-side h2,
.detail-content h2,
.category-info h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-head p,
.title-block p,
.category-info p,
.card-desc,
.footer-inner p {
    margin: 7px 0 0;
    color: var(--muted);
}

.section-more {
    min-height: 38px;
    color: var(--blue);
    background: #eff6ff;
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    height: 255px;
    overflow: hidden;
    background: #e5e7eb;
}

.card-large .poster-wrap {
    height: 360px;
}

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

.movie-card:hover .poster-wrap img {
    transform: scale(1.08);
}

.card-badge,
.rank-number {
    position: absolute;
    top: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 10px;
    color: white;
    font-size: 12px;
    font-weight: 750;
    background: rgba(17, 24, 39, 0.78);
    backdrop-filter: blur(8px);
}

.card-badge {
    right: 12px;
}

.rank-number {
    left: 12px;
    min-width: 32px;
    text-align: center;
    background: linear-gradient(135deg, var(--red), #f97316);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    color: var(--blue);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
    color: white;
    background: linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, 0.78) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
    opacity: 1;
}

.poster-shade p {
    margin: 0;
    font-size: 14px;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    overflow: hidden;
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

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

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    color: #6b7280;
    font-size: 13px;
}

.category-zone {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.category-home-block + .category-home-block {
    margin-top: 34px;
}

.mini-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.mini-head h3 {
    margin: 0;
    font-size: 22px;
}

.mini-head a {
    color: var(--blue);
    font-weight: 700;
}

.title-block {
    padding: 52px 0 10px;
}

.title-block .eyebrow {
    color: white;
}

.title-block h1 {
    max-width: 850px;
    font-size: clamp(36px, 6vw, 62px);
}

.title-block p {
    max-width: 780px;
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
    margin-top: 24px;
}

.multi-filter {
    grid-template-columns: 1.6fr repeat(3, 1fr);
}

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

.category-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    height: 180px;
    overflow: hidden;
    background: #e5e7eb;
}

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

.category-info {
    padding: 22px;
}

.category-info h2 {
    font-size: 26px;
}

.category-info span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--blue);
    font-weight: 800;
}

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

.ranking-side {
    position: sticky;
    top: 92px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: white;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.ranking-side h2 {
    margin-bottom: 18px;
    font-size: 24px;
}

.compact-card {
    display: grid;
    grid-template-columns: auto 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #f3f4f6;
}

.compact-card img {
    width: 58px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.compact-card strong {
    display: block;
    overflow: hidden;
    color: #111827;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-card em {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-rank {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: white;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 12px;
    font-weight: 800;
}

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

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

.detail-main {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: white;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

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

.detail-line {
    margin: 0 0 20px;
    color: #374151;
    font-size: 19px;
}

.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span,
.tag-row span {
    color: #374151;
    background: #f3f4f6;
}

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

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.video-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: white;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.25), rgba(2, 6, 23, 0.62));
}

.video-mask span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.35);
    font-size: 36px;
}

.video-mask.hidden,
.hidden {
    display: none !important;
}

.detail-content article {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: white;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

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

.detail-content p {
    margin: 0 0 22px;
    color: #374151;
    font-size: 17px;
}

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

.empty-state {
    display: none;
    margin-top: 20px;
    padding: 22px;
    border-radius: 18px;
    color: var(--muted);
    background: #f3f4f6;
    text-align: center;
}

.empty-state.show {
    display: block;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, #f9fafb, #f3f4f6);
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 22px;
    color: #374151;
    font-weight: 700;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 30px;
    color: var(--muted);
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
}

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

    .ranking-layout {
        grid-template-columns: 1fr;
    }

    .ranking-side {
        position: static;
    }
}

@media (max-width: 820px) {
    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 76px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: white;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        padding: 10px 12px;
        border-radius: 12px;
        background: #f9fafb;
    }

    .hero-carousel {
        height: 430px;
        border-radius: 22px;
    }

    .hero-copy {
        padding: 40px 28px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
    }

    .search-panel,
    .filter-bar,
    .multi-filter,
    .detail-main,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .category-list,
    .feature-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

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

    .poster-wrap {
        height: 230px;
    }

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

@media (max-width: 520px) {
    .page-shell,
    .nav-shell,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-carousel {
        height: 390px;
    }

    .hero-copy p,
    .hero-meta span:nth-child(3) {
        display: none;
    }

    .hero-copy {
        padding: 34px 22px;
    }

    .hero-arrow {
        top: auto;
        bottom: 18px;
        transform: none;
    }

    .hero-prev {
        left: 18px;
    }

    .hero-next {
        right: 18px;
    }

    .hero-dots {
        bottom: 32px;
    }

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

    .poster-wrap,
    .card-large .poster-wrap {
        height: 310px;
    }

    .category-zone,
    .detail-main,
    .detail-content article {
        padding: 20px;
        border-radius: 22px;
    }

    .category-thumbs {
        height: 130px;
    }
}
