:root {
    --color-amber: #b45309;
    --color-amber-dark: #92400e;
    --color-amber-soft: #fffbeb;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-card: #ffffff;
    --shadow-card: 0 18px 45px rgba(17, 24, 39, 0.12);
    --shadow-soft: 0 10px 30px rgba(180, 83, 9, 0.16);
    --radius-lg: 24px;
    --radius-md: 16px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-text);
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 34%, #f9fafb 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 22px;
    color: #111827;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: var(--shadow-soft);
}

.brand-mark span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #ffffff;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

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

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

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

.header-search input,
.search-strip input,
.filter-panel input,
.filter-panel select {
    height: 42px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.header-search button,
.search-strip button,
.primary-btn {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: var(--color-amber);
    border-radius: 12px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    height: 42px;
    padding: 0 18px;
}

.header-search button:hover,
.search-strip button:hover,
.primary-btn:hover {
    background: var(--color-amber-dark);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-amber-dark);
}

.hero-carousel {
    position: relative;
    height: 70vh;
    min-height: 580px;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.75s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
    padding-top: 48px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(180, 83, 9, 0.92);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow.dark {
    background: rgba(255, 255, 255, 0.13);
}

.hero-copy h1 {
    margin: 22px 0 16px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    line-height: 1.8;
}

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

.hero-tags {
    margin: 24px 0;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
}

.ghost-btn {
    border-radius: 12px;
    font-weight: 800;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, background 0.2s ease;
}

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

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    cursor: pointer;
    font-size: 34px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 26px;
}

.hero-next {
    right: 26px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.46);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-strip {
    margin-top: -35px;
    position: relative;
    z-index: 10;
}

.search-strip form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
}

.search-strip input {
    height: 54px;
    padding: 0 18px;
}

.search-strip button {
    height: 54px;
    padding: 0 28px;
}

.section-block {
    padding: 64px 0;
}

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

.section-heading.left {
    justify-content: flex-start;
}

.section-heading span {
    display: block;
    margin-bottom: 6px;
    color: var(--color-amber);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.1;
    font-weight: 900;
}

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

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

.category-card,
.category-overview-card a {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    color: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    isolation: isolate;
}

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

.category-card::after,
.category-overview-card a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.05), rgba(17, 24, 39, 0.88));
}

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

.category-card span,
.category-overview-card h2 {
    font-size: 24px;
    font-weight: 900;
}

.category-card p,
.category-overview-card p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-card);
    border: 1px solid rgba(229, 231, 235, 0.95);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.12;
    overflow: hidden;
    background: #111827;
}

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

.card-badge,
.card-score,
.rank-badge {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #ffffff;
    background: rgba(180, 83, 9, 0.92);
    backdrop-filter: blur(10px);
}

.card-badge {
    left: 10px;
    top: 10px;
}

.card-score {
    right: 10px;
    top: 10px;
    background: rgba(17, 24, 39, 0.72);
}

.rank-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(245, 158, 11, 0.94);
}

.card-body {
    padding: 16px;
}

.card-body h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

.card-body h2 a:hover {
    color: var(--color-amber);
}

.card-meta,
.card-desc {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
    line-height: 1.7;
}

.card-desc {
    margin-top: 8px;
    min-height: 44px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    min-height: 24px;
    padding: 4px 9px;
    color: var(--color-amber-dark);
    background: #fff7ed;
}

.ranking-band {
    padding: 72px 0;
    color: #ffffff;
    background: radial-gradient(circle at left top, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, #111827, #1f2937 48%, #78350f);
}

.ranking-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 42px;
    align-items: center;
}

.ranking-layout h2 {
    margin: 18px 0;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
}

.ranking-layout p {
    max-width: 480px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.9;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 42px 54px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.16);
}

.ranking-item img {
    width: 54px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
}

.ranking-number {
    font-size: 18px;
    font-weight: 900;
    color: #fbbf24;
}

.ranking-copy strong,
.ranking-copy em {
    display: block;
}

.ranking-copy strong {
    color: #ffffff;
    font-weight: 850;
}

.ranking-copy em {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 13px;
    font-style: normal;
}

.ranking-score {
    color: #fbbf24;
    font-weight: 900;
}

.inner-hero {
    position: relative;
    overflow: hidden;
    padding: 92px 0 74px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.35), transparent 30%), linear-gradient(135deg, #111827, #78350f);
}

.inner-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--inner-bg);
    background-size: cover;
    background-position: center;
    opacity: 0.2;
}

.inner-hero .container {
    position: relative;
}

.inner-hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 6vw, 58px);
    line-height: 1.1;
    font-weight: 900;
}

.inner-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    line-height: 1.9;
}

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

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

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.07);
}

.filter-search {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.filter-search label {
    color: #111827;
    font-weight: 900;
}

.filter-panel input {
    width: 100%;
    padding: 0 14px;
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-panel select {
    min-width: 160px;
    padding: 0 12px;
}

.is-hidden {
    display: none;
}

.empty-state {
    margin: 14px 0 0;
    color: var(--color-muted);
}

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

.category-overview-card a {
    min-height: 280px;
}

.category-overview-card span {
    display: inline-flex;
    margin-top: 16px;
    color: #fbbf24;
    font-weight: 900;
}

.ranking-page-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    align-items: start;
}

.ranking-sidebar {
    position: sticky;
    top: 96px;
    padding: 18px;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background: linear-gradient(135deg, #111827, #78350f);
}

.ranking-sidebar h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 900;
}

.compact-ranking .ranking-item {
    grid-template-columns: 36px 44px 1fr;
}

.compact-ranking .ranking-item img {
    width: 44px;
    height: 58px;
}

.compact-ranking .ranking-score {
    display: none;
}

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

.detail-bg {
    position: absolute;
    inset: 0;
}

.detail-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(12px);
    transform: scale(1.08);
    opacity: 0.56;
}

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

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 42px;
    align-items: center;
    min-height: 620px;
    padding: 70px 0;
}

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.12;
    object-fit: cover;
}

.detail-copy h1 {
    margin: 18px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.08;
    font-weight: 900;
}

.detail-copy p {
    max-width: 760px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 19px;
    line-height: 1.9;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

.player-section {
    padding: 64px 0 34px;
}

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

.player-box video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.72));
    cursor: pointer;
}

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

.play-icon {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-amber);
    box-shadow: 0 24px 60px rgba(180, 83, 9, 0.42);
    font-size: 34px;
    padding-left: 5px;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 34px 0 30px;
}

.detail-content article {
    padding: 28px;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.07);
}

.detail-content h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 25px;
    font-weight: 900;
}

.detail-content p {
    margin: 0;
    color: #4b5563;
    font-size: 16px;
    line-height: 2;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 54px 0 34px;
}

.footer-brand strong,
.site-footer h2 {
    color: #ffffff;
    font-size: 19px;
}

.footer-brand p {
    max-width: 520px;
    color: #9ca3af;
    line-height: 1.9;
}

.footer-links {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

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

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

[hidden] {
    display: none !important;
}

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

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

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

    .ranking-sidebar {
        position: static;
    }
}

@media (max-width: 860px) {
    .mobile-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 18px;
        border-radius: 18px;
        background: #ffffff;
        border: 1px solid var(--color-border);
        box-shadow: var(--shadow-card);
    }

    .site-nav.open {
        display: flex;
    }

    .header-search {
        padding-left: 0;
    }

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

    .hero-carousel {
        height: auto;
        min-height: 640px;
    }

    .hero-copy p {
        font-size: 17px;
    }

    .hero-arrow {
        display: none;
    }

    .search-strip form {
        grid-template-columns: 1fr;
    }

    .detail-hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

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

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, var(--container));
    }

    .hero-copy h1,
    .detail-copy h1,
    .inner-hero h1 {
        font-size: 36px;
    }

    .section-block {
        padding: 44px 0;
    }

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

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

    .card-body {
        padding: 12px;
    }

    .card-body h2 {
        font-size: 16px;
    }

    .card-desc {
        display: none;
    }

    .player-box {
        border-radius: 18px;
    }

    .play-icon {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
