:root {
    --deepblue-950: #031120;
    --deepblue-900: #06203a;
    --deepblue-850: #092a4a;
    --deepblue-800: #0c3458;
    --ocean-700: #0e7490;
    --ocean-600: #0891b2;
    --ocean-500: #06b6d4;
    --ocean-400: #38bdf8;
    --ocean-300: #7dd3fc;
    --ocean-200: #bae6fd;
    --teal-500: #14b8a6;
    --gold: #facc15;
    --rose: #fb7185;
    --white: #ffffff;
    --muted: rgba(226, 246, 255, 0.72);
    --line: rgba(125, 211, 252, 0.18);
    --panel: rgba(8, 31, 54, 0.78);
    --panel-strong: rgba(8, 31, 54, 0.94);
    --shadow-ocean: 0 24px 80px rgba(14, 116, 144, 0.28);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--white);
    background:
        radial-gradient(circle at 20% 5%, rgba(20, 184, 166, 0.18), transparent 30%),
        radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.18), transparent 30%),
        linear-gradient(180deg, var(--deepblue-950) 0%, var(--deepblue-900) 45%, var(--deepblue-950) 100%);
    min-height: 100vh;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(4, 17, 32, 0.96), rgba(9, 42, 74, 0.94), rgba(14, 116, 144, 0.88));
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-ocean);
}

.header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ocean-400), var(--teal-500));
    box-shadow: 0 14px 36px rgba(6, 182, 212, 0.38);
}

.brand-text strong {
    display: block;
    font-size: 21px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-text span {
    display: block;
    margin-top: 3px;
    color: var(--ocean-200);
    font-size: 12px;
    white-space: nowrap;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    color: var(--ocean-100, #e0f7ff);
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
    color: var(--white);
    transform: translateY(-1px);
}

.header-search {
    position: relative;
    width: min(260px, 26vw);
}

.header-search input,
.search-hero input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    color: var(--white);
    background: rgba(3, 17, 32, 0.72);
    border: 1px solid rgba(125, 211, 252, 0.35);
    border-radius: 999px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    padding: 11px 44px 11px 18px;
}

.header-search input::placeholder,
.search-hero input::placeholder,
.filter-bar input::placeholder {
    color: rgba(186, 230, 253, 0.62);
}

.header-search input:focus,
.search-hero input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--ocean-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
    background: rgba(3, 17, 32, 0.92);
}

.header-search button {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    color: var(--white);
    background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--white);
    background: rgba(8, 31, 54, 0.72);
    cursor: pointer;
}

main {
    padding-top: 74px;
}

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

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

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

.hero-slide img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.12) contrast(1.04);
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(3, 17, 32, 0.96) 0%, rgba(3, 17, 32, 0.72) 38%, rgba(3, 17, 32, 0.20) 72%),
        linear-gradient(0deg, var(--deepblue-950) 0%, rgba(3, 17, 32, 0.24) 52%, rgba(3, 17, 32, 0.62) 100%);
}

.hero-content {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    padding: 84px 0 96px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ocean-200);
    background: rgba(14, 116, 144, 0.18);
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy p {
    color: var(--ocean-200);
    font-size: clamp(17px, 2.2vw, 22px);
    line-height: 1.8;
    max-width: 640px;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pill,
.rank-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--ocean-100, #e0f7ff);
    background: rgba(8, 52, 88, 0.76);
    border: 1px solid rgba(125, 211, 252, 0.16);
    font-size: 13px;
    font-weight: 700;
}

.pill.hot {
    color: #fff7d1;
    background: rgba(250, 204, 21, 0.18);
    border-color: rgba(250, 204, 21, 0.28);
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0 22px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
    box-shadow: 0 16px 36px rgba(6, 182, 212, 0.32);
}

.btn-ghost {
    color: var(--ocean-100, #e0f7ff);
    background: rgba(8, 31, 54, 0.58);
    border-color: rgba(125, 211, 252, 0.28);
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(186, 230, 253, 0.32);
}

.hero-dot.is-active {
    background: var(--ocean-400);
}

.section {
    padding: 58px 0;
}

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

.section-kicker {
    display: block;
    color: var(--ocean-300);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.section-head h2,
.detail-block h2,
.player-section h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-card p,
.detail-block p,
.search-hero p {
    color: var(--muted);
    line-height: 1.8;
}

.movie-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 1fr);
    gap: 18px;
    overflow-x: auto;
    padding: 8px 2px 20px;
    scroll-snap-type: x mandatory;
}

.movie-row .movie-card {
    scroll-snap-align: start;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(8, 31, 54, 0.72);
    border: 1px solid var(--line);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 28px 70px rgba(6, 182, 212, 0.22);
}

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.28), transparent 30%),
        linear-gradient(135deg, rgba(8, 52, 88, 0.98), rgba(3, 17, 32, 0.98));
}

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

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

.poster-label {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--white);
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.95), rgba(20, 184, 166, 0.95));
    box-shadow: 0 10px 24px rgba(6, 182, 212, 0.28);
}

.card-body {
    padding: 14px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.category-card {
    position: relative;
    min-height: 178px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    padding: 24px;
    background:
        radial-gradient(circle at 80% 15%, rgba(56, 189, 248, 0.28), transparent 30%),
        linear-gradient(135deg, rgba(8, 52, 88, 0.94), rgba(4, 17, 32, 0.94));
    border: 1px solid var(--line);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5);
}

.category-card strong {
    display: block;
    font-size: 26px;
    margin-bottom: 12px;
}

.category-card span {
    display: inline-flex;
    margin-top: 18px;
    color: var(--ocean-200);
    font-weight: 800;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 72px 74px 1fr auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 12px;
    background: rgba(8, 31, 54, 0.68);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-item:hover {
    transform: translateX(5px);
    border-color: rgba(56, 189, 248, 0.45);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.28), rgba(6, 182, 212, 0.24));
    color: #fff7d1;
}

.rank-cover {
    width: 64px;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: var(--deepblue-800);
}

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

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 19px;
}

.rank-info p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.page-hero,
.search-hero,
.detail-hero {
    padding: 86px 0 42px;
    background:
        radial-gradient(circle at 12% 20%, rgba(20, 184, 166, 0.18), transparent 28%),
        radial-gradient(circle at 84% 6%, rgba(56, 189, 248, 0.18), transparent 28%);
}

.page-hero .container,
.search-hero .container {
    max-width: 980px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--ocean-200);
    font-size: 14px;
    margin-bottom: 18px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    padding: 16px;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(8, 31, 54, 0.62);
}

.filter-bar input,
.filter-bar select {
    border-radius: 16px;
    padding: 12px 14px;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 34px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 2 / 3;
    border: 1px solid rgba(125, 211, 252, 0.25);
    background: rgba(8, 52, 88, 0.8);
    box-shadow: var(--shadow-ocean);
}

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

.detail-title p {
    color: var(--ocean-200);
    line-height: 1.85;
    font-size: 18px;
    max-width: 820px;
}

.player-section {
    padding: 34px 0 54px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(125, 211, 252, 0.24);
    background: #000;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

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

.play-mask {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background:
        radial-gradient(circle at center, rgba(6, 182, 212, 0.20), transparent 32%),
        linear-gradient(180deg, rgba(3, 17, 32, 0.42), rgba(3, 17, 32, 0.78));
}

.play-mask span {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
    box-shadow: 0 18px 44px rgba(6, 182, 212, 0.36);
    font-size: 30px;
    padding-left: 4px;
}

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

.player-shell.is-playing .play-mask {
    display: none;
}

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

.detail-panel,
.side-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 26px;
    background: var(--panel);
}

.detail-block + .detail-block {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.side-list {
    display: grid;
    gap: 14px;
}

.side-link {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: rgba(8, 52, 88, 0.52);
    border: 1px solid rgba(125, 211, 252, 0.12);
}

.side-link:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.side-link img {
    width: 58px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: var(--deepblue-800);
}

.side-link strong {
    display: block;
    margin-bottom: 5px;
}

.side-link span {
    color: var(--muted);
    font-size: 13px;
}

.search-hero form {
    position: relative;
    margin-top: 26px;
}

.search-hero input {
    padding: 17px 130px 17px 20px;
    font-size: 17px;
}

.search-hero button {
    position: absolute;
    top: 8px;
    right: 8px;
    bottom: 8px;
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    color: var(--white);
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
}

.empty-state {
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    color: var(--muted);
    background: rgba(8, 31, 54, 0.62);
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(8, 31, 54, 0.72), rgba(3, 17, 32, 0.98));
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 26px;
    padding: 46px 0;
}

.footer-grid h3,
.footer-grid h4 {
    margin: 0 0 14px;
}

.footer-grid p,
.footer-grid a {
    color: var(--muted);
    line-height: 1.8;
}

.footer-grid a:hover {
    color: var(--white);
}

.copyright {
    border-top: 1px solid var(--line);
    padding: 18px 0 24px;
    color: rgba(186, 230, 253, 0.64);
    font-size: 14px;
}

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .site-header .mobile-panel {
        display: none;
        position: absolute;
        left: 16px;
        right: 16px;
        top: 82px;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: var(--panel-strong);
        box-shadow: var(--shadow-ocean);
    }

    body.nav-open .site-header .mobile-panel {
        display: grid;
        gap: 14px;
    }

    .mobile-panel a {
        padding: 13px 14px;
        border-radius: 14px;
        background: rgba(8, 52, 88, 0.62);
        color: var(--ocean-100, #e0f7ff);
        font-weight: 800;
    }

    .mobile-panel form {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
    }

    .mobile-panel input {
        min-width: 0;
        border: 1px solid var(--line);
        border-radius: 14px;
        padding: 12px 14px;
        color: var(--white);
        background: rgba(3, 17, 32, 0.72);
    }

    .mobile-panel button {
        border: 0;
        border-radius: 14px;
        color: var(--white);
        padding: 0 16px;
        background: linear-gradient(135deg, var(--ocean-500), var(--teal-500));
    }

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

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

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

    .rank-item {
        grid-template-columns: 48px 58px 1fr;
    }

    .rank-item .btn {
        grid-column: 2 / -1;
    }

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

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

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

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

    .brand-text span {
        display: none;
    }

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

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

    .movie-row {
        grid-auto-columns: minmax(168px, 1fr);
    }

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

    .section {
        padding: 40px 0;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .search-hero input {
        padding-right: 18px;
    }

    .search-hero button {
        position: static;
        width: 100%;
        min-height: 48px;
        margin-top: 12px;
    }

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