:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.88);
}

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

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

.brand {
    font-size: 21px;
    color: #0f172a;
    white-space: nowrap;
}

.brand-mark,
.footer-logo span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.24);
    font-size: 14px;
}

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

.nav-links a {
    padding: 8px 11px;
    border-radius: 999px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: #eef2ff;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #eef2ff;
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--primary);
    border-radius: 999px;
}

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

.hero-carousel {
    margin-bottom: 48px;
}

.hero-stage {
    position: relative;
    min-height: 68vh;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #312e81);
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
    transform: scale(1.025);
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 76px);
    right: clamp(24px, 6vw, 76px);
    bottom: clamp(32px, 8vw, 86px);
    max-width: 760px;
    color: #ffffff;
}

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

.hero-labels span,
.hero-stats span,
.pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.9);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.hero-content h1 {
    margin: 16px 0 14px;
    font-size: clamp(34px, 7vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0;
    max-width: 680px;
    color: #e5e7eb;
    font-size: clamp(16px, 2.3vw, 22px);
}

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

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

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

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(79, 70, 229, 0.25);
}

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

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.44);
    cursor: pointer;
    font-size: 30px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.70);
    transform: translateY(-50%) scale(1.06);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 28px;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.50);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.content-section {
    margin-bottom: 54px;
}

.intro-strip,
.filter-panel,
.search-panel,
.detail-copy,
.feature-panel,
.latest-section,
.page-hero {
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.82);
}

.intro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px;
    background: linear-gradient(135deg, #ffffff, #eef2ff);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.intro-strip h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.feature-copy h2 {
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.intro-strip h2,
.section-head h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.intro-strip p,
.section-head p,
.page-hero p,
.feature-copy p,
.detail-one-line {
    margin: 8px 0 0;
    color: var(--muted);
}

.quick-search,
.search-controls,
.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quick-search input,
.search-controls input,
.filter-controls input,
.search-controls select,
.filter-controls select {
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 16px;
    outline: none;
    color: #111827;
}

.quick-search input {
    width: min(360px, 44vw);
}

.quick-search button,
.search-controls button,
.filter-tags button {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
}

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

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

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.88);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #c7d2fe, #fbcfe8);
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
    opacity: 0.92;
}

.score,
.card-category,
.rank-badge {
    position: absolute;
    border-radius: 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.score {
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.score span {
    margin-right: 3px;
    color: #facc15;
}

.card-category {
    left: 10px;
    bottom: 10px;
    padding: 4px 8px;
    background: var(--primary);
}

.rank-badge {
    top: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.tag-row,
.detail-tags,
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.tag-row span,
.detail-tags span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-desc {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-panel {
    position: relative;
    min-height: 430px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
    background: #0f172a;
}

.feature-cover {
    min-height: 430px;
    background-size: cover;
    background-position: center;
}

.feature-copy {
    padding: clamp(28px, 5vw, 64px);
    color: #ffffff;
    align-self: center;
}

.feature-copy h2 {
    margin-top: 16px;
    font-size: clamp(30px, 5vw, 54px);
}

.feature-copy p {
    color: #e2e8f0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feature-meta {
    margin: 18px 0 24px;
    color: #cbd5e1;
}

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

.category-tile,
.category-overview-card a {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    min-height: 190px;
    padding: 22px;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 42px rgba(15, 23, 42, 0.18);
}

.category-tile span,
.category-overview-body span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 800;
}

.category-tile h3 {
    margin: 26px 0 8px;
    font-size: 24px;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.page-hero {
    padding: clamp(28px, 5vw, 58px);
    margin-bottom: 34px;
    background: linear-gradient(135deg, #ffffff, #eef2ff 62%, #fdf2f8);
}

.page-hero h1 {
    font-size: clamp(34px, 6vw, 58px);
}

.hero-stats {
    margin-top: 18px;
}

.category-overview-card {
    border-radius: 20px;
}

.category-overview-card a {
    min-height: 310px;
    padding: 0;
    background: #ffffff;
    color: var(--text);
}

.category-overview-cover {
    height: 150px;
    background-size: cover;
    background-position: center;
}

.category-overview-body {
    padding: 20px;
}

.category-overview-body h2 {
    margin: 14px 0 8px;
}

.category-overview-body p {
    color: var(--muted);
    margin: 0 0 12px;
}

.category-overview-body small {
    color: #64748b;
}

.filter-panel,
.search-panel {
    padding: 22px;
}

.filter-controls,
.search-controls {
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.filter-controls input,
.search-controls input {
    flex: 1 1 300px;
}

.filter-tags button {
    min-height: 36px;
    background: #eef2ff;
    color: var(--primary);
}

.filter-tags button:hover {
    background: var(--primary);
    color: #ffffff;
}

.filter-count {
    margin: 14px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.rank-table-wrap {
    overflow-x: auto;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.rank-table th,
.rank-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.rank-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
}

.rank-table td:first-child {
    font-weight: 900;
    color: var(--primary);
}

.rank-table a {
    color: #111827;
    font-weight: 800;
}

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

.detail-main {
    max-width: 1180px;
}

.breadcrumb {
    margin: 0 0 20px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
}

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

.detail-hero {
    display: grid;
    grid-template-columns: minmax(240px, 330px) 1fr;
    gap: 32px;
    align-items: stretch;
    padding: 26px;
    border-radius: 26px;
    background: linear-gradient(135deg, #111827, #312e81 60%, #831843);
    color: #ffffff;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.detail-poster {
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(135deg, #c7d2fe, #fbcfe8);
    min-height: 420px;
}

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

.detail-info {
    align-self: center;
    padding: 12px 8px;
}

.detail-info h1 {
    font-size: clamp(34px, 6vw, 60px);
}

.detail-one-line {
    color: #e2e8f0;
    font-size: 18px;
    max-width: 820px;
}

.detail-meta {
    margin: 18px 0;
}

.detail-meta span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
}

.detail-tags {
    margin: 0 0 26px;
}

.detail-tags span {
    color: #e0e7ff;
    background: rgba(255, 255, 255, 0.12);
}

.player-section .section-head {
    margin-bottom: 18px;
}

.player-box {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.32), rgba(2, 6, 23, 0.72));
    color: #ffffff;
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.play-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    box-shadow: 0 20px 36px rgba(79, 70, 229, 0.34);
    font-size: 28px;
}

.player-overlay strong {
    font-size: 24px;
}

.player-overlay small {
    color: #cbd5e1;
}

.detail-copy {
    padding: 28px;
    display: grid;
    gap: 26px;
}

.detail-copy h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.detail-copy p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
}

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

.info-list div {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
}

.info-list dt {
    color: #64748b;
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

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

.search-panel .movie-card {
    animation: fadeIn 0.2s ease both;
}

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

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

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: #ffffff;
    font-size: 20px;
}

.footer-brand p {
    max-width: 620px;
    color: #94a3b8;
}

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

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.site-footer a:hover {
    color: #ffffff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1180px) {
    .movie-grid-6,
    .movie-grid-5,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

    .nav-shell {
        align-items: center;
        flex-wrap: wrap;
    }

    .nav-links {
        width: 100%;
        display: none;
        align-items: stretch;
        justify-content: flex-start;
        padding: 0 0 14px;
    }

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

    .nav-links a {
        background: #f8fafc;
    }

    .intro-strip,
    .feature-panel,
    .detail-hero {
        grid-template-columns: 1fr;
        display: grid;
    }

    .intro-strip {
        display: grid;
    }

    .quick-search input {
        width: 100%;
    }

    .feature-cover {
        min-height: 300px;
    }

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

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

@media (max-width: 680px) {
    .page-main,
    .nav-shell,
    .footer-inner {
        width: min(100% - 22px, 1280px);
    }

    .hero-stage {
        min-height: 76vh;
        border-radius: 20px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 22px;
    }

    .hero-content {
        bottom: 58px;
    }

    .quick-search,
    .search-controls,
    .filter-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .quick-search button,
    .search-controls button,
    .search-controls select,
    .filter-controls select,
    .filter-controls input,
    .search-controls input {
        width: 100%;
    }

    .movie-grid-6,
    .movie-grid-5,
    .movie-grid-auto,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .detail-hero {
        padding: 16px;
        border-radius: 20px;
    }

    .detail-poster {
        min-height: auto;
        aspect-ratio: 3 / 4;
    }

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

@media (max-width: 420px) {
    .movie-grid-6,
    .movie-grid-5,
    .movie-grid-auto {
        grid-template-columns: 1fr 1fr;
    }

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

    .tag-row {
        display: none;
    }
}
