* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #f8fafc;
    color: #111827;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, #111827, #374151);
}

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: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    white-space: nowrap;
    background: linear-gradient(90deg, #dc2626, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 15px;
    background: linear-gradient(135deg, #dc2626, #f97316);
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.25);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link,
.nav-dropdown > button {
    border: 0;
    cursor: pointer;
    background: transparent;
    padding: 10px 12px;
    color: #374151;
    font-weight: 700;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-dropdown:hover > button {
    color: #dc2626;
    background: #fff1f2;
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 4px;
    width: 320px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    padding: 10px 12px;
    color: #475569;
    border-radius: 12px;
    font-size: 14px;
}

.dropdown-panel a:hover {
    color: #dc2626;
    background: #fff1f2;
}

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

.header-search input,
.search-panel input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 10px 14px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.header-search button,
.search-panel button,
.primary-button {
    border: 0;
    cursor: pointer;
    padding: 10px 18px;
    color: #ffffff;
    font-weight: 800;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.search-panel button:hover,
.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.24);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 10px 12px;
    color: #111827;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid #f1f5f9;
    background: #ffffff;
}

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

.mobile-panel nav {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.mobile-panel nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #374151;
    font-weight: 700;
}

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

.hero-slider {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: #030712;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.52), rgba(3, 7, 18, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 600px;
}

.hero-copy {
    max-width: 680px;
    color: #ffffff;
}

.hero-badge,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 7px 14px;
    margin-bottom: 18px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, #dc2626, #f97316);
    box-shadow: 0 18px 34px rgba(220, 38, 38, 0.28);
}

.hero-title,
.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 950;
}

.hero-copy p {
    max-width: 620px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.hero-meta span,
.movie-card-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 700;
}

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

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 0;
    color: #ffffff;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.65);
    transform: translateY(-50%) scale(1.04);
}

.hero-prev {
    left: 24px;
    transform: translateY(-50%);
}

.hero-next {
    right: 24px;
    transform: translateY(-50%);
}

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

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

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

.section {
    padding: 64px 0;
}

.section.soft-blue {
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section.dark-band {
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.section.soft-green {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.section.purple-band {
    color: #ffffff;
    background: linear-gradient(135deg, #7c3aed, #db2777);
}

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

.section-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-line {
    width: 6px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, #dc2626, #f97316);
}

.section h2,
.page-hero h1,
.detail-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-lead,
.page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #64748b;
    font-size: 17px;
}

.dark-band .section-lead,
.purple-band .section-lead,
.page-hero.gradient-red p,
.page-hero.gradient-blue p {
    color: rgba(255, 255, 255, 0.78);
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #eef2f7;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card.hidden {
    display: none;
}

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

.poster-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #111827;
}

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

.movie-card:hover .poster-frame img,
.category-card:hover img,
.compact-card:hover img {
    transform: scale(1.08);
}

.duration-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.72);
}

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

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.movie-card-meta span,
.detail-meta span {
    color: #64748b;
    background: #f1f5f9;
}

.movie-card h3,
.compact-card h3,
.category-card h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 900;
}

.movie-card p,
.compact-card p,
.category-card p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #64748b;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.movie-tag-row span,
.tag {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: #991b1b;
    font-size: 12px;
    font-weight: 800;
    background: #fee2e2;
}

.tag.small {
    padding: 4px 8px;
    font-size: 12px;
}

.horizontal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 24px;
}

.side-list {
    display: grid;
    gap: 14px;
}

.compact-card {
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #eef2f7;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.compact-card a {
    display: grid;
    grid-template-columns: auto 92px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
}

.compact-card img {
    width: 92px;
    height: 68px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.25s ease;
}

.compact-card h3 {
    font-size: 16px;
}

.compact-card p {
    font-size: 14px;
    -webkit-line-clamp: 1;
}

.compact-card span:not(.rank-number) {
    display: inline-block;
    margin-top: 5px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.rank-number {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border-radius: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #374151);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.92));
}

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

.category-card h3 {
    color: #ffffff;
}

.category-card p {
    color: rgba(255, 255, 255, 0.82);
}

.page-hero {
    padding: 64px 0;
    background: #ffffff;
}

.page-hero.gradient-red {
    color: #ffffff;
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.page-hero.gradient-blue {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a:hover {
    color: #dc2626;
}

.filter-bar,
.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 14px;
    align-items: center;
    padding: 18px;
    margin-bottom: 28px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #eef2f7;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.search-panel {
    grid-template-columns: minmax(0, 1fr) auto;
}

.result-line {
    min-height: 24px;
    margin: -10px 0 22px;
    color: #64748b;
    font-weight: 700;
}

.detail-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 42px 0 64px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-size: cover;
    background-position: center;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.82));
}

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

.play-circle {
    position: relative;
    z-index: 1;
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.45);
}

.player-error {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 16px;
    border-radius: 14px;
    color: #fecaca;
    background: rgba(127, 29, 29, 0.88);
    font-weight: 700;
}

.player-error.is-visible {
    display: block;
}

.detail-panel,
.detail-side,
.content-panel {
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #eef2f7;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-panel {
    padding: 26px;
    margin-top: 24px;
}

.detail-title {
    margin-bottom: 14px;
}

.detail-lead {
    margin: 0 0 18px;
    color: #475569;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid #e5e7eb;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.content-panel {
    padding: 26px;
    margin-top: 24px;
}

.content-panel h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 950;
}

.content-panel p {
    margin: 0;
    color: #334155;
    white-space: pre-line;
}

.detail-side {
    position: sticky;
    top: 96px;
    padding: 18px;
    height: fit-content;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #111827, #020617);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 54px 0;
}

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

.site-footer p {
    margin: 12px 0 0;
    color: #94a3b8;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 8px;
}

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

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 1100px) {
    .grid.three,
    .grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .detail-side {
        position: static;
    }
}

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

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

    .hero-slider,
    .hero-content {
        min-height: 520px;
    }

    .hero-control {
        display: none;
    }

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

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

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

    .header-inner {
        height: 64px;
    }

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

    .grid.two,
    .grid.three,
    .grid.four {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 44px 0;
    }

    .compact-card a {
        grid-template-columns: auto 78px 1fr;
    }

    .compact-card img {
        width: 78px;
        height: 60px;
    }

    .detail-panel,
    .content-panel {
        padding: 20px;
    }
}
