:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-accent: #dc2626;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #f3f4f6;
    --color-line: #e5e7eb;
    --color-card: #ffffff;
    --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 18px 40px rgba(15, 23, 42, 0.16);
    --radius-lg: 18px;
    --radius-md: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--color-text);
    background: #f9fafb;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 12px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
    width: min(100% - 32px, var(--container));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand {
    font-size: 22px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), #60a5fa);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #374151;
    font-weight: 600;
}

.nav-links a,
.mobile-menu a,
.footer-links a {
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

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

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

.mobile-menu {
    display: none;
    padding: 10px 16px 18px;
    border-top: 1px solid var(--color-line);
    background: #ffffff;
}

.mobile-menu.is-open {
    display: grid;
    gap: 10px;
}

.mobile-menu a {
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
    color: #374151;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52), rgba(15, 23, 42, 0.12));
}

.hero-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
}

.hero-content {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
    padding: 0 0 72px;
    color: #ffffff;
}

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

.pill-row,
.tag-row,
.button-row,
.card-meta,
.hero-meta,
.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pill,
.card-meta span,
.tag-row span,
.detail-meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.pill {
    padding: 6px 12px;
    color: #ffffff;
    background: var(--color-primary);
}

.pill.hot {
    background: var(--color-accent);
}

.hero-title {
    margin: 16px 0;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.hero-text {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: 18px;
    color: #e5e7eb;
}

.hero-meta {
    margin-bottom: 26px;
    color: #d1d5db;
    font-weight: 600;
}

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

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

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

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

.btn-light {
    color: #111827;
    background: #ffffff;
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 560px;
    margin-top: 26px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.hero-search input {
    width: 100%;
    border: 0;
    outline: 0;
    border-radius: 999px;
    padding: 0 18px;
    min-height: 46px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transition: background 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
    left: 22px;
}

.hero-control.next {
    right: 22px;
}

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

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

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

.main-space {
    padding: 56px 0;
}

.section-stack {
    display: grid;
    gap: 64px;
}

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

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    margin: 4px 0 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.03em;
}

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

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

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

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.duration {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.78);
    font-size: 12px;
    font-weight: 800;
}

.movie-body {
    padding: 18px;
}

.movie-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 850;
}

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

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

.card-meta span {
    padding: 4px 9px;
    color: #1d4ed8;
    background: #dbeafe;
}

.card-meta span:nth-child(2),
.card-meta span:nth-child(3) {
    color: #4b5563;
    background: #f3f4f6;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 9px;
    color: #374151;
    background: #f3f4f6;
}

.feature-panel,
.filter-panel,
.detail-card,
.related-panel,
.category-tile,
.search-box {
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.feature-panel {
    padding: 34px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

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

.category-tile {
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.category-tile:hover {
    color: #ffffff;
    background: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 8px;
    font-size: 21px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: var(--color-muted);
}

.category-tile:hover p {
    color: rgba(255, 255, 255, 0.78);
}

.rail {
    overflow-x: auto;
    padding: 0 2px 14px;
}

.rail-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 1fr);
    gap: 18px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    font-weight: 900;
}

.ranking-row h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.ranking-row p {
    margin: 0;
    color: var(--color-muted);
    font-size: 14px;
}

.page-hero {
    padding: 54px 0 28px;
    background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--color-muted);
    font-size: 17px;
}

.filter-panel,
.search-box {
    padding: 20px;
    margin: 28px 0;
}

.filter-row,
.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px auto;
    gap: 12px;
}

.filter-row input,
.filter-row select,
.search-form input,
.search-form select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-line);
    border-radius: 12px;
    padding: 0 14px;
    outline: 0;
    background: #ffffff;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.breadcrumb {
    margin: 24px 0;
    color: var(--color-muted);
    font-size: 14px;
}

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

.player-shell {
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: var(--shadow-hover);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    transition: opacity 0.2s ease;
}

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

.player-overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
}

.play-button {
    position: relative;
    z-index: 2;
    width: 84px;
    height: 84px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
    font-size: 30px;
}

.detail-card,
.related-panel {
    padding: 26px;
}

.detail-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.detail-card h2,
.related-panel h2 {
    margin: 28px 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.detail-card p {
    color: #374151;
    margin: 0 0 14px;
}

.detail-meta-line span {
    padding: 5px 10px;
    color: #1d4ed8;
    background: #dbeafe;
}

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

.meta-grid div {
    padding: 14px;
    border-radius: 14px;
    background: #f9fafb;
}

.meta-grid strong {
    display: block;
    color: #111827;
    font-size: 13px;
    margin-bottom: 3px;
}

.meta-grid span {
    color: var(--color-muted);
}

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

.small-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.small-card img {
    width: 110px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    background: #e5e7eb;
}

.small-card strong {
    display: block;
    margin-bottom: 4px;
    line-height: 1.35;
}

.small-card em {
    color: var(--color-muted);
    font-size: 13px;
    font-style: normal;
}

.site-footer {
    margin-top: 64px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 32px;
    padding: 38px 0;
}

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

.site-footer p {
    margin: 0;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: var(--color-muted);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

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

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

    .menu-toggle {
        display: inline-flex;
    }

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

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

    .related-panel {
        position: static;
    }

    .filter-row,
    .search-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .hero {
        min-height: 620px;
    }

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

    .hero-search,
    .filter-row,
    .search-form {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .hero-control {
        display: none;
    }

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

    .section-head,
    .ranking-row,
    .footer-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .ranking-row {
        align-items: start;
    }

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

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