:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --blue: #2563eb;
    --cyan: #0891b2;
    --emerald: #059669;
    --rose: #e11d48;
    --slate: #0f172a;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #0f172a;
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
    color: #4b5563;
}

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

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

.nav-toggle {
    display: none;
    border: 0;
    background: #eff6ff;
    color: var(--blue);
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 900;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 16px;
    font-weight: 800;
}

.mobile-nav a {
    padding: 12px 14px;
    background: #f8fafc;
    border-radius: 12px;
}

.hero-carousel {
    position: relative;
    height: min(640px, 82vh);
    min-height: 520px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.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-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 20%, rgba(34, 211, 238, 0.22), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.56) 48%, rgba(2, 6, 23, 0.28)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 44%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding: 0 0 76px;
    color: #fff;
}

.hero-panel {
    width: min(720px, 100%);
}

.eyebrow {
    margin: 0 0 12px;
    color: #67e8f9;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-panel h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-panel p {
    margin: 0 0 24px;
    max-width: 650px;
    color: #dbeafe;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.7;
}

.hero-meta,
.detail-meta,
.card-meta,
.tag-list,
.hero-actions,
.category-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.tag-list span,
.category-pills a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 14px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.13);
    color: #eff6ff;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    color: #fff;
    background: linear-gradient(135deg, var(--emerald), #22c55e);
    box-shadow: 0 18px 36px rgba(5, 150, 105, 0.3);
}

.secondary-button {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover,
.category-card:hover,
.hot-row:hover {
    transform: translateY(-3px);
}

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

.hero-dots button {
    width: 12px;
    height: 12px;
    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-dots button.is-active {
    width: 34px;
    background: #fff;
}

.content-section,
.list-section {
    padding: 68px 0;
}

.content-section:nth-of-type(even) {
    background: #fff;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1,
.categories-hero h1 {
    margin: 0;
    color: #111827;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-heading h2 {
    font-size: clamp(30px, 4vw, 46px);
}

.section-heading p,
.page-hero p,
.categories-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    min-width: 0;
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

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

.poster-frame {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
    aspect-ratio: 16 / 10;
}

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

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

.card-year,
.card-play {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
}

.card-year {
    top: 12px;
    right: 12px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
}

.card-play {
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-content {
    padding: 16px;
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.card-content h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    color: #111827;
}

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

.card-meta {
    justify-content: space-between;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.card-meta span:last-child {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.card-tags {
    margin: 12px 0 0;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-search {
    margin: -36px auto 0;
    position: relative;
    z-index: 8;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.search-panel input,
.list-toolbar input,
.search-box input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    color: #111827;
    background: #fff;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-panel button,
.search-box button {
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    padding: 0 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
    cursor: pointer;
}

.category-strip {
    padding: 30px 0 0;
}

.category-pills a {
    color: #0f172a;
    background: #fff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.category-pills a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.feature-band {
    background: linear-gradient(135deg, #ecfeff, #fff7ed);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
    gap: 28px;
    align-items: start;
}

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

.hot-row {
    display: grid;
    grid-template-columns: auto 72px 1fr;
    align-items: center;
    gap: 14px;
    min-height: 86px;
    padding: 10px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hot-row img {
    width: 72px;
    height: 58px;
    object-fit: cover;
    border-radius: 12px;
}

.hot-order,
.rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), #fb7185);
    font-weight: 950;
}

.hot-info strong,
.hot-info em {
    display: block;
}

.hot-info strong {
    color: #111827;
    line-height: 1.35;
}

.hot-info em {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
    font-style: normal;
}

.categories-hero,
.page-hero {
    padding: 72px 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.18), transparent 34%),
        linear-gradient(135deg, #eff6ff, #ecfeff);
}

.categories-hero h1,
.page-hero h1 {
    font-size: clamp(38px, 5vw, 64px);
}

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

.category-card {
    position: relative;
    min-height: 210px;
    padding: 24px;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: #0f172a;
    box-shadow: var(--shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: transform 0.35s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.15));
}

.category-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 162px;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.6;
}

.list-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.list-toolbar input {
    max-width: 430px;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 38px;
}

.pagination a,
.pagination strong,
.pagination span {
    min-width: 42px;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 900;
}

.pagination strong {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    border-color: transparent;
}

.detail-hero {
    padding: 34px 0 52px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.22), transparent 36%),
        linear-gradient(135deg, #020617, #172554 60%, #0f172a);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
    color: #bfdbfe;
    font-weight: 700;
}

.breadcrumbs a:hover {
    color: #fff;
}

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

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 28px 54px rgba(2, 6, 23, 0.45);
    background: #0f172a;
    aspect-ratio: 3 / 4;
}

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

.detail-title h1 {
    color: #fff;
    font-size: clamp(40px, 6vw, 74px);
}

.detail-title p {
    max-width: 760px;
    margin: 18px 0 24px;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta span,
.tag-list span {
    background: rgba(255, 255, 255, 0.12);
}

.player-section {
    padding: 46px 0 18px;
    background: #020617;
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.28);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.08));
    cursor: pointer;
}

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

.play-circle {
    width: 92px;
    height: 92px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emerald), #22c55e);
    box-shadow: 0 24px 52px rgba(34, 197, 94, 0.3);
}

.detail-content {
    padding: 58px 0 76px;
}

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

.article-box,
.side-box {
    padding: 26px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.article-box h2,
.side-box h2 {
    margin: 0 0 14px;
    font-size: 26px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.article-box p {
    margin: 0 0 22px;
    color: #374151;
    font-size: 16px;
    line-height: 1.95;
}

.side-box .hot-row {
    grid-template-columns: 62px 1fr;
}

.side-box .hot-row img {
    width: 62px;
    height: 52px;
}

.search-page {
    padding: 64px 0;
}

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    margin: 28px 0;
}

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

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 34px;
    padding: 52px 0;
}

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

.site-footer p {
    margin: 0;
    max-width: 440px;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    padding: 20px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.hidden-by-filter {
    display: none;
}

@media (max-width: 1024px) {
    .movie-grid,
    .category-grid,
    .search-results {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

    .hero-carousel {
        min-height: 560px;
    }

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

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

    .section-heading {
        display: block;
    }

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

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

    .detail-poster {
        width: min(320px, 100%);
    }

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

@media (max-width: 560px) {
    .site-container {
        width: min(100% - 22px, 1180px);
    }

    .site-logo {
        font-size: 20px;
    }

    .hero-carousel {
        min-height: 620px;
    }

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

    .hot-row {
        grid-template-columns: auto 64px 1fr;
    }

    .content-section,
    .list-section {
        padding: 46px 0;
    }
}
