:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;
    --secondary: #7c3aed;
    --accent: #ef4444;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --surface: #ffffff;
    --soft: #f8fafc;
    --dark: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--soft);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

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

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.24);
}

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

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

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

.nav-search {
    display: flex;
    align-items: center;
    width: min(330px, 34vw);
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f9fafb;
    overflow: hidden;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 6px 10px 16px;
    color: #111827;
}

.nav-search button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: var(--primary);
    padding: 10px 16px;
    font-weight: 700;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 0 0 18px;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 12px 2px;
    color: #374151;
    font-weight: 700;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-menu .nav-search {
    width: 100%;
    margin-top: 14px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 52%, #312e81 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.24;
}

.hero-inner {
    position: relative;
    min-height: 620px;
    padding: 82px 0 72px;
}

.hero-slider {
    position: relative;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    align-items: center;
    gap: 48px;
}

.hero-slide.is-active {
    display: grid;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 800;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero h1 span {
    display: block;
    margin-top: 8px;
    color: #bfdbfe;
}

.hero p {
    max-width: 640px;
    margin: 0;
    color: #dbeafe;
    font-size: clamp(17px, 2.1vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 800;
}

.pill.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

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

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

.btn-primary {
    color: var(--primary);
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(255, 255, 255, 0.18);
}

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

.btn-dark {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-poster {
    position: relative;
    isolation: isolate;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 42px -22px -22px 34px;
    z-index: -1;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(124, 58, 237, 0.38));
    filter: blur(6px);
}

.hero-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(16px);
}

.hero-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hero-card-info {
    padding: 22px;
}

.hero-card-info h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 900;
}

.hero-card-info p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 15px;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 36px;
}

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

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

.hero-arrow {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.quick-search {
    position: relative;
    margin-top: -34px;
    z-index: 4;
}

.quick-search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.quick-search-box input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 14px;
    outline: none;
    padding: 14px 16px;
    color: #111827;
}

.section {
    padding: 70px 0;
}

.section.white {
    background: #ffffff;
}

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

.section-title {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
    font-weight: 900;
}

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

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

.feature-item {
    text-align: center;
}

.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 28px;
}

.feature-item h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.badge.blue {
    color: #1e40af;
    background: #dbeafe;
}

.badge.green {
    color: #047857;
    background: #d1fae5;
}

.badge.red {
    color: #b91c1c;
    background: #fee2e2;
}

.badge.dark {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
}

.cover-year {
    position: absolute;
    top: 10px;
    right: 10px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    overflow: hidden;
    min-height: 27px;
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

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

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

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

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 24px;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -44px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    font-weight: 900;
}

.category-red {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.category-pink {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.category-blue {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-orange {
    background: linear-gradient(135deg, #f97316, #f59e0b);
}

.category-green {
    background: linear-gradient(135deg, #16a34a, #059669);
}

.category-indigo {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.category-teal {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
}

.category-amber {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.category-emerald {
    background: linear-gradient(135deg, #059669, #10b981);
}

.category-cyan {
    background: linear-gradient(135deg, #0891b2, #2563eb);
}

.category-purple {
    background: linear-gradient(135deg, #9333ea, #c026d3);
}

.category-slate {
    background: linear-gradient(135deg, #334155, #111827);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 56px 138px 1fr;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.rank-no {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    font-size: 18px;
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 12px;
}

.rank-thumb img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.rank-content h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 900;
}

.rank-content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8 55%, #312e81);
}

.page-hero-inner {
    padding: 68px 0;
}

.page-hero h1 {
    max-width: 850px;
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
}

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

.filter-panel {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 14px;
    padding: 18px;
    margin-bottom: 28px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

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

.empty-state {
    display: none;
    padding: 36px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 0.95fr);
    gap: 30px;
}

.player-card,
.info-card,
.side-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
    background: #000000;
}

.video-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.video-shell.is-playing .play-layer {
    pointer-events: none;
    opacity: 0;
}

.play-inner {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.24);
    font-weight: 900;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: var(--primary);
    background: #ffffff;
}

.player-caption {
    padding: 18px 20px;
}

.player-caption h1 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
    font-weight: 900;
}

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

.info-card {
    padding: 24px;
    margin-top: 22px;
}

.info-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 900;
}

.info-card p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    white-space: pre-line;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0 0;
}

.side-card {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.fact-list {
    display: grid;
    gap: 10px;
    margin-bottom: 26px;
}

.fact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f9fafb;
}

.fact span:first-child {
    color: var(--muted);
    font-size: 14px;
}

.fact span:last-child {
    color: #111827;
    font-weight: 900;
    text-align: right;
}

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

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

.related-item img {
    width: 96px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 12px;
}

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

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

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: #6b7280;
    font-size: 14px;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 34px;
    padding: 54px 0 38px;
}

.footer-grid h3 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
}

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

.footer-grid a {
    display: block;
    margin: 9px 0;
}

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

.copyright {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    text-align: center;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .nav-links,
    .site-header > .container > .navbar > .nav-search {
        display: none;
    }

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

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

    .hero-inner {
        min-height: auto;
    }

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .navbar {
        min-height: 66px;
    }

    .logo {
        font-size: 19px;
    }

    .hero-inner {
        padding: 56px 0 68px;
    }

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

    .quick-search-box,
    .filter-panel {
        grid-template-columns: 1fr;
    }

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

    .section {
        padding: 48px 0;
    }

    .rank-item {
        grid-template-columns: 46px 106px 1fr;
        gap: 12px;
    }

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

@media (max-width: 520px) {
    .feature-strip,
    .movie-grid,
    .movie-grid.compact,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .card-body {
        padding: 14px;
    }
}
