:root {
    --brand: #facc15;
    --brand-deep: #f59e0b;
    --orange: #fb923c;
    --ink: #111827;
    --muted: #6b7280;
    --panel: #ffffff;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 26px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: #f7f7f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, var(--brand), var(--orange), var(--brand-deep));
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.28);
}

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

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

.logo-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #111827;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    transition: transform 0.3s ease;
}

.logo:hover .logo-mark {
    transform: scale(1.1) rotate(-6deg);
}

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

.nav-links a {
    position: relative;
    opacity: 0.96;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    opacity: 1;
    transform: translateY(-1px);
}

.nav-links a.active::after,
.nav-links a:hover::after {
    position: absolute;
    right: 0;
    bottom: -8px;
    left: 0;
    height: 3px;
    content: "";
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.12);
    border: 0;
    border-radius: 12px;
}

.mobile-menu {
    display: none;
    padding: 0 0 16px;
}

.mobile-menu a {
    display: block;
    padding: 10px 0;
    font-weight: 700;
    color: #ffffff;
}

.main {
    min-height: 70vh;
}

.hero-section {
    padding: 28px 0 40px;
    background: linear-gradient(180deg, rgba(250, 204, 21, 0.16), rgba(255, 255, 255, 0));
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 56px;
    pointer-events: none;
    opacity: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transform: scale(1.04);
    transition: opacity 0.55s ease, transform 0.8s ease;
}

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

.hero-slide::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

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

.hero-kicker,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    color: #111827;
    background: var(--brand);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-title {
    margin: 18px 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.86);
}

.hero-meta span {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(8px);
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

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

.btn-primary {
    color: #111827;
    background: var(--brand);
    box-shadow: 0 12px 22px rgba(250, 204, 21, 0.32);
}

.btn-primary:hover {
    background: #fbbf24;
    transform: translateY(-2px) scale(1.02);
}

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

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #ffffff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.46);
    border: 0;
    border-radius: 999px;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-50%) scale(1.04);
}

.hero-arrow.prev {
    left: 18px;
}

.hero-arrow.next {
    right: 18px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.54);
    border: 0;
    border-radius: 999px;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--brand);
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: min(680px, 100%);
    padding: 10px;
    margin-top: 24px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-toolbar input,
.search-toolbar select {
    width: 100%;
    padding: 12px 16px;
    color: #111827;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
}

.search-panel input {
    border: 0;
}

.page-hero {
    padding: 56px 0 36px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.22), rgba(251, 146, 60, 0.14), rgba(255, 255, 255, 0));
}

.page-hero h1,
.section-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.page-hero p,
.section-lead {
    max-width: 780px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.section {
    padding: 44px 0;
}

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

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

.category-card {
    min-height: 178px;
    padding: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    border: 1px solid rgba(250, 204, 21, 0.36);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 23px;
}

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

.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;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.26s ease, box-shadow 0.26s ease;
}

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

.movie-poster {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, #f59e0b);
}

.movie-poster.wide {
    aspect-ratio: 16 / 9;
}

.movie-poster.tall {
    aspect-ratio: 3 / 4;
}

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

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

.movie-poster::after {
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    content: "";
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.movie-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 4px 10px;
    color: #111827;
    background: var(--brand);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.movie-body {
    padding: 16px;
}

.movie-title {
    display: -webkit-box;
    min-height: 1.45em;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.movie-card:hover .movie-title {
    color: #d97706;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
}

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

.masonry {
    columns: 4 240px;
    column-gap: 22px;
}

.masonry .movie-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 22px;
    break-inside: avoid;
}

.carousel-strip {
    display: flex;
    gap: 18px;
    padding: 8px 4px 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}

.carousel-strip .movie-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 70px 220px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-item:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.rank-num {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: #111827;
    background: var(--brand);
    border-radius: 18px;
    font-size: 20px;
    font-weight: 900;
}

.detail-hero {
    padding: 42px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #2d1b00 52%, #0f172a);
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.detail-cover img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #111827, #f59e0b);
}

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

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

.detail-title {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.detail-summary {
    max-width: 780px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.tag-list span,
.tag-list a {
    padding: 5px 11px;
    color: #111827;
    background: #facc15;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.player-shell {
    padding: 46px 0 26px;
    background: #0b0f19;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.player-wrap video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    outline: 0;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #111827;
    cursor: pointer;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.16), rgba(0, 0, 0, 0.5));
    border: 0;
    font-size: 20px;
    font-weight: 900;
}

.play-overlay span:first-child {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    color: #111827;
    background: var(--brand);
    border-radius: 50%;
    box-shadow: 0 18px 40px rgba(250, 204, 21, 0.32);
}

.play-overlay.is-hidden {
    display: none;
}

.content-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.content-card h2,
.content-card h3 {
    margin-top: 0;
    font-size: 26px;
}

.content-card p {
    margin: 0 0 16px;
    color: #374151;
}

.info-table {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.info-cell {
    padding: 14px;
    background: #f9fafb;
    border: 1px solid var(--line);
    border-radius: 16px;
}

.info-cell strong {
    display: block;
    margin-bottom: 4px;
    color: #111827;
}

.search-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px;
    gap: 12px;
    margin-bottom: 24px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 800;
}

.pagination a:hover,
.pagination span.active {
    color: #111827;
    background: var(--brand);
    border-color: var(--brand);
}

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #030712);
}

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

.footer-grid h3 {
    margin: 0 0 13px;
    color: var(--brand);
    font-size: 18px;
}

.footer-grid p,
.footer-grid a {
    color: #9ca3af;
    font-size: 14px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    padding: 18px 0;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

    .detail-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }
}

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

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .mobile-menu.open {
        display: block;
    }

    .hero-slider {
        height: 520px;
        border-radius: 20px;
    }

    .hero-slide {
        padding: 32px 24px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .info-table,
    .footer-grid,
    .search-toolbar,
    .ranking-item {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        align-items: start;
    }
}

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

    .header-inner {
        height: 58px;
    }

    .logo {
        font-size: 21px;
    }

    .hero-section {
        padding-top: 18px;
    }

    .hero-slider {
        height: 500px;
    }

    .hero-title {
        font-size: 38px;
    }

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

    .search-panel {
        grid-template-columns: 1fr;
        border-radius: 22px;
    }

    .search-panel input {
        border: 1px solid var(--line);
    }

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

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

    .carousel-strip .movie-card {
        flex-basis: 84%;
    }

    .content-card {
        padding: 20px;
    }
}
