:root {
    --sky: #0ea5e9;
    --blue: #2563eb;
    --deep-blue: #1d4ed8;
    --ink: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
    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,
video {
    display: block;
    max-width: 100%;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--sky), var(--blue));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    height: 74px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 13px;
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
    transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
    transform: scale(1.08) rotate(-5deg);
}

.brand-name {
    font-size: 22px;
}

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

.nav-link,
.mobile-nav-link {
    font-weight: 650;
    opacity: 0.92;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    opacity: 1;
    transform: translateY(-1px);
}

.site-search {
    position: relative;
    width: 240px;
}

.site-search-input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    outline: none;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 0 18px;
    font: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-search-input::placeholder {
    color: rgba(255, 255, 255, 0.82);
}

.site-search-input:focus {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.site-search-results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: 430px;
    overflow: auto;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-search-results.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.search-result-item {
    display: block;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.search-result-item:hover {
    background: #f0f9ff;
}

.search-result-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--ink);
}

.search-result-item span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hero {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: #030712;
}

.hero-track,
.hero-slide,
.hero-slide::before,
.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.86;
}

.hero-overlay {
    background:
        radial-gradient(circle at 74% 20%, rgba(14, 165, 233, 0.36), transparent 32%),
        linear-gradient(90deg, rgba(3, 7, 18, 0.92) 0%, rgba(3, 7, 18, 0.66) 44%, rgba(3, 7, 18, 0.22) 100%),
        linear-gradient(0deg, rgba(3, 7, 18, 0.86) 0%, transparent 46%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0 0 76px;
    color: #ffffff;
}

.hero-kicker {
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: #dff6ff;
    background: rgba(14, 165, 233, 0.24);
    backdrop-filter: blur(12px);
    font-weight: 700;
}

.hero h1,
.hero h2 {
    width: min(780px, 100%);
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    width: min(680px, 100%);
    margin: 0 0 26px;
    color: #e5edf5;
    font-size: 18px;
}

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

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

.button,
.hero-button {
    color: #ffffff;
    background: linear-gradient(90deg, var(--sky), var(--blue));
    box-shadow: 0 14px 28px rgba(14, 165, 233, 0.28);
}

.ghost-button {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
}

.button:hover,
.hero-button:hover,
.ghost-button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(15, 23, 42, 0.76);
    transform: translateY(-50%) scale(1.06);
}

.hero-arrow-prev {
    left: 22px;
}

.hero-arrow-next {
    right: 22px;
}

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

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

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

.main-content {
    padding: 54px 0 68px;
}

.section-heading {
    margin: 0 0 24px;
}

.section-heading > div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    color: var(--sky);
    font-size: 23px;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
    letter-spacing: -0.02em;
}

.section-heading p {
    margin: 8px 0 0 37px;
    color: var(--muted);
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

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

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e0f2fe;
}

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

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 52%;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.76), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster-frame::after {
    opacity: 1;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    color: #ffffff;
    background: rgba(14, 165, 233, 0.82);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 18px 36px rgba(14, 165, 233, 0.34);
}

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

.card-badge,
.poster-type {
    position: absolute;
    z-index: 3;
    padding: 4px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

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

.poster-type {
    left: 10px;
    bottom: 10px;
}

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

.movie-card-body h3 {
    margin: 0 0 7px;
    overflow: hidden;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--sky);
}

.movie-card-body p {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-meta,
.tag-row,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.tag-row span,
.detail-tags span,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 700;
}

.tag-row span {
    padding: 2px 8px;
}

.content-block {
    margin-top: 56px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 210px;
    padding: 24px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -58px;
    width: 156px;
    height: 156px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.13);
}

.category-card h3 {
    position: relative;
    z-index: 2;
    margin: 0 0 10px;
    font-size: 23px;
}

.category-card p {
    position: relative;
    z-index: 2;
    margin: 0 0 22px;
    color: #e0f2fe;
}

.category-card span {
    position: relative;
    z-index: 2;
    display: inline-flex;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.page-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: inset 0 -30px 80px rgba(15, 23, 42, 0.12);
}

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

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 740px;
    margin: 0;
    color: #e0f2fe;
    font-size: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin: 0 0 26px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
    color: var(--ink);
    background: #ffffff;
    border-color: var(--line);
    border-radius: 14px;
}

.filter-bar input::placeholder {
    color: #94a3b8;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card {
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.2), rgba(3, 7, 18, 0.74));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-start {
    width: 88px;
    height: 88px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 18px 44px rgba(14, 165, 233, 0.38);
    cursor: pointer;
    font-size: 31px;
    transition: transform 0.2s ease;
}

.player-start:hover {
    transform: scale(1.08);
}

.detail-card {
    margin-top: 22px;
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.13;
}

.detail-meta {
    margin-bottom: 22px;
    font-size: 14px;
}

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-card p {
    margin: 0 0 20px;
    color: #334155;
    font-size: 17px;
}

.detail-one-line {
    padding-left: 18px;
    border-left: 4px solid var(--sky);
    color: #475569 !important;
    font-style: italic;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0 22px;
}

.detail-tags span {
    padding: 7px 12px;
}

.side-card {
    position: sticky;
    top: 98px;
    padding: 22px;
}

.poster-side {
    overflow: hidden;
    margin-bottom: 18px;
    border-radius: 18px;
    background: #e0f2fe;
}

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

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.info-row strong {
    color: var(--ink);
    text-align: right;
}

.breadcrumb {
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--sky);
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 112px 1fr;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.rank-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    font-size: 22px;
    font-weight: 900;
}

.rank-poster img {
    width: 112px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.rank-body h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-body p {
    margin: 0 0 12px;
    color: var(--muted);
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0 28px;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 21px;
}

.footer-main p {
    max-width: 430px;
    margin: 0;
    color: #94a3b8;
}

.footer-main h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: #38bdf8;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.plain-page {
    display: grid;
    gap: 24px;
    max-width: 920px;
}

.plain-card {
    padding: 30px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.plain-card h2 {
    margin: 0 0 12px;
}

.plain-card p,
.plain-card li {
    color: #475569;
}

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

    .site-search {
        margin-left: auto;
    }

    .mobile-menu-button {
        display: block;
    }

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

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 66px;
        gap: 12px;
    }

    .brand-name {
        font-size: 18px;
    }

    .header-inner > .site-search {
        display: none;
    }

    .mobile-nav .site-search {
        width: 100%;
    }

    .hero {
        height: 500px;
    }

    .hero-content {
        padding-bottom: 70px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

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

    .rank-item {
        grid-template-columns: 48px 86px 1fr;
        gap: 12px;
    }

    .rank-number {
        width: 44px;
        height: 44px;
        border-radius: 14px;
        font-size: 18px;
    }

    .rank-poster img {
        width: 86px;
    }

    .rank-body h2 {
        font-size: 18px;
    }

    .rank-body p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero h1,
    .hero h2 {
        font-size: 34px;
    }

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

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