:root {
    --cyan: #06b6d4;
    --blue: #2563eb;
    --teal: #14b8a6;
    --purple: #7c3aed;
    --dark: #0f172a;
    --muted: #64748b;
    --light: #f8fafc;
    --card: #ffffff;
    --line: rgba(15, 23, 42, 0.1);
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--dark);
    background: #f8fafc;
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.96), rgba(37, 99, 235, 0.96), rgba(20, 184, 166, 0.96));
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: 0.02em;
}

.brand-text small {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.88;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 700;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #fef08a;
}

.header-search,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input {
    width: 260px;
    border: 0;
    outline: 0;
    color: #ffffff;
    border-radius: 999px;
    padding: 11px 92px 11px 18px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: rgba(255, 255, 255, 0.76);
}

.header-search button,
.mobile-search button {
    position: absolute;
    right: 4px;
    border: 0;
    color: #0f172a;
    font-weight: 800;
    border-radius: 999px;
    padding: 7px 14px;
    background: #fef08a;
    cursor: pointer;
}

.menu-button {
    display: none;
    border: 0;
    color: #ffffff;
    font-size: 26px;
    background: transparent;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 18px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.98), rgba(6, 182, 212, 0.98));
}

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

.mobile-search input {
    width: 100%;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #22d3ee 0%, #2563eb 52%, #7c3aed 100%);
}

.hero-glow {
    position: absolute;
    inset: -160px -80px auto auto;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    background: rgba(254, 240, 138, 0.3);
    filter: blur(80px);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.24;
    background-image: linear-gradient(45deg, rgba(255,255,255,0.22) 12.5%, transparent 12.5%, transparent 50%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0.22) 62.5%, transparent 62.5%, transparent 100%);
    background-size: 44px 44px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transform: translateX(28px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

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

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
    gap: 56px;
    align-items: center;
    padding: 72px 0;
}

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

.hero-eyebrow,
.page-hero span,
.detail-tags span,
.hero-tags span,
.tag-row span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.hero-eyebrow {
    margin-bottom: 18px;
    padding: 7px 14px;
    color: #e0f2fe;
    font-size: 14px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.hero-tags span {
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    background: rgba(15, 23, 42, 0.32);
}

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

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

.primary-button {
    color: #0f172a;
    background: #fef08a;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.hero-poster {
    position: relative;
    display: block;
    min-height: 500px;
    overflow: hidden;
    border-radius: 34px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 500px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.72));
}

.hero-poster span {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 999px;
    color: #0f172a;
    font-size: 24px;
    background: #fef08a;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

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

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

.hero-dots button {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

.hero-dots button.is-active {
    background: #fef08a;
}

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

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

.quick-grid a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(14px);
}

.quick-grid strong {
    font-size: 18px;
}

.quick-grid span {
    color: var(--muted);
    font-size: 14px;
}

.section {
    padding: 76px 0;
}

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

.section-head.compact {
    align-items: center;
}

.section-head h2,
.page-hero h1,
.detail-copy h1 {
    margin: 0 0 8px;
    color: var(--dark);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p {
    margin: 0;
    color: var(--muted);
}

.section-head a {
    color: var(--blue);
    font-weight: 900;
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 100%;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 64px rgba(37, 99, 235, 0.18);
}

.movie-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.18));
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.56));
}

.play-mark {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #0f172a;
    background: #fef08a;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.movie-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

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

.tag-row span,
.tag-cloud span {
    padding: 4px 9px;
    color: #0e7490;
    font-size: 12px;
    font-weight: 800;
    background: #cffafe;
}

.movie-info h3 {
    display: -webkit-box;
    min-height: 52px;
    margin: 12px 0 8px;
    overflow: hidden;
    font-size: 19px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info p,
.compact-body p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta,
.compact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.category-section {
    background: #ffffff;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #ffffff;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.78));
}

.category-card span,
.category-card p {
    position: absolute;
    left: 20px;
    right: 20px;
}

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

.category-card p {
    bottom: 20px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

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

.ranking-section {
    background: linear-gradient(180deg, #ffffff, #eff6ff);
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) 360px;
    gap: 24px;
}

.ranking-main,
.ranking-aside,
.info-panel,
.side-list,
.detail-block {
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.ranking-main {
    padding: 28px;
}

.ranking-aside,
.info-panel,
.side-list {
    padding: 22px;
}

.ranking-list,
.side-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compact-card {
    position: relative;
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.compact-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 10;
}

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

.compact-body h3 {
    margin: 0 0 6px;
    font-size: 15px;
    line-height: 1.35;
}

.compact-body p {
    margin: 0 0 8px;
    font-size: 13px;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: #0f172a;
    background: #fef08a;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.page-hero,
.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #2563eb 55%, #7c3aed);
}

.page-hero::before,
.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image: radial-gradient(circle at 20% 20%, #ffffff 0 2px, transparent 3px), radial-gradient(circle at 80% 30%, #ffffff 0 2px, transparent 3px);
    background-size: 76px 76px;
}

.page-hero .container,
.detail-hero .container {
    position: relative;
    padding: 70px 0;
}

.page-hero.slim .container {
    padding: 58px 0;
}

.page-hero span {
    margin-bottom: 12px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.18);
}

.page-hero h1,
.detail-copy h1 {
    color: #ffffff;
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.breadcrumb {
    display: inline-flex;
    margin-bottom: 14px;
    color: #fef08a;
    font-weight: 900;
}

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

.overview-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.overview-cover {
    overflow: hidden;
    border-radius: 20px;
    aspect-ratio: 16 / 11;
}

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

.overview-card h2 {
    margin: 0 0 8px;
}

.overview-card p {
    margin: 0 0 12px;
    color: var(--muted);
}

.overview-card ul {
    margin: 0;
    padding-left: 18px;
}

.overview-card li {
    margin: 4px 0;
    color: #2563eb;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 190px 190px 160px;
    gap: 14px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    outline: 0;
    padding: 12px 16px;
    color: #0f172a;
    background: #f8fafc;
}

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

.empty-state.is-visible {
    display: block;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 46px;
    align-items: center;
}

.breadcrumb-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.breadcrumb-row a:hover {
    color: #fef08a;
}

.detail-copy p {
    max-width: 780px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
}

.detail-tags span {
    padding: 7px 12px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.16);
}

.detail-poster {
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
    transform: rotate(2deg);
}

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

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

.detail-main {
    min-width: 0;
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.72));
    cursor: pointer;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #0f172a;
    font-size: 32px;
    background: #fef08a;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.player-overlay strong {
    font-size: 20px;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.detail-block {
    margin-bottom: 22px;
    padding: 28px;
}

.detail-block h2,
.info-panel h2,
.side-list h2,
.ranking-aside h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.detail-block p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 14px;
    margin: 0;
}

.info-panel dt {
    color: var(--muted);
    font-weight: 800;
}

.info-panel dd {
    margin: 0;
    color: #0f172a;
}

.info-panel a {
    color: var(--blue);
    font-weight: 900;
}

.detail-aside {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #172554 55%, #164e63);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 42px;
    padding: 52px 0 34px;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.site-footer p {
    max-width: 520px;
    margin: 14px 0 0;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
}

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

.footer-bottom {
    padding: 18px 0 24px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

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

    .menu-button {
        display: block;
    }

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

    .hero-poster {
        min-height: 360px;
        transform: none;
    }

    .hero-poster img {
        min-height: 360px;
    }

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

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

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

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

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

    .header-inner {
        min-height: 66px;
    }

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

    .brand-icon {
        width: 38px;
        height: 38px;
    }

    .hero {
        min-height: 760px;
    }

    .hero-grid {
        gap: 28px;
        padding: 48px 0 78px;
    }

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

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

    .hero-actions,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

    .quick-grid,
    .card-grid,
    .featured-grid,
    .ranking-grid,
    .category-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 52px 0;
    }

    .compact-card,
    .overview-card {
        grid-template-columns: 100px minmax(0, 1fr);
    }

    .overview-card {
        gap: 14px;
    }

    .detail-poster {
        max-width: 220px;
        transform: none;
    }

    .detail-poster img {
        height: 300px;
    }

    .detail-block,
    .ranking-main,
    .ranking-aside,
    .info-panel,
    .side-list {
        padding: 20px;
    }
}
