* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #e5e7eb;
    background:
        radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
        radial-gradient(circle at 88% 8%, rgba(59, 130, 246, 0.12), transparent 28rem),
        #020617;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
    border-bottom: 1px solid #334155;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand {
    font-size: 20px;
    white-space: nowrap;
}

.brand:hover,
.footer-brand:hover,
.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.text-link:hover,
.movie-title:hover,
.rank-info a:hover,
.category-overview-card h2 a:hover {
    color: #fbbf24;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: #f59e0b;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.16);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.desktop-nav a,
.mobile-nav a {
    color: #cbd5e1;
    font-weight: 600;
    transition: color 0.2s ease;
}

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

.header-search input,
.inline-filter input,
.large-search input,
.search-toolbar select {
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.86);
    color: #ffffff;
    outline: none;
    border-radius: 12px;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 230px;
    padding: 10px 12px;
}

.header-search input:focus,
.inline-filter input:focus,
.large-search input:focus,
.search-toolbar select:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.large-search button,
.btn-primary {
    border: none;
    color: #ffffff;
    background: #f59e0b;
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.large-search button:hover,
.btn-primary:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.86);
    color: #ffffff;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    padding: 14px 20px 20px;
    border-top: 1px solid #334155;
    background: #0f172a;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

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

.hero-carousel {
    position: relative;
    min-height: 500px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transition: opacity 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-layer {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.56), rgba(2, 6, 23, 0.72)),
        linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 92px 20px 110px;
}

.hero-kicker,
.detail-kicker,
.page-hero span,
.section-heading span {
    display: inline-flex;
    align-items: center;
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content h1 {
    max-width: 780px;
    margin: 16px 0 18px;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.02;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.hero-mini-tags,
.meta-row,
.tag-row,
.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.hero-tags strong,
.hero-mini-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(245, 158, 11, 0.14);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.hero-mini-tags {
    margin-top: 12px;
}

.hero-actions {
    margin-top: 28px;
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    color: #ffffff;
    padding: 10px 16px;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.54);
    backdrop-filter: blur(14px);
    transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.btn-ghost:hover {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.48);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.home-search-panel {
    max-width: 1180px;
    margin: -42px auto 0;
    position: relative;
    z-index: 10;
    padding: 26px;
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.home-search-panel h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 24px;
}

.large-search {
    display: flex;
    gap: 12px;
}

.large-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
}

.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-top {
    padding-top: 38px;
}

.content-section {
    margin: 56px 0;
}

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

.section-heading.compact {
    display: block;
}

.section-heading h2 {
    margin: 4px 0 0;
    color: #ffffff;
    font-size: clamp(26px, 3vw, 36px);
}

.movie-grid {
    display: grid;
    gap: 18px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, background 0.22s ease, border 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    background: rgba(51, 65, 85, 0.72);
    border-color: rgba(245, 158, 11, 0.34);
}

.poster-link,
.wide-thumb,
.rank-thumb,
.category-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

.poster-link img,
.wide-thumb img,
.rank-thumb img,
.category-cover img,
.category-tile {
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.movie-card:hover img,
.category-tile:hover {
    transform: scale(1.06);
}

.play-badge {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-size: 38px;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .play-badge {
    opacity: 1;
}

.duration-badge,
.rating-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.68);
}

.duration-badge {
    top: 10px;
    right: 10px;
}

.rating-badge {
    left: 10px;
    bottom: 10px;
    color: #fcd34d;
}

.card-content {
    padding: 14px;
}

.movie-title {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.35;
    transition: color 0.2s ease;
}

.card-content p,
.wide-content p,
.rank-info p,
.page-hero p,
.category-overview-card p,
.site-footer p,
.detail-main p {
    color: #cbd5e1;
    line-height: 1.8;
}

.card-content p {
    min-height: 50px;
    margin: 10px 0;
    font-size: 14px;
}

.tag-row {
    margin-bottom: 10px;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 12px;
}

.meta-row {
    color: #94a3b8;
    font-size: 13px;
}

.meta-row strong {
    color: #fbbf24;
}

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

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

.movie-card-wide {
    display: grid;
    grid-template-columns: 178px minmax(0, 1fr);
}

.wide-thumb {
    aspect-ratio: 16 / 11;
}

.wide-content {
    padding: 16px;
}

.wide-content .movie-title {
    min-height: 0;
}

.ranking-panel,
.detail-sidebar,
.detail-main,
.page-hero,
.category-overview-card,
.search-toolbar {
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
    padding: 22px;
    position: sticky;
    top: 86px;
}

.ranking-panel ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ranking-panel li a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.ranking-panel strong {
    color: #f59e0b;
}

.ranking-panel span {
    overflow: hidden;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ranking-panel em {
    color: #fbbf24;
    font-style: normal;
}

.text-link {
    display: inline-flex;
    margin-top: 18px;
    color: #f59e0b;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-position: center;
    background-size: cover;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 2;
}

.category-tile span {
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 8px 0 0;
    color: #cbd5e1;
    line-height: 1.65;
}

.page-hero {
    padding: 34px;
    margin-bottom: 34px;
    background:
        linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.68)),
        rgba(30, 41, 59, 0.56);
}

.page-hero h1 {
    margin: 10px 0 12px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 58px);
}

.small-hero p {
    max-width: 760px;
}

.inline-filter {
    margin-top: 22px;
}

.inline-filter input {
    width: min(100%, 560px);
    padding: 14px 16px;
}

.breadcrumb {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
}

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

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

.category-overview-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 20px;
    padding: 18px;
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    border-radius: 16px;
    aspect-ratio: 4 / 3;
}

.category-cover img {
    min-width: 0;
    height: 100%;
}

.category-overview-card h2 {
    margin: 4px 0 8px;
    color: #ffffff;
}

.rank-list {
    display: grid;
    gap: 16px;
    margin-bottom: 60px;
}

.rank-row {
    display: grid;
    grid-template-columns: 72px 142px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.56);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-number {
    display: grid;
    place-items: center;
    height: 58px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.22);
    font-size: 20px;
    font-weight: 900;
}

.rank-thumb {
    border-radius: 14px;
    aspect-ratio: 16 / 10;
}

.rank-info h2 {
    margin: 0;
    color: #ffffff;
    font-size: 22px;
}

.rank-info p {
    margin: 8px 0 10px;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 28px;
    align-items: center;
    margin-bottom: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(245, 158, 11, 0.24);
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: cover;
}

.player-start {
    position: absolute;
    inset: 0;
    border: none;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18));
    cursor: pointer;
}

.player-start span {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f59e0b;
    font-size: 42px;
    padding-left: 6px;
    box-shadow: 0 0 0 14px rgba(245, 158, 11, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}

.player-start:hover span {
    transform: scale(1.06);
    background: #d97706;
}

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

.detail-intro {
    padding: 10px 0;
}

.detail-intro h1 {
    margin: 12px 0 16px;
    color: #ffffff;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.12;
}

.detail-lead {
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.85;
}

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

.detail-main,
.detail-sidebar {
    padding: 26px;
}

.detail-main h2,
.detail-sidebar h2 {
    margin: 0 0 16px;
    color: #ffffff;
}

.detail-main p {
    margin: 0 0 24px;
    font-size: 17px;
}

.detail-sidebar dl {
    margin: 0;
}

.detail-sidebar dt,
.detail-sidebar dd {
    margin: 0;
    padding: 11px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.detail-sidebar dt {
    color: #94a3b8;
    float: left;
    width: 76px;
}

.detail-sidebar dd {
    color: #ffffff;
    padding-left: 88px;
    min-height: 45px;
}

.search-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
}

.search-toolbar select {
    min-width: 180px;
    padding: 12px 14px;
}

.search-empty {
    grid-column: 1 / -1;
    padding: 34px;
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.56);
    color: #cbd5e1;
    text-align: center;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid #1e293b;
    background: rgba(2, 6, 23, 0.8);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 20px;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 40px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    align-content: start;
}

.footer-links a {
    color: #94a3b8;
    transition: color 0.2s ease;
}

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

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

    .header-search input {
        width: 180px;
    }

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

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

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 820px) {
    .header-inner {
        gap: 12px;
    }

    .header-search {
        display: none;
    }

    .hero-content {
        padding-top: 76px;
    }

    .hero-arrow {
        display: none;
    }

    .home-search-panel {
        margin: 0 14px;
        border-radius: 0 0 22px 22px;
    }

    .large-search,
    .search-toolbar {
        flex-direction: column;
    }

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

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

    .movie-card-wide,
    .category-overview-card,
    .rank-row,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .wide-thumb,
    .rank-thumb {
        aspect-ratio: 16 / 9;
    }

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

    .page-hero {
        padding: 24px;
    }
}

@media (max-width: 520px) {
    .page-container {
        padding: 0 14px;
    }

    .brand span:last-child {
        display: none;
    }

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

    .hero-content p,
    .detail-lead {
        font-size: 16px;
    }

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

    .btn-primary,
    .btn-ghost {
        text-align: center;
    }

    .poster-grid {
        gap: 12px;
    }

    .card-content {
        padding: 12px;
    }

    .movie-title {
        font-size: 15px;
    }
}
