* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid rgba(51, 65, 85, 0.85);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.38);
    backdrop-filter: blur(12px);
}

.nav-wrap {
    max-width: 1180px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #dbeafe;
    font-weight: 900;
    background: linear-gradient(135deg, #2563eb, #22d3ee);
    box-shadow: 0 14px 35px rgba(37, 99, 235, 0.35);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-copy small {
    margin-top: 4px;
    color: #94a3b8;
    font-size: 12px;
}

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

.desktop-nav a,
.mobile-panel a {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
    color: #60a5fa;
}

.header-search {
    width: 250px;
}

.header-search input,
.mobile-panel input,
.local-filter,
.search-panel input {
    width: 100%;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 10px 14px;
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.92);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.local-filter:focus,
.search-panel input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
    background: #0f172a;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.95);
    cursor: pointer;
}

.mobile-panel {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 20px;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
}

.hero-carousel {
    position: relative;
    height: 72vh;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

.hero-bg,
.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shadow {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 48px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    max-width: 1180px;
}

.hero-kicker,
.page-hero span,
.section-head span {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.92);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
    max-width: 760px;
    margin: 16px 0 0;
    color: #fff;
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-content h2 + h2 {
    font-size: clamp(34px, 5vw, 66px);
}

.hero-content p {
    max-width: 680px;
    margin: 22px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 22px;
}

.hero-tags span,
.tag-row span {
    border-radius: 999px;
    color: #93c5fd;
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(51, 65, 85, 0.9);
    font-size: 12px;
    font-style: normal;
    padding: 5px 10px;
}

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

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

.primary-btn,
.search-panel button {
    border: 0;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.32);
    cursor: pointer;
}

.primary-btn:hover,
.search-panel button:hover {
    transform: translateY(-2px);
    background: #1d4ed8;
}

.ghost-btn {
    color: #e2e8f0;
    border: 1px solid #334155;
    background: rgba(15, 23, 42, 0.66);
}

.ghost-btn:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
    color: #bfdbfe;
}

.ghost-btn.small {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(15, 23, 42, 0.86);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: #3b82f6;
}

.section-block {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 24px;
}

.section-rise {
    margin-top: -70px;
    position: relative;
    z-index: 5;
}

.compact-top {
    padding-top: 38px;
}

.section-head {
    margin: 0 auto 34px;
    max-width: 720px;
    text-align: center;
}

.section-head.align-left {
    margin-left: 0;
    text-align: left;
}

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-copy h2 {
    margin: 12px 0 0;
    color: #fff;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-info p {
    margin: 14px 0 0;
    color: #94a3b8;
}

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(30, 41, 59, 0.96);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: #3b82f6;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.7);
}

.poster-frame {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

.movie-card-large .poster-frame {
    aspect-ratio: 16 / 10;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.02) 60%);
}

.poster-badge {
    position: absolute;
    z-index: 2;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.9);
    padding: 4px 8px;
}

.poster-badge-top {
    top: 10px;
    right: 10px;
}

.poster-badge-bottom {
    left: 10px;
    right: 10px;
    bottom: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background: rgba(0, 0, 0, 0.68);
}

.movie-card-body {
    display: flex;
    min-height: 188px;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.movie-card-body strong {
    color: #fff;
    font-size: 17px;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.movie-card:hover strong {
    color: #60a5fa;
}

.movie-card-body em {
    display: -webkit-box;
    overflow: hidden;
    color: #94a3b8;
    font-size: 14px;
    font-style: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    color: #64748b;
    font-size: 13px;
}

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

.category-tile {
    min-height: 190px;
    padding: 24px;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 24px;
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.22), transparent 35%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.88));
    box-shadow: 0 18px 48px rgba(2, 6, 23, 0.26);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
}

.category-tile span {
    color: #60a5fa;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.category-tile strong {
    display: block;
    margin-top: 12px;
    color: #fff;
    font-size: 24px;
}

.category-tile em {
    display: block;
    margin-top: 12px;
    color: #94a3b8;
    font-style: normal;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 42px;
    align-items: start;
}

.text-link {
    display: inline-flex;
    margin-top: 16px;
    color: #60a5fa;
    font-weight: 800;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(30, 41, 59, 0.95);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.88);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
}

.rank-number {
    color: #60a5fa;
    font-size: 22px;
    font-weight: 900;
}

.rank-item img {
    width: 72px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    display: block;
}

.rank-copy strong {
    overflow: hidden;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-copy em {
    display: -webkit-box;
    overflow: hidden;
    margin: 4px 0 8px;
    color: #94a3b8;
    font-size: 13px;
    font-style: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-side {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 24px 64px;
    text-align: center;
    background:
        radial-gradient(circle at 50% -10%, rgba(59, 130, 246, 0.24), transparent 32%),
        linear-gradient(180deg, #0f172a, #020617);
}

.page-hero p {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.filter-panel,
.search-panel {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
    padding: 16px;
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.72);
}

.local-filter,
.search-panel input {
    flex: 1;
}

.search-panel button {
    min-width: 110px;
}

.search-status {
    min-height: 28px;
    margin: 0 0 18px;
    color: #94a3b8;
    font-weight: 800;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.38;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.75) 46%, rgba(2, 6, 23, 0.3)),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.55));
}

.detail-wrap {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 36px 24px 72px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 28px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #60a5fa;
}

.breadcrumb em {
    color: #e2e8f0;
    font-style: normal;
}

.detail-grid {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 26px;
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
    font-size: clamp(40px, 6vw, 72px);
}

.detail-info p {
    max-width: 760px;
    font-size: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(51, 65, 85, 0.9);
    font-weight: 800;
}

.player-section {
    padding-top: 46px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(51, 65, 85, 0.96);
    border-radius: 28px;
    background: #000;
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
}

.player-start {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.28), rgba(0, 0, 0, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    background: #2563eb;
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.42);
    font-size: 34px;
}

.player-start strong {
    font-size: 20px;
}

.player-start.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 34px;
    padding-top: 46px;
}

.detail-copy article,
.detail-copy aside {
    border: 1px solid rgba(51, 65, 85, 0.86);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.78);
    padding: 28px;
}

.detail-copy p {
    color: #cbd5e1;
    font-size: 16px;
}

.detail-copy dl {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    color: #cbd5e1;
}

.detail-copy dt {
    color: #64748b;
    font-weight: 800;
}

.detail-copy dd {
    margin: 0;
}

.detail-copy dd a {
    color: #60a5fa;
}

.site-footer {
    border-top: 1px solid rgba(51, 65, 85, 0.9);
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    color: #94a3b8;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 38px 24px;
    display: flex;
    justify-content: space-between;
    gap: 28px;
}

.footer-inner strong {
    color: #fff;
    font-size: 20px;
}

.footer-inner p {
    max-width: 560px;
    margin: 10px 0 0;
}

.footer-inner nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-content: flex-start;
}

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

.footer-bottom {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 28px;
    color: #64748b;
    font-size: 14px;
}

.is-hidden-card {
    display: none !important;
}

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

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

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

    .split-layout,
    .detail-copy {
        grid-template-columns: 1fr;
    }

    .rank-list-wide {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        height: 66px;
        padding: 0 16px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .hero-carousel {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        width: calc(100% - 32px);
    }

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

    .hero-control {
        display: none;
    }

    .section-block {
        padding: 52px 16px;
    }

    .section-rise {
        margin-top: -38px;
    }

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

    .movie-card-body {
        min-height: 180px;
        padding: 14px;
    }

    .filter-panel,
    .search-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-hero {
        min-height: auto;
    }

    .detail-wrap {
        padding: 24px 16px 48px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .detail-poster {
        max-width: 280px;
        margin: 0 auto;
    }

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

    .rank-side {
        display: none;
    }

    .rank-item img {
        width: 60px;
        height: 82px;
    }

    .footer-inner {
        flex-direction: column;
        padding: 32px 16px;
    }

    .footer-bottom {
        padding: 0 16px 26px;
    }
}

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

    .hero-actions {
        width: 100%;
    }

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

    .page-hero {
        padding: 62px 16px 46px;
    }
}
