:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #dbeafe;
    --accent: #dc2626;
    --text: #111827;
    --muted: #6b7280;
    --light: #f3f4f6;
    --line: #e5e7eb;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: #f9fafb;
    font-family: 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 {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--brand), var(--brand-dark));
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 64px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--brand);
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.logo-text {
    white-space: nowrap;
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 64px;
    font-weight: 600;
    opacity: 0.95;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #bfdbfe;
    opacity: 1;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    display: grid;
    gap: 4px;
    min-width: 180px;
    padding: 8px;
    color: #1f2937;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 9px 12px;
    border-radius: 10px;
    transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-panel a:hover {
    color: var(--brand);
    background: #eff6ff;
}

.header-search {
    position: relative;
    flex: 1;
    max-width: 420px;
    margin-left: auto;
}

.header-search input,
.mobile-search input,
.page-search-form input,
.toolbar-search input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    outline: none;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    padding: 10px 46px 10px 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.header-search input::placeholder {
    color: #dbeafe;
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.24);
}

.header-search button {
    position: absolute;
    top: 50%;
    right: 12px;
    border: 0;
    color: #fff;
    background: transparent;
    transform: translateY(-50%);
}

.mobile-menu-button {
    display: none;
    padding: 8px 12px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.mobile-panel {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 8px;
}

.mobile-panel a,
.mobile-search button {
    padding: 10px 14px;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.mobile-search {
    display: flex;
    gap: 8px;
}

.mobile-search input {
    padding: 10px 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-search button {
    border: 0;
}

.hero-slider,
.page-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(180deg, #111827, #1f2937);
}

.hero-slider {
    height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 15%, rgba(37, 99, 235, 0.35), transparent 32%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35) 46%, rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 56px 0 64px;
}

.hero-content-inner {
    max-width: 900px;
}

.hero-label,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    background: var(--accent);
    font-size: 14px;
    font-weight: 700;
}

.hero-content h1,
.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.05;
}

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

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

.hero-tags span,
.detail-meta span {
    padding: 6px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    border: 0;
    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 {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.28);
}

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

.btn-glass {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.btn-white {
    color: var(--brand);
    background: #fff;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 28px;
    left: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 10px;
}

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

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

.compact-hero {
    padding: 76px 0;
}

.section {
    padding: 56px 0;
}

.section-light {
    background: #f3f4f6;
}

.section-white {
    background: #fff;
}

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    line-height: 1.2;
}

.section-heading p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more,
.text-link {
    color: var(--brand);
    font-weight: 800;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #111827);
}

.poster-frame-wide {
    flex: 0 0 164px;
    aspect-ratio: 16 / 10;
}

.poster-frame img,
.category-cover img,
.poster-aside img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.movie-card:hover .poster-frame img,
.category-overview-card:hover .category-cover img {
    transform: scale(1.06);
    filter: brightness(0.82);
}

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-chip {
    opacity: 1;
    transform: translateY(0);
}

.rank-badge {
    top: 10px;
    left: 10px;
    min-width: 42px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.24);
}

.card-body {
    padding: 16px;
}

.card-meta-row,
.card-info {
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.card-category {
    color: var(--brand);
    font-weight: 800;
}

.movie-card h3 {
    margin: 8px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #4b5563;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    display: grid;
    gap: 8px;
    min-height: 164px;
    padding: 22px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0891b2);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.category-tile:nth-child(even) {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.category-tile:hover {
    transform: translateY(-4px);
}

.category-tile span {
    font-size: 22px;
    font-weight: 900;
}

.category-tile strong {
    font-size: 16px;
}

.category-tile em {
    color: rgba(255, 255, 255, 0.86);
    font-style: normal;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-bar button {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 14px;
    color: #374151;
    background: #fff;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.filter-bar button:hover,
.filter-bar button.is-active {
    color: #fff;
    border-color: var(--brand);
    background: var(--brand);
}

.filter-bar.small button {
    padding: 7px 12px;
    font-size: 14px;
}

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

.full-ranking {
    max-width: 1080px;
}

.movie-card-list {
    display: flex;
    align-items: stretch;
}

.movie-card-list .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
}

.rail-wrap {
    position: relative;
}

.movie-rail {
    display: grid;
    grid-auto-columns: minmax(220px, 250px);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 6px 2px 18px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.rail-button {
    position: absolute;
    top: 38%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(17, 24, 39, 0.78);
    box-shadow: var(--shadow);
}

.rail-left {
    left: -14px;
}

.rail-right {
    right: -14px;
}

.cta-section {
    padding: 62px 0;
    color: #fff;
    background: linear-gradient(90deg, #2563eb, #0891b2);
}

.cta-inner {
    text-align: center;
}

.cta-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 999px;
    color: var(--brand);
    background: #fff;
    font-size: 28px;
}

.cta-section h2 {
    margin: 0 0 12px;
    font-size: 34px;
}

.cta-section p {
    margin: 0 auto 24px;
    max-width: 760px;
    color: rgba(255, 255, 255, 0.9);
}

.category-overview-grid {
    display: grid;
    gap: 18px;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.category-cover {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e3a8a, #111827);
}

.category-overview-card h2 {
    margin: 8px 0;
    font-size: 26px;
}

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

.toolbar {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f9fafb;
}

.toolbar-search {
    display: grid;
    gap: 8px;
    color: #374151;
    font-weight: 800;
}

.toolbar-search input,
.page-search-form input {
    padding: 12px 16px;
    color: #111827;
    border-color: var(--line);
    background: #fff;
}

.page-search-form {
    display: flex;
    gap: 12px;
    max-width: 760px;
}

.search-summary {
    margin-bottom: 18px;
    color: #374151;
    font-weight: 800;
}

.detail-shell {
    padding: 34px 0 54px;
    background: #f3f4f6;
}

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

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

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

.player-card,
.detail-info-card,
.aside-card {
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.player-card {
    overflow: hidden;
    margin-bottom: 22px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    background: #000;
}

.video-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(37, 99, 235, 0.88);
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.32);
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-frame.is-playing .video-center-play {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.9);
}

.video-controls {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-frame:hover .video-controls {
    opacity: 1;
}

.video-controls button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
}

.detail-info-card,
.aside-card {
    padding: 24px;
}

.detail-info-card h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.detail-info-card h2,
.aside-card h2 {
    margin: 24px 0 10px;
    font-size: 22px;
}

.detail-info-card p {
    color: #374151;
    white-space: pre-line;
}

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

.detail-aside {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 88px;
}

.poster-aside img {
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    background: linear-gradient(135deg, #1e3a8a, #111827);
}

.poster-aside .btn {
    width: 100%;
    margin-top: 14px;
}

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

.info-list dt {
    color: var(--muted);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr 1fr;
    gap: 28px;
    padding: 46px 0;
}

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

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

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

.footer-links a:hover {
    color: #bfdbfe;
}

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

.is-hidden {
    display: none !important;
}

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

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

@media (max-width: 980px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
        margin-left: auto;
    }

    .hero-slider {
        height: 520px;
    }

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

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

    .detail-aside {
        position: static;
    }

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

@media (max-width: 720px) {
    .container {
        width: min(100% - 22px, 1280px);
    }

    .logo-text {
        font-size: 17px;
    }

    .hero-slider {
        height: 500px;
    }

    .hero-content {
        padding: 34px 0 58px;
    }

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

    .section {
        padding: 38px 0;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

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

    .movie-card-list {
        display: grid;
    }

    .poster-frame-wide {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .category-grid,
    .footer-grid,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .page-search-form {
        display: grid;
    }

    .video-controls {
        opacity: 1;
        overflow-x: auto;
    }
}

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

    .hero-actions,
    .mobile-search {
        display: grid;
    }
}
