* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #0f172a;
    color: #e5e7eb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

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

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #dbeafe;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-width: 280px;
}

.header-search input,
.search-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.header-search input::placeholder,
.search-panel input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.primary-button,
.ghost-button,
.section-more,
.slider-tools button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: #ffffff;
    background: #ef4444;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.3);
    font-weight: 700;
}

.header-search button:hover,
.primary-button:hover,
.slider-tools button:hover {
    transform: translateY(-1px);
}

.ghost-button,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
}

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

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: linear-gradient(180deg, #111827, #0f172a);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.9s ease;
}

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

.hero-slide img {
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 1), rgba(15, 23, 42, 0.2) 50%, rgba(15, 23, 42, 0.72));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%);
    max-width: 1180px;
}

.hero-kicker {
    display: inline-flex;
    padding: 7px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: #dc2626;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    max-width: 860px;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 68px);
    line-height: 1.08;
}

.hero p,
.page-hero p,
.detail-lead {
    max-width: 720px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-tags,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-tags span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: #dbeafe;
    background: rgba(59, 130, 246, 0.18);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.16);
    font-size: 13px;
}

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

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

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

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

.section {
    padding: 58px 0;
}

.hot-strip {
    background: linear-gradient(90deg, #f97316, #ef4444);
}

.category-section,
.detail-content {
    background: #111827;
}

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

.section-title h2,
.category-block h2,
.side-card h2,
.detail-article h2,
.highlight-panel h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 3vw, 34px);
}

.section-title p,
.category-block p,
.highlight-panel p,
.site-footer p {
    margin: 8px 0 0;
    color: #cbd5e1;
}

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

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

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 250px);
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
    scroll-snap-align: start;
}

.slider-tools {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: -60px;
    margin-bottom: 20px;
}

.slider-tools button {
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    font-size: 28px;
}

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.86);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.25);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 55px rgba(2, 6, 23, 0.38);
}

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

.poster-link img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.28s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.04);
}

.poster-badge {
    position: absolute;
    left: 12px;
    bottom: 12px;
    border-radius: 999px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.92);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.35;
}

.card-meta {
    margin: 0 0 10px;
    color: #93c5fd;
    font-size: 13px;
}

.card-text {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 12px;
    overflow: hidden;
    color: #cbd5e1;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact .card-text {
    min-height: 0;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    border-radius: 22px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: #1e293b;
    box-shadow: 0 18px 38px rgba(2, 6, 23, 0.25);
}

.category-tile img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.2));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
}

.category-tile span {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
}

.category-tile p {
    margin: 8px 0 0;
    color: #dbeafe;
}

.two-column,
.article-grid,
.detail-hero-grid,
.footer-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 34px;
    align-items: start;
}

.ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 12px;
}

.ranking-list li {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.78);
}

.ranking-list span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #ffffff;
    background: #ef4444;
    font-weight: 800;
}

.ranking-list a {
    color: #ffffff;
    font-weight: 800;
}

.ranking-list em {
    color: #93c5fd;
    font-style: normal;
    font-size: 13px;
}

.highlight-panel,
.side-card,
.detail-article,
.category-block {
    border-radius: 24px;
    padding: 26px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.92));
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14), 0 20px 45px rgba(2, 6, 23, 0.25);
}

.page-hero,
.detail-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    padding: 76px 0;
    background-position: center;
    background-size: cover;
    background-color: #111827;
}

.compact-hero {
    min-height: 310px;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.58), transparent 36%), linear-gradient(135deg, #111827, #1e3a8a);
}

.category-list {
    display: grid;
    gap: 26px;
}

.category-block-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.top-three {
    margin-bottom: 28px;
}

.full-ranking {
    margin-top: 10px;
}

.search-panel {
    max-width: 560px;
    margin-top: 26px;
}

.search-panel input {
    padding: 16px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
}

.detail-hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.4), transparent 38%), linear-gradient(135deg, #111827, #0f172a);
}

.detail-hero-grid {
    grid-template-columns: 310px 1fr;
    align-items: center;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, #1d4ed8, #0f172a);
    box-shadow: 0 28px 68px rgba(2, 6, 23, 0.45);
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    color: #93c5fd;
}

.player-section {
    background: #020617;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.player-card video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(0, 0, 0, 0.58));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 18px 35px rgba(239, 68, 68, 0.4);
    font-size: 34px;
    padding-left: 4px;
}

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

.detail-article p,
.side-card dd {
    color: #cbd5e1;
}

.detail-article p {
    font-size: 17px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 12px 16px;
    margin: 18px 0 0;
}

.side-card dt {
    color: #93c5fd;
}

.side-card dd {
    margin: 0;
}

.site-footer {
    padding: 46px 0 0;
    background: #020617;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #dbeafe;
}

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

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

    .header-search {
        min-width: 220px;
    }

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

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

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

    .hero {
        height: 520px;
    }

    .hero-content {
        bottom: 42px;
    }

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

    .movie-grid,
    .category-grid,
    .mini-grid,
    .two-column,
    .article-grid,
    .detail-hero-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .detail-hero-grid {
        align-items: start;
    }

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

    .ranking-list em {
        grid-column: 2;
    }
}

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

    .hero {
        height: 500px;
    }

    .section {
        padding: 42px 0;
    }

    .section-title,
    .category-block-head {
        display: block;
    }

    .section-more {
        margin-top: 14px;
    }

    .movie-grid,
    .category-grid,
    .mini-grid,
    .two-column,
    .article-grid,
    .detail-hero-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-hero-grid {
        gap: 24px;
    }

    .detail-poster {
        max-width: 260px;
    }

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

    .mobile-nav {
        grid-template-columns: 1fr;
    }
}
