:root {
    --bg: #f0f9ff;
    --bg-soft: #e0f2fe;
    --surface: #ffffff;
    --surface-strong: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --accent: #2563eb;
    --accent-soft: rgba(37, 99, 235, 0.12);
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

body.menu-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.78);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

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

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 26px rgba(6, 182, 212, 0.35);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.site-nav a {
    padding: 10px 12px;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: var(--primary-dark);
    background: rgba(6, 182, 212, 0.1);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--text);
    background: var(--surface-strong);
}

.hero-carousel {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(120deg, #0891b2 0%, #2563eb 54%, #0f172a 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 56%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
    filter: saturate(1.05) contrast(1.06);
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.2), transparent 28%),
        linear-gradient(90deg, rgba(8, 145, 178, 0.95) 0%, rgba(37, 99, 235, 0.82) 42%, rgba(15, 23, 42, 0.76) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: center;
    min-height: 520px;
    gap: 36px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 660px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hero-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.26);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
}

.btn-soft {
    color: var(--primary-dark);
    background: rgba(6, 182, 212, 0.1);
}

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

.hero-panel {
    align-self: end;
    margin-bottom: 54px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.hero-panel h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.hero-panel a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.hero-panel a:first-of-type {
    border-top: 0;
}

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

.hero-dot {
    width: 36px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.4);
}

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

.page-hero {
    padding: 64px 0 34px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(37, 99, 235, 0.1));
}

.page-hero h1 {
    max-width: 840px;
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.section {
    padding: 56px 0;
}

.section-tight {
    padding-top: 32px;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

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

.section-more {
    flex: 0 0 auto;
    color: var(--primary-dark);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(6, 182, 212, 0.38);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, var(--bg-soft), var(--surface-strong));
}

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

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

.poster-play,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 900;
}

.poster-play {
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-style: normal;
}

.card-body {
    padding: 14px;
}

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

.card-body h3 a:hover {
    color: var(--primary-dark);
}

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

.card-meta span {
    color: #475569;
    background: #f1f5f9;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag-row span {
    display: inline-flex;
    padding: 4px 8px;
    color: var(--primary-dark);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.1);
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    min-height: 172px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 36%),
        #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--muted);
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 180px;
    gap: 12px;
    margin: 22px 0 26px;
}

.filter-bar input,
.filter-bar select,
.hero-search input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus,
.hero-search input:focus {
    border-color: rgba(6, 182, 212, 0.8);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    max-width: 620px;
    margin-top: 22px;
}

.hero-search input {
    border-color: rgba(255, 255, 255, 0.38);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 74px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 950;
}

.rank-item img {
    width: 74px;
    height: 96px;
    border-radius: 16px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-dark);
    font-weight: 800;
}

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

.player-card,
.detail-side,
.content-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.player-card {
    overflow: hidden;
}

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

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.68));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.36);
    font-size: 30px;
}

.detail-main {
    padding: 24px;
}

.detail-main h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-meta span {
    color: #0f172a;
    background: #f1f5f9;
}

.detail-side {
    position: sticky;
    top: 96px;
    overflow: hidden;
}

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

.side-body {
    padding: 18px;
}

.side-body h2 {
    margin: 0 0 12px;
    font-size: 20px;
}

.content-card {
    margin-top: 22px;
    padding: 24px;
}

.content-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 16px;
    color: #334155;
}

.content-card p:last-child {
    margin-bottom: 0;
}

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

.site-footer {
    margin-top: 40px;
    padding: 44px 0 28px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
}

.footer-brand {
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 620px;
    margin: 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--primary-dark);
    font-weight: 900;
}

.copyright {
    margin-top: 28px;
    color: var(--muted);
    font-size: 14px;
}

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

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

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

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

    .detail-side {
        position: static;
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
    }
}

@media (max-width: 820px) {
    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        position: fixed;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
    }

    body.menu-open .site-nav {
        display: flex;
    }

    .hero-carousel,
    .hero-content {
        min-height: 640px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        align-content: center;
    }

    .hero-image {
        width: 100%;
        opacity: 0.32;
    }

    .hero-panel {
        align-self: auto;
        margin-bottom: 48px;
    }

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

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

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 17px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

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

    .hero-panel {
        display: none;
    }

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

    .card-body {
        padding: 11px;
    }

    .card-desc {
        display: none;
    }

    .section-head {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 10px;
    }

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

    .rank-item img {
        width: 64px;
        height: 84px;
    }

    .detail-side {
        display: block;
    }

    .detail-main,
    .content-card {
        padding: 18px;
    }
}
