:root {
    --bg: #f9fafb;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #0891b2;
    --orange: #f97316;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    object-fit: cover;
}

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.nav-bar {
    height: 64px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    white-space: nowrap;
}

.logo:hover,
.nav-links a:hover,
.mobile-links a:hover {
    color: var(--blue);
}

.logo-mark {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-size: 13px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    font-size: 15px;
    color: #374151;
}

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

.top-search {
    width: 256px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}

.top-search input,
.mobile-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 10px 14px;
    background: transparent;
}

.top-search button,
.mobile-search button,
.search-box button,
.filter-panel button {
    border: 0;
    color: #fff;
    background: var(--blue);
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-box button:hover,
.filter-panel button:hover {
    background: var(--blue-dark);
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    font-size: 26px;
    color: #111827;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--border);
    background: #fff;
}

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

.mobile-links {
    display: grid;
    gap: 14px;
    padding-top: 18px;
    padding-bottom: 18px;
}

.mobile-search {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.hero-carousel {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    background-size: cover;
    background-position: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-inner {
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 46px;
    align-items: center;
    color: #fff;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(42px, 7vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-movie-title {
    font-size: clamp(26px, 4vw, 42px) !important;
    color: #dbeafe;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.28);
    border: 1px solid rgba(191, 219, 254, 0.28);
    font-size: 14px;
    font-weight: 700;
}

.hero-desc {
    width: min(760px, 100%);
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1.75;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

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

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

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

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

.btn.glass {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(12px);
}

.btn.full {
    width: 100%;
}

.hero-poster {
    display: block;
    height: 380px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
    transform: rotate(2deg);
}

.hero-poster img {
    height: 100%;
}

.hero-nav {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 34px;
    transform: translateY(-50%);
    cursor: pointer;
}

.hero-nav.prev {
    left: 18px;
}

.hero-nav.next {
    right: 18px;
}

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

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
}

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

.quick-cats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.quick-cats a {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #fff;
    color: #1f2937;
    font-weight: 800;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, color 0.2s ease;
}

.quick-cats a:hover {
    color: var(--blue);
    transform: translateY(-4px);
}

.main-sections {
    padding: 48px 0 32px;
}

.content-section,
.listing-section,
.category-overview,
.search-page,
.ranking-list,
.article-page,
.related-section {
    margin-bottom: 56px;
}

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

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

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

.section-link {
    color: var(--blue);
    font-weight: 800;
    white-space: nowrap;
}

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

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

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card.horizontal {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: 150px;
}

.poster {
    position: relative;
    height: 238px;
    overflow: hidden;
    background: #0f172a;
}

.horizontal-poster {
    height: 100%;
}

.poster img {
    height: 100%;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster img,
.hero-poster:hover img {
    transform: scale(1.06);
    filter: saturate(1.08);
}

.badge,
.duration {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.badge {
    top: 12px;
    left: 12px;
    background: var(--blue);
}

.duration {
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.72);
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(37, 99, 235, 0.82);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3,
.rank-info h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 19px;
    font-weight: 850;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p,
.rank-info p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
}

.highlight-section,
.region-section:nth-of-type(even) {
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff7ed, #eff6ff);
}

.page-hero {
    padding: 78px 0;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 58%, #0891b2);
}

.soft-hero {
    color: #111827;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 36%), linear-gradient(135deg, #eff6ff, #fff);
}

.rank-hero {
    background: linear-gradient(135deg, #111827, #7c2d12 48%, #1d4ed8);
}

.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 6vw, 58px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.page-hero p {
    width: min(760px, 100%);
    margin: 0;
    color: inherit;
    opacity: 0.82;
    font-size: 19px;
    line-height: 1.8;
}

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

.category-card {
    min-height: 220px;
    padding: 28px;
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
    color: var(--blue);
    font-weight: 900;
}

.category-card h2 {
    margin: 14px 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.category-card p,
.category-card small {
    color: var(--muted);
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 110px;
    gap: 12px;
    margin: 34px 0 26px;
}

.filter-panel input,
.filter-panel select,
.search-box input,
.search-filter select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    padding: 13px 16px;
    outline: 0;
}

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

.filter-panel button {
    border-radius: 999px;
}

.empty-result {
    padding: 34px;
    border-radius: 20px;
    background: #fff;
    color: var(--muted);
    text-align: center;
    box-shadow: var(--shadow);
}

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 12px;
    margin: 34px 0 14px;
}

.search-box button {
    border-radius: 999px;
}

.search-filter {
    grid-template-columns: 180px 180px;
    margin-top: 0;
}

.ranking-list {
    padding-top: 34px;
}

.rank-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}

.rank-number {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.22);
}

.rank-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) 36px;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

.rank-card:hover {
    transform: translateX(5px);
}

.rank-poster {
    height: 82px;
    overflow: hidden;
    border-radius: 14px;
}

.rank-poster img {
    height: 100%;
}

.rank-arrow {
    color: var(--blue);
    font-size: 36px;
}

.player-wrap {
    padding: 18px 0 34px;
    background: #020617;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 14px 0 18px;
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #60a5fa;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.16), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

.play-layer span {
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: rgba(37, 99, 235, 0.92);
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
    transition: transform 0.2s ease;
}

.play-layer:hover span {
    transform: scale(1.07);
}

.play-layer.hidden {
    display: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    padding: 34px 0 24px;
}

.detail-card,
.side-card,
.article-card {
    margin-bottom: 22px;
    padding: 26px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.15;
    font-weight: 900;
}

.detail-card h2,
.side-card h2,
.article-card h2 {
    margin: 0 0 14px;
    font-size: 23px;
    font-weight: 900;
}

.detail-card p,
.article-card p,
.side-card p {
    color: #374151;
    line-height: 1.9;
    font-size: 16px;
}

.detail-meta,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-meta span,
.tag-list span {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 800;
}

.lead-text {
    margin-top: 18px;
    font-size: 18px !important;
}

.cover-card img {
    height: 430px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.cover-card h2 {
    line-height: 1.35;
}

.side-links {
    display: grid;
    gap: 12px;
}

.side-links a {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #374151;
    transition: color 0.2s ease, background 0.2s ease;
}

.side-links a:hover {
    color: var(--blue);
    background: #eff6ff;
}

.article-page {
    padding-top: 42px;
}

.article-card {
    max-width: 880px;
}

.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 48px 0 26px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 34px;
}

.footer-logo {
    color: #fff;
    margin-bottom: 16px;
}

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

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

.site-footer a:not(.footer-logo) {
    display: block;
    margin-bottom: 10px;
    color: #d1d5db;
}

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

.footer-bottom {
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .hero-poster {
        display: none;
    }

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

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

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

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

    .hero-carousel {
        height: 560px;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 42px;
    }

    .hero-desc {
        font-size: 17px;
    }

    .hero-nav {
        display: none;
    }

    .quick-cats,
    .featured-grid,
    .four-grid,
    .listing-grid,
    .horizontal-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .movie-card.horizontal,
    .rank-card,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .horizontal-poster,
    .rank-poster {
        height: 220px;
    }

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

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

    .page-hero {
        padding: 54px 0;
    }

    .player-shell {
        border-radius: 14px;
    }

    .cover-card img {
        height: 320px;
    }
}
