:root {
    --bg: #070a18;
    --bg-soft: #11172a;
    --card: rgba(255, 255, 255, 0.08);
    --card-strong: rgba(255, 255, 255, 0.13);
    --line: rgba(255, 255, 255, 0.12);
    --text: #f8fbff;
    --muted: #a9b4cc;
    --accent: #67e8f9;
    --accent-2: #a78bfa;
    --hot: #f97316;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --radius: 26px;
    --max: 1220px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: Inter, PingFang SC, Microsoft YaHei, Arial, sans-serif;
    background:
        radial-gradient(circle at 10% -10%, rgba(103, 232, 249, 0.25), transparent 34%),
        radial-gradient(circle at 90% 0%, rgba(167, 139, 250, 0.28), transparent 36%),
        linear-gradient(180deg, #070a18 0%, #0b1022 44%, #090b16 100%);
}

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgba(7, 10, 24, 0.78);
    backdrop-filter: blur(20px);
}

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    min-height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #021018;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 12px 35px rgba(103, 232, 249, 0.25);
}

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

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

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.11);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button,
.menu-button,
.search-close {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
}

.menu-button {
    display: none;
}

.mobile-nav {
    display: none;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 24px 18px;
    gap: 8px;
    flex-wrap: wrap;
}

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

.search-panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    padding: 28px;
    background: rgba(4, 7, 18, 0.72);
    backdrop-filter: blur(18px);
}

.search-panel.open {
    display: grid;
    place-items: start center;
}

.search-card {
    position: relative;
    width: min(760px, 100%);
    margin-top: 6vh;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 23, 42, 0.96);
    box-shadow: var(--shadow);
    padding: 28px;
}

.search-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 26px;
}

.search-label {
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
}

.search-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    outline: none;
    padding: 16px 18px;
}

.search-results {
    display: grid;
    gap: 12px;
    margin-top: 18px;
    max-height: 54vh;
    overflow: auto;
}

.search-result-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
}

.search-result-item img {
    width: 58px;
    height: 78px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.2), rgba(167, 139, 250, 0.2));
}

.search-result-item strong {
    display: block;
    margin-bottom: 5px;
}

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

.hero-carousel {
    position: relative;
    min-height: 720px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    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::before,
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg::before {
    background: linear-gradient(90deg, rgba(7, 10, 24, 0.96), rgba(7, 10, 24, 0.74) 42%, rgba(7, 10, 24, 0.36));
}

.hero-bg::after {
    background: radial-gradient(circle at 20% 30%, rgba(103, 232, 249, 0.26), transparent 30%), linear-gradient(180deg, transparent, #070a18 96%);
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.14) blur(1px);
    transform: scale(1.05);
    opacity: 0.52;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.62fr);
    align-items: center;
    gap: 46px;
    padding: 106px 0 78px;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    letter-spacing: 0.18em;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.detail-line {
    max-width: 760px;
    color: #d8e0f1;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.08);
    font-size: 13px;
}

.large-tags {
    margin: 22px 0;
}

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

.primary-button,
.ghost-button,
.inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    min-height: 48px;
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
}

.primary-button {
    color: #03111d;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 36px rgba(103, 232, 249, 0.22);
}

.ghost-button {
    color: var(--text);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.09);
}

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    max-height: 520px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 34px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.22), rgba(167, 139, 250, 0.18));
    box-shadow: var(--shadow);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.54));
}

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

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

.hero-dot {
    width: 38px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--accent);
}

.quick-search-block,
.content-section,
.page-main,
.detail-main {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
}

.quick-search-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: -42px;
    position: relative;
    z-index: 6;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(17, 23, 42, 0.86);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow);
    padding: 28px;
}

.quick-search-block h2 {
    margin: 0 0 8px;
    font-size: 26px;
}

.quick-search-block p {
    margin: 0;
    color: var(--muted);
}

.content-section {
    padding: 72px 0 0;
}

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

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

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

.section-link {
    color: var(--accent);
    font-weight: 800;
}

.movie-grid,
.rank-grid,
.category-grid,
.category-overview-grid {
    display: grid;
    gap: 18px;
}

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

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

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

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

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

.movie-card-link {
    display: block;
    height: 100%;
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card-link:hover {
    transform: translateY(-7px);
    border-color: rgba(103, 232, 249, 0.48);
    background: rgba(255, 255, 255, 0.11);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.15), rgba(167, 139, 250, 0.17));
}

.poster-img,
.tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.32s ease;
}

.movie-card-link:hover .poster-img {
    transform: scale(1.06);
}

.poster-glow {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--hot), #ef4444);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

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

.movie-card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.meta-row,
.movie-card-body p {
    color: var(--muted);
    line-height: 1.65;
}

.meta-row {
    margin-bottom: 9px;
    font-size: 13px;
}

.movie-card-body p {
    margin: 0 0 14px;
    font-size: 14px;
}

.category-tile,
.category-overview-card a,
.story-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.category-tile {
    padding: 22px;
    min-height: 210px;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
    transform: translateY(-6px);
    border-color: rgba(103, 232, 249, 0.45);
}

.category-tile span {
    display: block;
    margin-bottom: 20px;
    color: var(--accent);
    font-weight: 900;
}

.category-tile strong {
    display: block;
    margin-bottom: 16px;
    font-size: 34px;
}

.category-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.page-main {
    padding-bottom: 84px;
}

.page-hero {
    min-height: 360px;
    display: flex;
    align-items: center;
    margin-top: 34px;
    border: 1px solid var(--line);
    border-radius: 34px;
    background:
        radial-gradient(circle at 20% 20%, rgba(103, 232, 249, 0.24), transparent 32%),
        radial-gradient(circle at 90% 10%, rgba(167, 139, 250, 0.22), transparent 32%),
        rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow);
    padding: 44px;
}

.slim-hero,
.category-hero,
.ranking-hero {
    min-height: 300px;
}

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

.category-overview-card a {
    overflow: hidden;
    transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-cover-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    height: 190px;
    background: rgba(255, 255, 255, 0.05);
}

.category-cover-row span {
    overflow: hidden;
}

.category-overview-body {
    padding: 24px;
}

.category-overview-body h2 {
    margin: 0 0 10px;
}

.category-overview-body p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--muted);
    margin: 30px 0 20px;
}

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

.detail-main {
    padding-bottom: 90px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 36px;
    background:
        radial-gradient(circle at 20% 20%, rgba(103, 232, 249, 0.16), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(167, 139, 250, 0.16), transparent 30%),
        rgba(255, 255, 255, 0.07);
    box-shadow: var(--shadow);
    padding: 34px;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.18), rgba(167, 139, 250, 0.18));
}

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

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

.detail-meta {
    margin-top: 20px;
}

.player-section {
    padding: 42px 0 0;
}

.player-shell {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 34px;
    overflow: hidden;
    background: #030610;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #02030a;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    border: 0;
    color: var(--text);
    background:
        radial-gradient(circle at center, rgba(103, 232, 249, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(2, 6, 18, 0.2), rgba(2, 6, 18, 0.72));
    cursor: pointer;
    text-align: center;
}

.play-cover.hidden {
    display: none;
}

.play-icon {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #041018;
    font-size: 32px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 14px 42px rgba(103, 232, 249, 0.26);
}

.play-cover strong {
    font-size: 22px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding-top: 42px;
}

.story-card {
    padding: 28px;
}

.story-card h2 {
    margin: 0 0 14px;
}

.story-card p {
    margin: 0;
    color: #d8e0f1;
    line-height: 1.9;
}

.detail-related {
    width: 100%;
}

.site-footer {
    margin-top: 80px;
    border-top: 1px solid var(--line);
    background: rgba(3, 6, 18, 0.55);
}

.footer-inner {
    width: min(var(--max), calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    color: var(--text);
    font-size: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.footer-links a {
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent);
}

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

    .detail-hero {
        grid-template-columns: 280px minmax(0, 1fr);
    }
}

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

    .menu-button {
        display: inline-flex;
    }

    .hero-carousel {
        min-height: 760px;
    }

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

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

    .quick-search-block,
    .section-heading,
    .footer-inner {
        display: block;
    }

    .quick-search-block .primary-button {
        margin-top: 18px;
    }

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

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

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .quick-search-block,
    .content-section,
    .page-main,
    .detail-main,
    .footer-inner {
        width: calc(100% - 28px);
        padding-left: 0;
        padding-right: 0;
    }

    .header-inner {
        min-height: 66px;
    }

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

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

    .hero-copy h1,
    .page-hero h1,
    .detail-info h1 {
        font-size: 40px;
    }

    .hero-copy p,
    .page-hero p,
    .detail-line {
        font-size: 16px;
    }

    .movie-grid,
    .wide-grid,
    .rank-grid,
    .category-grid,
    .category-overview-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero,
    .quick-search-block,
    .story-card,
    .search-card {
        border-radius: 22px;
        padding: 22px;
    }

    .category-cover-row {
        height: 140px;
    }
}
