:root {
    --bg: #f9fafb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --dark: #0f172a;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #0891b2;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 18px 45px rgba(15, 23, 42, 0.16);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    backdrop-filter: blur(18px);
    box-shadow: 0 4px 22px rgba(15, 23, 42, 0.05);
}

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

.nav-shell {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

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

.brand-mark {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.brand-mark svg path:first-child {
    fill: rgba(255, 255, 255, 0.98);
}

.brand-mark svg path:last-child {
    fill: #2563eb;
}

.brand-light {
    color: #ffffff;
}

.nav-links {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.nav-links > a {
    position: relative;
    color: #374151;
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease;
}

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

.nav-links > a.active::after {
    position: absolute;
    right: 0;
    bottom: -22px;
    left: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--cyan);
    content: "";
}

.nav-category-strip {
    display: flex;
    gap: 8px;
}

.nav-category-strip a {
    padding: 7px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 650;
}

.nav-search {
    display: flex;
    overflow: hidden;
    min-width: 235px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.nav-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    padding: 9px 14px;
    outline: 0;
    color: #111827;
}

.nav-search button {
    border: 0;
    padding: 0 15px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: #111827;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    height: 600px;
    background: #111827;
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.28), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.15));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1180px;
    color: #ffffff;
}

.hero-content > * {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 6px 13px;
    background: var(--blue);
    color: #ffffff;
    font-size: 14px;
    font-weight: 750;
}

.hero-content h1 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 22px;
    color: #e5e7eb;
    font-size: 18px;
}

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

.hero-meta span,
.detail-meta span {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(255, 255, 255, 0.14);
    color: #f9fafb;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

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

.primary-btn,
.ghost-btn,
.text-btn,
.section-more,
.category-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.primary-btn:hover {
    transform: translateY(-2px);
    background: var(--blue-dark);
}

.ghost-btn {
    padding: 12px 22px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.hero-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.42);
    color: #ffffff;
    font-size: 30px;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-nav:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 32px;
    left: 0;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 8px;
}

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

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

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

.section {
    padding: 54px 0;
}

.section.alt {
    background: #ffffff;
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.section-more:hover,
.text-btn:hover,
.category-link:hover {
    color: var(--cyan);
}

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

.card-scroll {
    display: grid;
    grid-auto-columns: minmax(250px, 1fr);
    grid-auto-flow: column;
    gap: 24px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
}

.card-scroll .movie-card {
    min-width: 270px;
    scroll-snap-align: start;
}

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    height: 260px;
    background: #d1d5db;
}

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

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

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    border-radius: 8px;
    padding: 5px 9px;
    background: var(--blue);
    color: #ffffff;
    font-size: 12px;
    font-weight: 750;
}

.card-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue);
    font-size: 22px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-body {
    padding: 18px;
}

.movie-body h3 {
    display: -webkit-box;
    min-height: 52px;
    margin: 0;
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.movie-body p {
    display: -webkit-box;
    min-height: 46px;
    margin: 10px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    margin-top: 14px;
    color: #6b7280;
    font-size: 12px;
}

.movie-meta span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 190px 1fr;
}

.movie-card.horizontal .poster-link {
    height: 130px;
}

.movie-card.horizontal .movie-body h3 {
    min-height: 0;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    border-radius: 22px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: var(--shadow);
}

.category-card::before {
    position: absolute;
    top: -60px;
    right: -50px;
    width: 155px;
    height: 155px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.14);
    content: "";
}

.category-card h2,
.category-card h3 {
    position: relative;
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card p {
    position: relative;
    margin: 0 0 16px;
    color: #4b5563;
}

.category-card ul {
    position: relative;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.category-card li {
    margin-top: 7px;
    color: #374151;
    font-size: 14px;
}

.category-card li a:hover {
    color: var(--blue);
}

.page-hero {
    padding: 58px 0;
    background: linear-gradient(135deg, #2563eb, #0f172a);
    color: #ffffff;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 210px 170px;
    gap: 14px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    color: #111827;
    outline: 0;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 160px 1fr auto;
    gap: 20px;
    align-items: center;
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.rank-num {
    font-size: 30px;
    font-weight: 900;
    color: var(--blue);
    text-align: center;
}

.rank-poster {
    overflow: hidden;
    height: 95px;
    border-radius: 14px;
    background: #d1d5db;
}

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

.rank-content h2,
.rank-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-content p {
    margin: 0;
    color: var(--muted);
}

.player-wrap {
    background: #000000;
}

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

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.1));
    opacity: 1;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.player.is-playing .player-cover {
    opacity: 0;
}

.player-play {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.93);
    color: var(--blue);
    font-size: 38px;
    pointer-events: auto;
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-play:hover {
    transform: scale(1.08);
    background: #ffffff;
}

.player-toolbar {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    pointer-events: none;
}

.player-toolbar button {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-weight: 700;
    backdrop-filter: blur(12px);
    pointer-events: auto;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 28px;
    padding: 36px 0 60px;
}

.content-card,
.related-panel {
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.content-card {
    padding: 28px;
}

.content-card + .content-card {
    margin-top: 22px;
}

.content-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.content-card h2,
.related-panel h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 20px;
}

.content-card p {
    margin: 0;
    color: #374151;
    font-size: 16px;
}

.content-card .block + .block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-meta {
    margin-bottom: 20px;
}

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

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.tag-list span {
    border-radius: 999px;
    padding: 6px 11px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
}

.related-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.related-list {
    display: grid;
    gap: 16px;
}

.related-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    align-items: center;
}

.related-thumb {
    overflow: hidden;
    height: 78px;
    border-radius: 12px;
    background: #d1d5db;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-item:hover .related-thumb img {
    transform: scale(1.08);
}

.related-item h3 {
    display: -webkit-box;
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item:hover h3 {
    color: var(--blue);
}

.related-item p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
    color: #6b7280;
    font-size: 14px;
}

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

.site-footer {
    background: #111827;
    color: #d1d5db;
}

.footer-shell {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 44px;
    padding: 48px 0;
}

.footer-brand p {
    max-width: 560px;
    margin: 16px 0 0;
    color: #9ca3af;
    font-size: 14px;
}

.footer-column h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 16px;
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-column li + li {
    margin-top: 10px;
}

.footer-column a {
    color: #9ca3af;
    font-size: 14px;
}

.footer-column a:hover {
    color: #22d3ee;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    border-top: 1px solid #1f2937;
    padding: 20px 0;
    color: #9ca3af;
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
}

.empty-state {
    display: none;
    border-radius: 18px;
    padding: 36px;
    background: #ffffff;
    color: #6b7280;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-state.is-visible {
    display: block;
}

@media (max-width: 1024px) {
    .nav-category-strip {
        display: none;
    }

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

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

    .related-panel {
        position: static;
    }
}

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

    .nav-shell {
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

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

    .nav-links > a {
        border-radius: 12px;
        padding: 11px 12px;
        background: #f9fafb;
    }

    .nav-links > a.active::after {
        display: none;
    }

    .nav-search {
        width: 100%;
    }

    .hero-slider {
        height: 560px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 86px;
    }

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

    .hero-nav {
        display: none;
    }

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

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 48px 110px 1fr;
    }

    .rank-item .primary-btn {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .footer-shell {
        grid-template-columns: 1fr;
        gap: 26px;
    }
}

@media (max-width: 560px) {
    .card-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .poster-link {
        height: 235px;
    }

    .movie-card.horizontal {
        grid-template-columns: 130px 1fr;
    }

    .movie-card.horizontal .poster-link {
        height: 128px;
    }

    .movie-body {
        padding: 14px;
    }

    .rank-item {
        grid-template-columns: 42px 92px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-poster {
        height: 76px;
    }

    .content-card {
        padding: 20px;
    }

    .related-item {
        grid-template-columns: 104px 1fr;
    }

    .player-toolbar {
        right: 10px;
        bottom: 10px;
        left: 10px;
    }
}
