* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #1f2937;
    background: #f3f4f6;
    line-height: 1.6;
}

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

img,
video {
    display: block;
    max-width: 100%;
}

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);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(14px);
}

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

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

.site-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
    font-size: 14px;
}

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

.nav-link,
.mobile-nav-link {
    color: #374151;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
    color: #2563eb;
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.filter-field input,
.filter-field select {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 16px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.btn-primary,
.btn-secondary,
.player-start {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
}

.header-search button,
.mobile-search button,
.hero-search button,
.btn-primary {
    color: #ffffff;
    background: #2563eb;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.header-search button {
    padding: 10px 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.filter-field input:focus,
.filter-field select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    color: #111827;
    background: #ffffff;
}

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

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

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

.mobile-search input {
    width: 100%;
    padding: 10px 14px;
}

.mobile-search button {
    padding: 10px 16px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    min-height: 540px;
    background: #111827;
}

.hero-slide {
    display: none;
    min-height: 540px;
    position: relative;
    isolation: isolate;
}

.hero-slide.is-active {
    display: block;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    z-index: -3;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 13, 28, 0.96), rgba(13, 20, 39, 0.72), rgba(13, 20, 39, 0.32));
    z-index: -2;
}

.hero-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    right: 8%;
    top: 16%;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.28);
    filter: blur(70px);
    z-index: -1;
}

.hero-content {
    min-height: 540px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.7fr);
    gap: 46px;
    align-items: center;
    padding: 72px 0 58px;
}

.hero-kicker,
.page-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.24);
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    max-width: 760px;
    margin: 20px 0 18px;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.hero-description {
    max-width: 680px;
    margin: 0 0 26px;
    color: #d1d5db;
    font-size: 18px;
}

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

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
}

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

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.movie-card:hover,
.category-tile:hover,
.rank-card:hover,
.related-card:hover {
    transform: translateY(-3px);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-search {
    display: flex;
    gap: 10px;
    max-width: 580px;
    margin-top: 28px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 18px;
}

.hero-search button {
    padding: 0 24px;
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.hero-poster img {
    width: 100%;
    height: 430px;
    object-fit: cover;
}

.hero-poster-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(10px);
}

.hero-poster-caption strong {
    display: block;
    font-size: 20px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
    z-index: 5;
}

.hero-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.64);
    background: rgba(255, 255, 255, 0.25);
}

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

.section-block,
.page-block {
    padding: 58px 0;
}

.section-block.compact-top {
    padding-top: 34px;
}

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

.section-heading h2,
.page-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-title p {
    margin: 8px 0 0;
    color: #6b7280;
}

.section-more {
    color: #2563eb;
    font-weight: 800;
}

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

.movie-card,
.category-tile,
.rank-card,
.related-card,
.info-card,
.filter-panel,
.content-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover,
.category-tile:hover,
.rank-card:hover,
.related-card:hover {
    box-shadow: 0 22px 45px rgba(17, 24, 39, 0.12);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px 18px 0 0;
    background: #111827;
}

.movie-cover img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-cover img,
.related-card:hover img {
    transform: scale(1.05);
}

.cover-badge,
.cover-duration,
.rank-number {
    position: absolute;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.cover-badge {
    left: 12px;
    top: 12px;
    padding: 5px 10px;
    background: #2563eb;
}

.cover-duration {
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.72);
}

.cover-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.18);
    font-size: 42px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .cover-play,
.related-card:hover .cover-play {
    opacity: 1;
}

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

.movie-card-body h3,
.movie-card-body h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 800;
    color: #111827;
}

.movie-card-body h3 a:hover,
.movie-card-body h2 a:hover {
    color: #2563eb;
}

.card-summary {
    min-height: 48px;
    margin: 0 0 14px;
    color: #6b7280;
    font-size: 14px;
}

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

.card-meta span {
    color: #6b7280;
    background: #f3f4f6;
}

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

.tag-row span {
    color: #2563eb;
    background: #eff6ff;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile {
    display: block;
    padding: 24px;
    overflow: hidden;
    position: relative;
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 120px;
    height: 120px;
    right: -30px;
    top: -30px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 900;
    color: #111827;
}

.category-tile p {
    min-height: 52px;
    margin: 0 0 18px;
    color: #6b7280;
}

.category-mini-list {
    display: grid;
    gap: 8px;
    color: #374151;
    font-size: 14px;
}

.category-mini-list span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 0.8fr);
    gap: 16px;
    padding: 18px;
    margin-bottom: 28px;
}

.filter-field {
    display: grid;
    gap: 8px;
}

.filter-field label {
    color: #374151;
    font-weight: 800;
    font-size: 14px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    padding: 12px 15px;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #1d4ed8 55%, #0f766e);
    padding: 70px 0;
}

.page-title {
    max-width: 760px;
}

.page-title h1 {
    color: #ffffff;
}

.page-title p {
    color: #dbeafe;
    font-size: 17px;
}

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

.rank-card {
    position: relative;
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
}

.rank-card img {
    width: 100%;
    height: 116px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-number {
    left: 22px;
    top: 22px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-card h2,
.rank-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.rank-card p {
    margin: 0 0 12px;
    color: #6b7280;
}

.detail-hero {
    padding: 42px 0 58px;
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.26), transparent 34%), #111827;
    color: #ffffff;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: #cbd5e1;
    font-size: 14px;
}

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

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 188px;
    padding: 14px 24px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.96);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 3;
}

.player-start span {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.player-start:hover {
    transform: translate(-50%, -50%) scale(1.04);
}

.player-shell.is-playing .player-start {
    opacity: 0;
    pointer-events: none;
}

.detail-side {
    display: grid;
    gap: 18px;
}

.detail-poster-card {
    overflow: hidden;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.13);
}

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

.detail-info-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
}

.detail-info-card h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    font-weight: 900;
}

.detail-info-card p {
    color: #d1d5db;
}

.detail-meta span {
    color: #e5e7eb;
}

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

.content-card {
    padding: 28px;
    margin-bottom: 22px;
}

.content-card h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 26px;
    font-weight: 900;
}

.content-card p {
    margin: 0;
    color: #4b5563;
    font-size: 16px;
}

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

.related-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
}

.related-card img {
    width: 108px;
    height: 78px;
    border-radius: 12px;
    object-fit: cover;
}

.related-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 800;
}

.related-card p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.aside-card {
    position: sticky;
    top: 92px;
}

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

.empty-state {
    display: none;
    padding: 28px;
    color: #6b7280;
    text-align: center;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
}

.empty-state.is-visible {
    display: block;
}

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

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

.footer-logo {
    color: #ffffff;
    margin-bottom: 12px;
}

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

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

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

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

.footer-bottom {
    padding: 20px 16px;
    text-align: center;
    color: #9ca3af;
    border-top: 1px solid #1f2937;
}

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

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

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

    .hero-poster img {
        height: 360px;
    }

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

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

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

    .aside-card {
        position: static;
    }
}

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

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

    .hero,
    .hero-slide,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        padding: 48px 0 72px;
    }

    .hero-search,
    .mobile-search {
        border-radius: 20px;
        flex-direction: column;
    }

    .hero-search button,
    .mobile-search button {
        min-height: 44px;
    }

    .hero-poster img {
        height: 280px;
    }

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

    .movie-grid,
    .category-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .rank-card,
    .related-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .rank-card img {
        height: 100px;
    }

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