:root {
    --amber: #d97706;
    --amber-dark: #92400e;
    --amber-light: #fef3c7;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #fff7ed;
    --panel: #ffffff;
    --dark: #111827;
    --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #fafafa;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    width: min(1280px, calc(100% - 32px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), #ea580c);
    box-shadow: 0 10px 24px rgba(217, 119, 6, 0.3);
}

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

.brand-text strong {
    font-size: 20px;
    font-weight: 800;
}

.brand-text small {
    color: var(--muted);
    font-size: 12px;
}

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

.nav-link {
    color: #374151;
    font-weight: 600;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--amber-dark);
}

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

.top-search input,
.mobile-search input,
.inline-search {
    width: 210px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.inline-search:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.26);
}

.top-search button,
.mobile-search button,
.soft-btn {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--amber);
    cursor: pointer;
    font-weight: 700;
}

.soft-btn {
    display: inline-flex;
    color: var(--amber-dark);
    background: var(--amber-light);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    padding: 8px 12px;
    background: #f3f4f6;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    padding: 0 18px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav.open {
    display: grid;
    gap: 10px;
}

.mobile-nav-link {
    padding: 10px 0;
    font-weight: 700;
    color: #374151;
}

.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #111827;
}

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

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

.hero-layer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
    max-width: 720px;
}

.hero-kicker,
.sub-hero span,
.section-heading span {
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.92);
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.detail-content h1,
.sub-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.hero p,
.detail-content p,
.sub-hero p {
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
    max-width: 780px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.hero-meta span {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 6px 12px;
    color: #fef3c7;
    background: rgba(0, 0, 0, 0.25);
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 12px;
    padding: 0 26px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: var(--amber);
    box-shadow: 0 14px 32px rgba(217, 119, 6, 0.28);
}

.primary-btn:hover {
    background: var(--amber-dark);
    transform: translateY(-2px);
}

.primary-btn.small {
    min-height: 40px;
    padding: 0 18px;
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-dots {
    position: absolute;
    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.active {
    width: 32px;
    background: #f59e0b;
}

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

.muted-section {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100% - 1280px) / 2));
    padding-right: max(16px, calc((100% - 1280px) / 2));
    background: linear-gradient(180deg, #ffffff, #fff7ed);
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
}

.section-heading a {
    color: var(--amber-dark);
    font-weight: 800;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
}

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

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

.card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.6));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
    opacity: 1;
}

.card-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.92);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: scale(1);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    font-weight: 900;
}

.card-body {
    padding: 18px;
}

.card-title {
    display: -webkit-box;
    min-height: 52px;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-title:hover {
    color: var(--amber-dark);
}

.card-desc {
    display: -webkit-box;
    min-height: 66px;
    margin: 10px 0 14px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-meta,
.card-tags,
.detail-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta {
    justify-content: space-between;
    color: #6b7280;
    font-size: 13px;
}

.card-tags {
    margin-top: 12px;
}

.card-tags span,
.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 9px;
    color: #92400e;
    background: #fef3c7;
    font-size: 12px;
    font-weight: 700;
}

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

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 22px;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.tile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.9), rgba(217, 119, 6, 0.34));
}

.tile-content {
    position: absolute;
    inset: auto 22px 22px 22px;
    color: #ffffff;
}

.tile-content strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.tile-content em {
    display: block;
    color: #fef3c7;
    font-style: normal;
}

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

.ranking-panel,
.ranking-copy,
.content-card,
.watch-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
}

.ranking-panel {
    padding: 16px;
}

.ranking-panel.tall {
    position: sticky;
    top: 96px;
}

.compact-item {
    display: grid;
    grid-template-columns: 34px 72px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.compact-item:hover {
    background: #fff7ed;
}

.compact-item img {
    width: 72px;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    object-fit: cover;
}

.compact-item strong {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-item small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.list-rank,
.list-dot {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--amber);
    font-weight: 900;
}

.list-dot {
    font-size: 12px;
}

.ranking-copy {
    padding: 36px;
    background: linear-gradient(135deg, #111827, #374151);
    color: #ffffff;
}

.ranking-copy h2 {
    margin: 0 0 14px;
    font-size: 34px;
}

.ranking-copy p {
    color: #e5e7eb;
}

.sub-hero {
    min-height: 340px;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.45), transparent 30%), linear-gradient(135deg, #111827, #1f2937 50%, #92400e);
}

.sub-hero > div {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.filter-bar .inline-search {
    width: min(460px, 100%);
}

.sticky-filter {
    position: sticky;
    top: 86px;
    z-index: 20;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
}

.detail-hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: end;
    background-position: center;
    background-size: cover;
    color: #ffffff;
}

.detail-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.12));
}

.detail-content {
    position: relative;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 58px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: #fef3c7;
    font-weight: 700;
}

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

.detail-main {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 32px;
    align-items: end;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 3 / 4;
    border: 6px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

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

.detail-left {
    display: grid;
    gap: 24px;
}

.watch-card,
.content-card,
.side-card {
    padding: 24px;
}

.watch-card h2,
.content-card h2,
.side-card h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.content-card p {
    margin: 0 0 22px;
    color: #374151;
    font-size: 17px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.media-player {
    width: 100%;
    height: 100%;
    background: #000000;
}

.play-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.78));
    cursor: pointer;
}

.play-cover.hidden {
    display: none;
}

.play-circle {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--amber);
    box-shadow: 0 18px 40px rgba(217, 119, 6, 0.32);
    font-size: 30px;
}

.play-cover strong {
    max-width: 80%;
    overflow: hidden;
    font-size: 24px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.play-cover small {
    color: #fef3c7;
    font-size: 15px;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 24px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0 0 18px;
}

.side-card dt {
    color: var(--muted);
    font-weight: 700;
}

.side-card dd {
    margin: 0;
}

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

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.footer-brand span {
    color: #f59e0b;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: #d1d5db;
}

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

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

.searchable-item.is-hidden {
    display: none;
}

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

    .top-search {
        margin-left: auto;
    }

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

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

    .ranking-panel.tall {
        position: static;
    }
}

@media (max-width: 820px) {
    .nav-wrap {
        height: 66px;
    }

    .top-search {
        display: none;
    }

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

    .hero {
        height: 540px;
    }

    .hero-layer,
    .detail-bg {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.82));
    }

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

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

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

@media (max-width: 560px) {
    .brand-text small {
        display: none;
    }

    .hero,
    .detail-hero {
        min-height: 560px;
        height: auto;
    }

    .hero-slide {
        padding: 86px 0 70px;
    }

    .hero-content,
    .detail-content,
    .page-section,
    .sub-hero > div,
    .footer-grid,
    .nav-wrap {
        width: min(100% - 24px, 1280px);
    }

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

    .section-heading,
    .filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .compact-item {
        grid-template-columns: 30px 64px minmax(0, 1fr);
    }

    .play-circle {
        width: 62px;
        height: 62px;
    }
}
