
:root {
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.18);
    --cyan: #22d3ee;
    --blue: #3b82f6;
    --orange: #f97316;
    --white: #ffffff;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28rem),
        linear-gradient(180deg, #020617 0%, #0f172a 58%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    min-height: 100vh;
}

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

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

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.92));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 14px 35px rgba(2, 6, 23, 0.24);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 28px rgba(34, 211, 238, 0.28);
}

.brand-text {
    background: linear-gradient(90deg, #dbeafe, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 20px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    padding: 10px 15px;
    color: #cbd5e1;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--white);
    background: rgba(34, 211, 238, 0.14);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.7);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 99px;
}

.hero-carousel {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    min-height: 620px;
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-track {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: 40px;
    padding: clamp(32px, 6vw, 76px);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-copy {
    max-width: 720px;
    position: relative;
    z-index: 2;
}

.eyebrow {
    margin: 0 0 14px;
    color: #67e8f9;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-summary {
    max-width: 650px;
    margin: 22px 0 0;
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.85;
}

.hero-tags,
.detail-tags,
.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
    color: #cffafe;
    background: rgba(34, 211, 238, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
}

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

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

.primary-btn,
.search-box button {
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 34px rgba(34, 211, 238, 0.25);
}

.ghost-btn,
.more-link {
    color: #e0f2fe;
    border: 1px solid rgba(226, 232, 240, 0.26);
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-box button:hover,
.more-link:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    z-index: 2;
    max-width: 370px;
    justify-self: end;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

.hero-dots {
    position: absolute;
    left: clamp(32px, 6vw, 76px);
    bottom: 32px;
    z-index: 5;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.3);
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--blue), var(--cyan));
}

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

.quick-search {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(2, 6, 23, 0.26);
}

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-box input {
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    outline: none;
    background: rgba(2, 6, 23, 0.46);
}

.search-box input:focus {
    border-color: rgba(34, 211, 238, 0.75);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.category-pills a {
    padding: 9px 13px;
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.58);
    transition: color 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-pills a:hover {
    color: #ecfeff;
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(34, 211, 238, 0.12);
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.content-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 55px rgba(2, 6, 23, 0.2);
}

.wide-panel,
.ranking-panel {
    padding: 24px;
}

.section-heading {
    margin-bottom: 22px;
}

.section-heading p {
    margin: 0 0 6px;
    color: var(--cyan);
    font-weight: 800;
}

.section-heading h2 {
    margin: 0;
    color: var(--white);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.compact-heading h2 {
    font-size: 28px;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    box-shadow: 0 14px 35px rgba(2, 6, 23, 0.14);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 42px rgba(2, 6, 23, 0.22);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

.poster-link img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    font-weight: 900;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.poster-mask span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

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

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

.movie-meta {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

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

.movie-card h3 a:hover {
    color: #2563eb;
}

.movie-desc {
    min-height: 48px;
    margin: 10px 0 12px;
    color: #475569;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-tags span {
    color: #0e7490;
    background: #ecfeff;
    border-color: #bae6fd;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 40px 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(2, 6, 23, 0.28);
    transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
    border-color: rgba(34, 211, 238, 0.38);
    background: rgba(34, 211, 238, 0.08);
    transform: translateX(3px);
}

.ranking-number {
    color: var(--cyan);
    font-weight: 900;
    font-size: 18px;
}

.ranking-item img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

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

.ranking-copy strong,
.ranking-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-copy strong {
    color: var(--white);
}

.ranking-copy em {
    margin-top: 4px;
    color: var(--muted);
    font-style: normal;
    font-size: 12px;
}

.more-link {
    width: 100%;
    margin-top: 18px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: clamp(38px, 6vw, 76px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.7)),
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.25), transparent 25rem);
    box-shadow: var(--shadow);
}

.page-hero p:last-child {
    max-width: 720px;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 18px;
}

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

.category-card-large {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.18);
}

.category-card-head h2 {
    margin: 0;
    color: var(--white);
}

.category-card-head p {
    color: var(--muted);
    line-height: 1.7;
}

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

.category-mini-row a {
    min-width: 0;
}

.category-mini-row img {
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
}

.category-mini-row span {
    display: block;
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.small-btn {
    min-height: 40px;
    padding: 0 16px;
}

.ranking-grid .movie-card {
    position: relative;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), #ef4444);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.3);
}

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

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

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

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: end;
    padding: clamp(24px, 5vw, 48px);
    border: 1px solid var(--line);
    border-radius: 32px;
    background:
        linear-gradient(130deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72)),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.24), transparent 28rem);
    box-shadow: var(--shadow);
}

.detail-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.36);
}

.detail-one-line {
    color: #dbeafe;
    font-size: 18px;
    line-height: 1.8;
}

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

.player-card {
    margin-top: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: rgba(2, 6, 23, 0.64);
    box-shadow: var(--shadow);
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: var(--white);
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 48px rgba(34, 211, 238, 0.34);
    font-size: 34px;
}

.video-overlay strong {
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(12px);
}

.detail-content {
    margin-top: 28px;
    padding: clamp(22px, 4vw, 36px);
}

.detail-content h2 {
    margin: 0 0 12px;
    color: var(--white);
    font-size: 26px;
}

.detail-content h2:not(:first-child) {
    margin-top: 28px;
}

.detail-content p {
    margin: 0;
    color: #cbd5e1;
    line-height: 2;
    font-size: 17px;
}

.related-shell {
    width: 100%;
}

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

.movie-card-compact .movie-desc {
    display: none;
}

.site-footer {
    margin-top: 56px;
    padding: 40px 0 26px;
    color: #cbd5e1;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

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

.footer-inner p {
    max-width: 560px;
    color: var(--muted);
    line-height: 1.8;
}

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

.footer-inner nav a {
    padding: 8px 12px;
    color: #cbd5e1;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
}

.footer-inner nav a:hover {
    color: var(--cyan);
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 0;
    color: #64748b;
    font-size: 13px;
}

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

@media (max-width: 1080px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 820px) {
    .header-inner {
        min-height: 64px;
    }

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

    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 64px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

    .main-nav.is-open {
        display: flex;
    }

    .hero-carousel {
        min-height: 720px;
        border-radius: 26px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        padding: 28px;
    }

    .hero-poster {
        justify-self: start;
        width: min(220px, 60vw);
        transform: none;
    }

    .hero-dots {
        left: 28px;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(260px, 80vw);
    }

    .footer-inner {
        flex-direction: column;
    }
}

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

    .wide-panel,
    .ranking-panel,
    .quick-search {
        padding: 16px;
    }

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

    .movie-card h3 {
        font-size: 15px;
    }

    .movie-desc {
        font-size: 13px;
    }

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

    .page-hero,
    .detail-layout,
    .hero-carousel,
    .section-shell {
        width: min(100% - 20px, 1180px);
    }

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

    .play-symbol {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
