* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: #e5eefb;
    background: #020617;
    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,
video {
    display: block;
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 66px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    box-shadow: 0 0 24px rgba(56, 189, 248, 0.42);
}

.brand-name {
    font-size: 22px;
    background: linear-gradient(90deg, #7dd3fc, #2563eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    position: relative;
    color: #cbd5e1;
    font-size: 15px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: #38bdf8;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #38bdf8;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.72);
    font-size: 23px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-nav .nav-link {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
    background: rgba(56, 189, 248, 0.13);
}

.hero-slider {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: radial-gradient(circle at 16% 14%, rgba(14, 165, 233, 0.25), transparent 34%), #020617;
}

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

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

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    transform: scale(1.04);
    filter: saturate(1.12);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.88) 40%, rgba(2, 6, 23, 0.35) 100%), linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 72px 0 94px;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 14px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 999px;
    color: #7dd3fc;
    background: rgba(8, 47, 73, 0.46);
    font-weight: 800;
}

.hero-copy h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 670px;
    margin: 0 0 24px;
    color: #cbd5e1;
    font-size: 19px;
}

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

.hero-meta span,
.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.15);
    font-size: 14px;
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 18px 35px rgba(14, 165, 233, 0.32);
}

.ghost-btn {
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.62);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    transform: rotate(1.2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: inherit;
}

.hero-dots {
    position: absolute;
    z-index: 5;
    right: max(24px, calc((100% - 1180px) / 2));
    bottom: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.7);
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: #38bdf8;
}

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

.section.alt {
    width: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
}

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

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

.section-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
}

.section-desc {
    max-width: 760px;
    margin: 10px 0 0;
    color: #94a3b8;
}

.more-link {
    color: #38bdf8;
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-grid.compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.card-link:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 28px 85px rgba(14, 165, 233, 0.16);
}

.poster-shell {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.poster-shell img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.45s ease;
}

.card-link:hover .poster-shell img {
    transform: scale(1.08);
    opacity: 0.78;
}

.play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 42px;
    opacity: 0;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.8);
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent);
    transition: opacity 0.24s ease;
}

.card-link:hover .play-badge {
    opacity: 1;
}

.card-body {
    display: block;
    padding: 16px;
}

.card-title {
    display: block;
    color: #ffffff;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.card-link:hover .card-title {
    color: #7dd3fc;
}

.card-meta {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 13px;
}

.card-meta b,
.card-meta i {
    font-style: normal;
    font-weight: 650;
}

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

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.card-tags em,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(14, 165, 233, 0.12);
    font-size: 12px;
    font-style: normal;
    font-weight: 750;
}

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

.category-card {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(30, 41, 59, 0.78));
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

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

.category-card span {
    position: absolute;
    inset: auto 18px 18px;
    z-index: 2;
}

.category-card strong {
    display: block;
    color: #ffffff;
    font-size: 24px;
    line-height: 1.25;
}

.category-card small {
    display: block;
    margin-top: 8px;
    color: #dbeafe;
}

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

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.rank-item {
    display: grid;
    grid-template-columns: 64px 82px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.82);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.42);
}

.rank-no {
    color: #38bdf8;
    font-size: 25px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 82px;
    height: 108px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 8px;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-item p {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a {
    color: #7dd3fc;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 30px;
}

.page-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.15;
}

.page-hero p {
    max-width: 820px;
    margin: 16px 0 0;
    color: #aab8cc;
    font-size: 18px;
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 76px;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at 50% 44%, rgba(14, 165, 233, 0.25), rgba(2, 6, 23, 0.22));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
    display: inline-grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.42);
    font-size: 36px;
}

.player-box.playing .player-cover {
    opacity: 0;
    visibility: hidden;
}

.detail-panel {
    margin-top: 26px;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.13);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.85);
    box-shadow: 0 22px 80px rgba(0, 0, 0, 0.18);
}

.detail-panel h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.18;
}

.detail-section {
    margin-top: 26px;
}

.detail-section h2 {
    margin: 0 0 10px;
    color: #ffffff;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #cbd5e1;
}

.one-line {
    color: #7dd3fc !important;
    font-size: 18px;
    font-weight: 700;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.78);
}

.search-panel input,
.search-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    outline: none;
    color: #e2e8f0;
    background: rgba(2, 6, 23, 0.72);
    padding: 0 14px;
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 22px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.88);
    text-align: center;
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 30px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

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

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

.site-footer a {
    display: inline-flex;
    margin-right: 14px;
    color: #7dd3fc;
    font-weight: 700;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 34px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

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

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

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .mobile-nav.open {
        display: block;
    }

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

    .hero-content {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 46px;
    }

    .hero-poster {
        max-width: 260px;
        transform: none;
    }

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

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

    .category-grid,
    .rank-list,
    .footer-inner,
    .search-panel {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 52px 76px minmax(0, 1fr);
    }

    .detail-panel {
        padding: 22px;
    }
}

@media (max-width: 520px) {
    .brand-name {
        font-size: 19px;
    }

    .hero-copy p {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .movie-grid,
    .movie-grid.compact {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 180px;
    }
}
