:root {
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --accent-50: #ecfdf5;
    --accent-500: #10b981;
    --accent-600: #059669;
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-300: #cbd5e1;
    --secondary-500: #64748b;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    --white: #ffffff;
    --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
    --shadow-medium: 0 4px 20px -2px rgba(0, 0, 0, 0.1), 0 12px 28px -4px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 28px 80px rgba(15, 23, 42, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--secondary-50);
    color: var(--secondary-800);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(203, 213, 225, 0.7);
    backdrop-filter: blur(18px);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--secondary-900);
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
    box-shadow: var(--shadow-soft);
}

.logo-text,
.footer-logo {
    font-size: 20px;
    letter-spacing: 0.5px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    color: var(--secondary-700);
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--primary-600);
}

.header-search {
    display: flex;
    align-items: center;
    width: 300px;
    border: 1px solid var(--secondary-300);
    background: var(--white);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.header-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 10px 14px 10px 18px;
    background: transparent;
}

.header-search button,
.page-search button {
    border: 0;
    color: var(--white);
    background: var(--primary-600);
    padding: 10px 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.header-search button:hover,
.page-search button:hover {
    background: var(--primary-700);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--secondary-100);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--secondary-800);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    background: var(--white);
    border-top: 1px solid var(--secondary-100);
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    font-weight: 650;
    color: var(--secondary-700);
}

.mobile-nav.is-open {
    display: block;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 48%, var(--secondary-900));
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.28), transparent 26%),
        radial-gradient(circle at 18% 72%, rgba(16, 185, 129, 0.34), transparent 34%),
        linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.2));
}

.hero-inner {
    position: relative;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px 0 54px;
}

.hero-slides {
    position: relative;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 72px;
    align-items: center;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeIn 0.45s ease both;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--primary-100);
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -1.2px;
}

.hero h2 {
    margin: 18px 0 14px;
    font-size: clamp(26px, 3vw, 42px);
    color: var(--primary-100);
}

.hero-copy p:not(.eyebrow) {
    max-width: 680px;
    margin: 0;
    color: #dbeafe;
    font-size: 18px;
}

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

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

.primary-button {
    color: var(--primary-700);
    background: var(--white);
    box-shadow: var(--shadow-medium);
}

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

.ghost-button {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.1);
}

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

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

.hero-tags span,
.tag-row span,
.info-card dd a,
.info-card dd span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: var(--primary-700);
    font-size: 13px;
    font-weight: 700;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.hero-poster {
    position: relative;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transform: rotate(1.5deg);
    transition: transform 0.3s ease;
}

.hero-poster:hover {
    transform: rotate(0deg) scale(1.025);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 0.72;
    object-fit: cover;
}

.hero-poster span {
    position: absolute;
    left: 22px;
    bottom: 22px;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(2, 132, 199, 0.92);
    font-weight: 800;
    box-shadow: var(--shadow-medium);
}

.hero-controls {
    display: flex;
    gap: 10px;
    margin-top: 38px;
}

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

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

.quick-panel {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.quick-grid a {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    color: var(--secondary-900);
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow-medium);
    font-weight: 800;
    transition: transform 0.2s ease, color 0.2s ease;
}

.quick-grid a:hover {
    color: var(--primary-600);
    transform: translateY(-3px);
}

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

.soft-bg {
    background: var(--white);
}

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

.section-head h2,
.genre-band h2,
.story-card h2,
.info-card h2,
.site-footer h2 {
    margin: 0;
    color: var(--secondary-900);
    line-height: 1.25;
}

.section-head h2 {
    font-size: clamp(25px, 3vw, 34px);
}

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

.section-head a {
    color: var(--primary-600);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 230px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    overflow: hidden;
    border-radius: 22px;
    color: var(--white);
    background: var(--secondary-900);
    box-shadow: var(--shadow-soft);
}

.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.86));
}

.category-card span,
.category-card p {
    position: relative;
    z-index: 1;
}

.category-card span {
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 8px 0 0;
    color: #dbeafe;
    font-size: 14px;
}

.category-card:hover img {
    opacity: 0.62;
    transform: scale(1.08);
}

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

.movie-card {
    min-width: 0;
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--secondary-900);
}

.card-poster img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.play-chip,
.rank-badge {
    position: absolute;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 850;
}

.play-chip {
    right: 12px;
    bottom: 12px;
    min-height: 32px;
    padding: 0 12px;
    color: var(--white);
    background: rgba(2, 132, 199, 0.94);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 36px;
    height: 36px;
    color: var(--secondary-900);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    color: var(--secondary-900);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.35;
}

.card-title:hover {
    color: var(--primary-600);
}

.card-meta {
    margin: 6px 0;
    color: var(--secondary-500);
    font-size: 14px;
}

.card-desc {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--secondary-700);
    font-size: 14px;
}

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

.genre-band {
    padding: 58px 0;
    background: linear-gradient(135deg, var(--secondary-900), var(--primary-700));
    color: var(--white);
}

.genre-band h2 {
    color: var(--white);
    font-size: 32px;
    margin-bottom: 22px;
}

.genre-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.genre-links a {
    padding: 10px 18px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
}

.genre-links a:hover {
    background: rgba(255, 255, 255, 0.22);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700) 48%, var(--secondary-900));
}

.page-hero {
    padding: 76px 0 84px;
}

.slim-hero {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-900));
}

.accent-hero {
    background: linear-gradient(135deg, var(--accent-600), var(--secondary-900));
}

.rank-hero {
    background: radial-gradient(circle at 80% 10%, rgba(255,255,255,0.22), transparent 28%), linear-gradient(135deg, #7c2d12, var(--secondary-900));
}

.library-hero {
    background: radial-gradient(circle at 80% 10%, rgba(255,255,255,0.22), transparent 28%), linear-gradient(135deg, var(--primary-700), var(--accent-600));
}

.search-hero {
    background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.2), transparent 28%), linear-gradient(135deg, var(--secondary-900), var(--primary-700));
}

.page-hero p {
    max-width: 780px;
    color: #dbeafe;
    font-size: 18px;
}

.page-search {
    display: flex;
    width: min(620px, 100%);
    margin-top: 28px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-medium);
}

.page-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 14px 18px;
}

.search-status {
    margin-bottom: 22px;
    padding: 14px 18px;
    color: var(--secondary-700);
    border: 1px solid var(--secondary-100);
    border-radius: 14px;
    background: var(--white);
}

.movie-card.is-hidden {
    display: none;
}

.detail-hero {
    min-height: 560px;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(24px);
    transform: scale(1.08);
    opacity: 0.42;
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.58));
}

.detail-hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 52px;
    align-items: center;
    padding: 76px 0;
}

.detail-poster img {
    width: 100%;
    border-radius: 24px;
    box-shadow: var(--shadow-strong);
}

.detail-intro .eyebrow a {
    color: var(--primary-100);
}

.detail-line {
    max-width: 850px;
    margin: 20px 0 0;
    color: #e0f2fe;
    font-size: 20px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 18px;
}

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-weight: 750;
}

.detail-tags span {
    background: rgba(255, 255, 255, 0.16);
    color: var(--white);
}

.detail-intro .primary-button {
    margin-top: 28px;
}

.player-section {
    padding: 56px 0 26px;
    background: var(--secondary-900);
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow-strong);
}

.movie-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.54));
    cursor: pointer;
}

.player-play span {
    width: 86px;
    height: 86px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-medium);
    position: relative;
}

.player-play span::after {
    content: "";
    position: absolute;
    left: 35px;
    top: 25px;
    border-left: 25px solid var(--primary-600);
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
}

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

.player-loading,
.player-error {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 10px 14px;
    border-radius: 12px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.82);
    font-weight: 750;
}

.player-error {
    background: rgba(185, 28, 28, 0.9);
}

.detail-content {
    padding: 62px 0;
}

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

.story-card,
.info-card {
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.story-card {
    padding: 34px;
}

.story-card h2 + p {
    margin-top: 12px;
}

.story-card p {
    margin: 0 0 28px;
    color: var(--secondary-700);
    font-size: 17px;
}

.info-card {
    padding: 26px;
    position: sticky;
    top: 96px;
}

.info-card dl {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px 16px;
    margin: 18px 0 0;
}

.info-card dt {
    color: var(--secondary-500);
    font-weight: 800;
}

.info-card dd {
    margin: 0;
    color: var(--secondary-800);
    font-weight: 650;
}

.info-card dd a,
.info-card dd span {
    margin: 0 6px 6px 0;
}

.site-footer {
    padding: 52px 0;
    color: var(--secondary-300);
    background: var(--secondary-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) 1fr 1fr;
    gap: 34px;
}

.footer-logo {
    color: var(--white);
    margin-bottom: 12px;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: var(--secondary-300);
}

.site-footer h2 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .hero-slide {
        grid-template-columns: 1fr 320px;
        gap: 42px;
    }

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

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

@media (max-width: 820px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .header-search {
        order: 3;
        width: 100%;
    }

    .hero,
    .hero-inner {
        min-height: auto;
    }

    .hero-slide.is-active,
    .detail-hero-inner,
    .detail-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        max-width: 360px;
        margin: 0 auto;
    }

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

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

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

    .info-card {
        position: static;
    }
}

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

    .quick-grid,
    .category-grid,
    .movie-grid,
    .large-list {
        grid-template-columns: 1fr;
    }

    .hero-inner,
    .page-hero,
    .detail-hero-inner {
        padding-top: 48px;
        padding-bottom: 48px;
    }

    .hero-actions,
    .page-search {
        flex-direction: column;
    }

    .page-search button,
    .header-search button {
        width: auto;
    }

    .story-card,
    .info-card {
        padding: 22px;
    }

    .player-play span {
        width: 66px;
        height: 66px;
    }

    .player-play span::after {
        left: 27px;
        top: 19px;
        border-left-width: 20px;
        border-top-width: 14px;
        border-bottom-width: 14px;
    }
}
