* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

img {
    display: block;
    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(226, 232, 240, 0.9);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.site-logo span:last-child,
.footer-logo span:last-child {
    background: linear-gradient(90deg, #0891b2, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.28);
}

.logo-mark span {
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #ffffff;
    transform: translateX(2px);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0891b2;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #0f172a;
}

.main-shell {
    min-height: 70vh;
}

.page-space {
    padding: 32px 0 0;
}

.content-section {
    margin-top: 64px;
}

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

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

.section-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.22);
}

.section-heading h2,
.detail-text-section h2 {
    margin: 0;
    color: #1e293b;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.section-more {
    color: #0891b2;
    font-weight: 700;
}

.hero-slider {
    position: relative;
    height: min(600px, 74vh);
    min-height: 500px;
    overflow: hidden;
    border-radius: 28px;
    background: #0f172a;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    transition: opacity 0.65s ease, visibility 0.65s ease, transform 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 24%, rgba(6, 182, 212, 0.32), transparent 36%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.56) 48%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(760px, 100%);
    padding: 56px;
    color: #ffffff;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: #0891b2;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 12px 22px rgba(8, 145, 178, 0.3);
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-content p,
.page-hero p,
.detail-info p {
    max-width: 720px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

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

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

.primary-button {
    color: #ffffff;
    background: #0891b2;
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.28);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.primary-button:hover {
    background: #0e7490;
}

.secondary-button {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.5);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.78);
    transform: translateY(-50%) scale(1.04);
}

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

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

.hero-dots {
    position: absolute;
    right: 28px;
    bottom: 24px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

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

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

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

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
}

.card-cover {
    position: relative;
    display: block;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0891b2);
}

.large-card .card-cover {
    height: 286px;
}

.card-cover img,
.rank-cover img,
.detail-poster img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.cover-gradient {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.7), transparent 64%);
    transition: opacity 0.2s ease;
}

.movie-card:hover .cover-gradient {
    opacity: 1;
}

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.88);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.cover-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: #0891b2;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(8, 145, 178, 0.28);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: #1e293b;
    font-size: 18px;
    font-weight: 780;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.card-title:hover {
    color: #0891b2;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin: 10px 0 12px;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-tags span,
.detail-tags a {
    padding: 4px 8px;
    border-radius: 8px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
}

.card-meta,
.rank-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: #64748b;
    font-size: 13px;
}

.card-badge,
.rank-meta a {
    padding: 4px 8px;
    border-radius: 8px;
    color: #0e7490;
    background: #ecfeff;
    font-weight: 700;
}

.highlight-section,
.panel-section {
    padding: 30px;
    border-radius: 26px;
    background: linear-gradient(90deg, #ecfeff, #eff6ff);
}

.scroll-row {
    display: grid;
    grid-auto-columns: minmax(238px, 282px);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x proximity;
}

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

.vertical-list {
    display: grid;
    gap: 18px;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 150px;
}

.horizontal-cover {
    height: 100%;
}

.horizontal-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-card-horizontal .card-title {
    min-height: auto;
    -webkit-line-clamp: 1;
}

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

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

.category-tile {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.category-tile > a {
    position: relative;
    display: block;
    min-height: 176px;
    padding: 24px;
}

.category-tile strong {
    display: block;
    color: #0f172a;
    font-size: 24px;
    line-height: 1.15;
}

.category-tile p {
    margin: 12px 0 0;
    color: #64748b;
}

.category-glow {
    position: absolute;
    right: -45px;
    top: -45px;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.24), transparent 70%);
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 24px 22px;
}

.category-samples a {
    padding: 5px 9px;
    border-radius: 999px;
    color: #0e7490;
    background: #ecfeff;
    font-size: 12px;
    font-weight: 700;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.42), transparent 34%),
        linear-gradient(135deg, #0f172a, #164e63 52%, #1d4ed8);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.small-page-hero {
    padding: 46px;
}

.small-page-hero p {
    margin-top: 16px;
}

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

.breadcrumb a {
    color: #0891b2;
    font-weight: 700;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 16px;
    margin-bottom: 26px;
}

.filter-bar label span {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 760;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    padding: 0 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #0891b2;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.filter-selects {
    display: flex;
    align-items: end;
    gap: 12px;
}

.empty-state {
    display: none;
    padding: 40px;
    border-radius: 18px;
    color: #64748b;
    background: #ffffff;
    text-align: center;
    font-weight: 700;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 96px 64px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.rank-cover {
    height: 126px;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.rank-number {
    color: #0891b2;
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-title {
    color: #1e293b;
    font-size: 20px;
    font-weight: 800;
}

.rank-title:hover {
    color: #0891b2;
}

.rank-content p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: #64748b;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.detail-space {
    max-width: 1180px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: stretch;
    padding: 34px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at 8% 12%, rgba(6, 182, 212, 0.38), transparent 36%),
        linear-gradient(135deg, #0f172a, #164e63 56%, #1d4ed8);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.detail-poster {
    overflow: hidden;
    min-height: 430px;
    border-radius: 22px;
    background: #0f172a;
    box-shadow: 0 20px 44px rgba(2, 6, 23, 0.28);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-info .detail-meta {
    color: rgba(255, 255, 255, 0.82);
}

.detail-tags a {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
}

.player-section {
    margin-top: 44px;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 22px 54px rgba(2, 6, 23, 0.24);
    aspect-ratio: 16 / 9;
}

.player-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.18), rgba(2, 6, 23, 0.48));
    cursor: pointer;
}

.player-cover span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0891b2;
    box-shadow: 0 18px 38px rgba(8, 145, 178, 0.36);
    font-size: 34px;
    transform: translateX(2px);
}

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

.detail-text-section {
    padding: 28px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.detail-text-section p {
    margin: 14px 0 0;
    color: #475569;
    font-size: 17px;
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
    padding: 46px 0;
}

.footer-logo span:last-child {
    color: #ffffff;
}

.footer-brand p {
    max-width: 520px;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 16px;
}

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

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

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

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

@media (max-width: 1040px) {
    .movie-grid,
    .compact-grid,
    .all-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .detail-hero {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        min-height: 64px;
        flex-wrap: wrap;
    }

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

    .menu-button {
        display: block;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 0 0 16px;
    }

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

    .page-space {
        padding-top: 20px;
    }

    .hero-slider {
        min-height: 460px;
        height: 68vh;
        border-radius: 22px;
    }

    .hero-content {
        padding: 32px 24px 54px;
    }

    .hero-content p,
    .page-hero p,
    .detail-info p {
        font-size: 16px;
    }

    .hero-arrow {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .hero-dots {
        left: 24px;
        right: auto;
        bottom: 20px;
    }

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

    .highlight-section,
    .panel-section,
    .small-page-hero {
        padding: 22px;
        border-radius: 22px;
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .all-grid,
    .category-grid,
    .wide-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .card-cover,
    .large-card .card-cover {
        height: 218px;
    }

    .movie-card-horizontal {
        grid-template-columns: 128px 1fr;
    }

    .movie-card-horizontal .card-cover {
        height: 100%;
    }

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

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

    .rank-item {
        grid-template-columns: 76px 1fr;
    }

    .rank-number {
        grid-column: 1;
        grid-row: 2;
        font-size: 22px;
    }

    .rank-content {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .rank-cover {
        height: 104px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
        padding: 22px;
        border-radius: 22px;
    }

    .detail-poster {
        min-height: auto;
        max-height: 520px;
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .feature-grid,
    .compact-grid,
    .all-grid,
    .category-grid,
    .wide-category-grid {
        grid-template-columns: 1fr;
    }

    .card-cover,
    .large-card .card-cover {
        height: 260px;
    }

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

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

    .horizontal-cover {
        height: 220px;
    }
}
