:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #ecfeff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --cyan: #0891b2;
    --cyan-deep: #0e7490;
    --blue: #2563eb;
    --slate: #1e293b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, #f8fafc 0%, #eef7ff 36%, #f8fafc 100%);
    min-height: 100vh;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 10px 22px rgba(8, 145, 178, 0.22);
    font-size: 15px;
}

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

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: 0.24s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--cyan-deep);
    background: #ecfeff;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: #f1f5f9;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background: #0f172a;
    border-radius: 999px;
}

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

.home-hero {
    padding: 36px 0 10px;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.7s ease, transform 0.7s ease;
    display: flex;
    align-items: flex-end;
}

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

.hero-overlay,
.page-hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.64) 42%, rgba(8, 145, 178, 0.24) 100%);
}

.hero-content {
    position: relative;
    width: min(720px, 100%);
    padding: 48px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(8, 145, 178, 0.12);
    color: var(--cyan-deep);
    font-weight: 800;
    letter-spacing: 0.03em;
    font-size: 13px;
}

.hero-content .eyebrow,
.page-hero .eyebrow,
.detail-info .eyebrow {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.hero-content h2,
.page-hero h1,
.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.lead-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 22px;
}

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

.hero-tags span,
.genre-row span,
.movie-tags span,
.tag-cloud a {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.hero-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    font-weight: 900;
    transition: 0.24s ease;
}

.primary-button,
.hero-search button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 26px rgba(8, 145, 178, 0.24);
}

.primary-button:hover,
.hero-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(8, 145, 178, 0.32);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.52);
    color: #ffffff;
    font-size: 36px;
    cursor: pointer;
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: 0.24s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #ffffff;
}

.hero-search-panel {
    position: relative;
    z-index: 8;
    margin: -54px auto 0;
    width: min(1060px, calc(100% - 32px));
    padding: 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.hero-search-panel h1 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 46px);
    letter-spacing: -0.05em;
}

.hero-search-panel p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.8;
}

.hero-search {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.hero-search input,
.filter-grid input,
.filter-grid select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    min-height: 46px;
    padding: 0 14px;
    outline: none;
    transition: 0.2s ease;
}

.hero-search input:focus,
.filter-grid input:focus,
.filter-grid select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chips a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    transition: 0.24s ease;
}

.category-chips a:hover {
    color: var(--cyan-deep);
    background: #ecfeff;
}

.section-block {
    padding: 56px 0 0;
}

.soft-section {
    padding: 56px 24px 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(236, 254, 255, 0.8), rgba(239, 246, 255, 0.8));
    margin-top: 56px;
}

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

.section-head span {
    display: block;
    color: var(--cyan-deep);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

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

.section-head a,
.text-link {
    color: var(--cyan-deep);
    font-weight: 900;
}

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

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

.movie-card {
    background: var(--panel);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.82);
    transition: 0.28s ease;
}

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

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

.movie-poster img,
.wide-cover img,
.detail-cover img,
.category-cover-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.66) 100%);
    opacity: 0;
    transition: 0.28s ease;
}

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

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.86);
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    color: var(--cyan-deep);
    opacity: 0;
    transition: 0.28s ease;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-size: 12px;
    font-weight: 900;
}

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

.movie-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.movie-card h2 a:hover {
    color: var(--cyan-deep);
}

.movie-card p {
    margin: 0 0 12px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta,
.wide-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.movie-meta span,
.wide-meta span,
.detail-meta span {
    padding: 5px 8px;
    background: #f1f5f9;
    border-radius: 999px;
}

.movie-tags span,
.tag-cloud a {
    background: #f8fafc;
    color: #64748b;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.wide-cover {
    position: relative;
    min-height: 190px;
    background: #e2e8f0;
    overflow: hidden;
}

.wide-cover span {
    position: absolute;
    inset: auto 12px 12px auto;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--cyan-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wide-info {
    position: relative;
    padding: 20px 18px 20px 0;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
    margin-bottom: 12px;
}

.wide-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.wide-info h2 a:hover {
    color: var(--cyan-deep);
}

.wide-info p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero,
.detail-hero {
    position: relative;
    margin-top: 36px;
    padding: 56px;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #0e7490 55%, #2563eb);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.small-hero {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.page-hero > div {
    position: relative;
    z-index: 2;
    max-width: 780px;
}

.filter-shell {
    margin-top: 28px;
    padding: 20px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 14px;
}

.filter-grid label {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.empty-state {
    display: none;
    margin: 28px 0;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--muted);
    text-align: center;
    border: 1px solid var(--line);
}

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

.category-card {
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.category-cover-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 150px;
    background: #e2e8f0;
    overflow: hidden;
}

.category-card > div {
    padding: 20px;
}

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

.category-card p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.8;
}

.ranking-hero {
    background-size: cover;
    background-position: center;
}

.ranking-list {
    grid-template-columns: 1fr;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    background: linear-gradient(135deg, #0f172a 0%, #164e63 54%, #1d4ed8 100%);
}

.detail-cover {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.12);
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-meta {
    margin: 4px 0 14px;
}

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

.genre-row span {
    background: rgba(255, 255, 255, 0.14);
}

.detail-info .primary-button {
    margin-top: 24px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.18), rgba(2, 6, 23, 0.74));
    transition: 0.25s ease;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    pointer-events: none;
}

.player-play-icon {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 42px rgba(8, 145, 178, 0.32);
    font-size: 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    padding-top: 42px;
}

.detail-article,
.detail-side {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 26px;
    letter-spacing: -0.04em;
}

.detail-article p {
    margin: 0 0 24px;
    color: #334155;
    font-size: 17px;
    line-height: 2;
}

.detail-side dl {
    margin: 0 0 20px;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 10px 14px;
    line-height: 1.7;
}

.detail-side dt {
    color: var(--muted);
    font-weight: 800;
}

.detail-side dd {
    margin: 0;
    color: #0f172a;
    font-weight: 700;
}

.detail-side a:hover {
    color: var(--cyan-deep);
}

.site-footer {
    margin-top: 80px;
    background: #0f172a;
    color: #cbd5e1;
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: #ffffff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer p {
    color: #94a3b8;
    line-height: 1.8;
    max-width: 520px;
}

.site-footer h2 {
    color: #ffffff;
    font-size: 18px;
    margin: 0 0 14px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    text-align: center;
    padding: 22px 16px;
    color: #64748b;
}

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

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

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

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

    .detail-cover {
        max-width: 340px;
    }
}

@media (max-width: 760px) {
    .nav-shell {
        min-height: 66px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--shadow);
        border: 1px solid var(--line);
    }

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

    .hero-slider {
        height: 520px;
    }

    .hero-content,
    .page-hero,
    .detail-hero {
        padding: 28px;
    }

    .hero-arrow {
        display: none;
    }

    .hero-search {
        flex-direction: column;
    }

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

    .movie-grid,
    .compact-grid,
    .wide-list,
    .category-list,
    .filter-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .wide-card {
        grid-template-columns: 116px 1fr;
    }

    .wide-cover {
        min-height: 168px;
    }

    .brand {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    main,
    .nav-shell,
    .footer-grid {
        width: min(100% - 22px, 1180px);
    }

    .hero-slider {
        height: 500px;
        border-radius: 18px;
    }

    .hero-search-panel {
        width: calc(100% - 16px);
        padding: 18px;
    }

    .movie-card-body,
    .category-card > div,
    .detail-article,
    .detail-side {
        padding: 18px;
    }
}
