:root {
    --teal: #0f766e;
    --cyan: #0891b2;
    --emerald: #059669;
    --rose: #e11d48;
    --orange: #f97316;
    --amber: #f59e0b;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.24);
}

.header-inner {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.logo-icon {
    color: #fde68a;
    transition: transform 0.2s ease;
}

.logo:hover .logo-icon {
    transform: rotate(12deg) scale(1.1);
}

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

.main-nav a,
.nav-dropdown > a {
    transition: color 0.2s ease;
}

.main-nav a:hover,
.nav-dropdown:hover > a {
    color: #fde68a;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 190px;
    padding: 10px;
    color: var(--ink);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-panel a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: #334155;
}

.nav-dropdown-panel a:hover {
    color: var(--teal);
    background: #ecfeff;
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.filter-bar input {
    width: 260px;
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    font: inherit;
    outline: none;
    color: var(--ink);
    background: #ffffff;
}

.header-search button,
.primary-btn,
.ghost-btn,
.text-link {
    border: 0;
    border-radius: 999px;
    padding: 11px 20px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.22);
}

.header-search button {
    color: var(--teal);
    background: #fde68a;
}

.primary-btn:hover,
.header-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(8, 145, 178, 0.28);
}

.primary-btn.small {
    padding: 9px 16px;
    font-size: 14px;
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

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

.text-link {
    display: inline-flex;
    color: var(--teal);
    background: #ccfbf1;
}

.menu-toggle {
    display: none;
    color: #ffffff;
    border: 0;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    max-width: 1280px;
    margin: 0 auto;
}

.mobile-nav a {
    display: block;
    padding: 10px 0;
    font-weight: 700;
}

.hero-shell {
    background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.34), transparent 36%), #111827;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
    align-items: center;
    gap: 42px;
    padding: 72px max(24px, calc((100vw - 1280px) / 2 + 24px));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-bg {
    background-size: cover;
    background-position: center;
    filter: blur(12px) saturate(1.2);
    transform: scale(1.08);
    opacity: 0.42;
}

.hero-overlay {
    background:
        linear-gradient(90deg, rgba(249, 115, 22, 0.82), rgba(225, 29, 72, 0.82) 48%, rgba(8, 145, 178, 0.82)),
        rgba(0, 0, 0, 0.18);
}

.hero-content,
.hero-poster {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fef3c7;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(34px, 5.2vw, 72px);
    line-height: 1.08;
    color: #ffffff;
    text-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.hero-content p {
    max-width: 720px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
}

.hero-meta,
.movie-meta-line,
.detail-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin: 22px 0;
}

.hero-meta span {
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

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

.hero-poster {
    display: block;
    height: 410px;
    border-radius: 30px;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #fbcfe8, #a5f3fc);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
}

.hero-poster img {
    transition: transform 0.35s ease;
}

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

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

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

.hero-dot.is-active {
    width: 36px;
    background: #ffffff;
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.section-soft,
.section-categories {
    max-width: none;
    background: linear-gradient(180deg, #ecfeff, #ffffff);
}

.section-soft > *,
.section-categories > * {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.section-heading {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.section-heading-left {
    margin-left: 0;
    text-align: left;
}

.section-heading span,
.panel-title span,
.category-overview-head span {
    color: var(--teal);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-heading h2,
.category-overview-head h2,
.content-card h2 {
    margin: 8px 0 10px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.16;
}

.section-heading p,
.category-overview-head p,
.site-footer p,
.movie-card p,
.content-card p {
    color: var(--muted);
}

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

.category-tile {
    min-height: 160px;
    padding: 24px;
    color: #ffffff;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--cyan), var(--teal), var(--emerald));
    box-shadow: 0 20px 42px rgba(20, 184, 166, 0.22);
    transition: all 0.2s ease;
}

.category-tile:nth-child(3n + 1) {
    background: linear-gradient(135deg, var(--orange), var(--rose));
}

.category-tile:nth-child(3n + 2) {
    background: linear-gradient(135deg, #2563eb, var(--cyan));
}

.category-tile:hover {
    transform: translateY(-6px) rotate(-1deg);
    box-shadow: 0 28px 55px rgba(20, 184, 166, 0.28);
}

.category-tile span {
    display: block;
    font-size: 22px;
    font-weight: 900;
}

.category-tile small {
    display: block;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.84);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: all 0.22s ease;
}

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

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #a5f3fc, #fed7aa);
}

.movie-cover img,
.detail-poster img,
.hero-poster img {
    background: linear-gradient(135deg, #ccfbf1, #a5f3fc, #fed7aa);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.52));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.play-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: var(--rose);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: all 0.2s ease;
}

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

.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 5px 10px;
    color: #ffffff;
    background: var(--orange);
    border-radius: 999px;
    font-weight: 900;
    font-size: 12px;
}

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

.movie-meta-line {
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
}

.movie-meta-line span {
    padding: 3px 8px;
    border-radius: 999px;
    background: #ecfeff;
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 19px;
    line-height: 1.32;
}

.movie-card h3 a:hover {
    color: var(--teal);
}

.movie-card p {
    min-height: 52px;
    margin: 0 0 12px;
    font-size: 14px;
}

.movie-card--compact .movie-card-body {
    padding: 14px;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
}

.tag-row-large span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hot-panel {
    position: sticky;
    top: 88px;
    padding: 22px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.panel-title,
.category-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.panel-title a {
    color: var(--cyan);
    font-weight: 800;
}

.rank-list {
    display: grid;
    gap: 10px;
}

.rank-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: #f8fafc;
}

.rank-number {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange), var(--rose));
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    color: var(--muted);
    font-size: 12px;
}

.page-hero {
    min-height: 310px;
    display: grid;
    align-items: center;
    padding: 70px max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
}

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

.page-hero-rose {
    background: linear-gradient(135deg, var(--orange), var(--rose));
}

.page-hero-cyan {
    background: linear-gradient(135deg, #2563eb, var(--cyan), var(--teal));
}

.page-hero-teal {
    background: linear-gradient(135deg, var(--teal), var(--emerald));
}

.filter-bar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar label {
    display: grid;
    gap: 8px;
    color: var(--teal);
    font-weight: 900;
}

.filter-bar input {
    width: min(580px, 72vw);
    border: 1px solid var(--line);
    background: #f8fafc;
}

.filter-count {
    margin: -10px 0 22px;
    color: var(--muted);
    font-weight: 700;
}

.category-overview-list {
    display: grid;
    gap: 28px;
}

.category-overview-block {
    padding: 26px;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.88), rgba(225, 29, 72, 0.76));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 34px 24px 64px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 26px;
    color: rgba(255, 255, 255, 0.82);
}

.breadcrumbs a:hover {
    color: #fde68a;
}

.detail-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 28px;
    background: linear-gradient(135deg, #ccfbf1, #fed7aa);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.detail-one-line {
    max-width: 850px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

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

.detail-meta-grid span {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.detail-meta-grid strong {
    display: block;
    color: #fde68a;
    font-size: 12px;
}

.detail-section {
    display: grid;
    gap: 28px;
}

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: #ffffff;
    border: 0;
    background: radial-gradient(circle at center, rgba(15, 118, 110, 0.54), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    font: inherit;
}

.player-start span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    color: var(--rose);
    background: #ffffff;
    border-radius: 50%;
    font-size: 34px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.25);
}

.player-start strong {
    font-size: 22px;
}

.player-card.is-playing .player-start {
    display: none;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.content-card {
    padding: 26px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.content-card-warm {
    background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 32px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #fde68a;
}

.is-hidden-by-filter {
    display: none;
}

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

    .two-column-layout {
        grid-template-columns: 1fr;
    }

    .hot-panel {
        position: static;
    }

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

@media (max-width: 860px) {
    .header-inner {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        gap: 12px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .main-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

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

    .hero-slider {
        min-height: 680px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 46px;
        padding-bottom: 70px;
    }

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

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

    .detail-layout,
    .detail-text-grid,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-bar input {
        width: 100%;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .section {
        padding: 44px 16px;
    }

    .header-inner,
    .mobile-nav,
    .detail-hero-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .logo {
        font-size: 20px;
    }

    .hero-content p,
    .page-hero p,
    .detail-one-line {
        font-size: 16px;
    }

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

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

    .rank-score {
        grid-column: 2;
    }

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