:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-900: #78350f;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --slate-950: #020617;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.12);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.20);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-800);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 28%, #f8fafc 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(229, 231, 235, 0.88);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--gray-900);
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    background: linear-gradient(135deg, var(--amber-600), var(--amber-400));
    box-shadow: 0 12px 26px rgba(217, 119, 6, 0.32);
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
    min-width: 0;
    flex: 1;
}

.nav-link,
.mobile-link {
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: var(--amber-50);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

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

.mobile-nav {
    display: none;
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.mobile-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--gray-50);
}

.main {
    min-height: 70vh;
}

.hero-carousel {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.30) 100%),
        radial-gradient(circle at 22% 24%, rgba(245, 158, 11, 0.42), transparent 30%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.78));
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.62fr);
    gap: 48px;
    align-items: center;
    padding: 72px 0 92px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 18px;
    padding: 8px 12px;
    border: 1px solid rgba(251, 191, 36, 0.36);
    border-radius: 999px;
    color: var(--amber-100);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.hero-content h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

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

.hero-actions,
.section-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
}

.button-primary,
.button-secondary,
.button-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--amber-400));
    box-shadow: 0 15px 32px rgba(217, 119, 6, 0.35);
}

.button-secondary {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(10px);
}

.button-soft {
    color: var(--amber-800, #92400e);
    background: var(--amber-50);
}

.button-primary:hover,
.button-secondary:hover,
.button-soft:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    border-radius: 32px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 24px;
}

.hero-poster-caption {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 26px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 28px;
    width: min(1280px, calc(100% - 32px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(-50%);
}

.hero-arrows {
    display: flex;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
}

.hero-dots {
    display: flex;
    gap: 9px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.58;
}

.hero-dot.is-active {
    width: 28px;
    opacity: 1;
    background: var(--amber-400);
}

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

.section {
    padding: 72px 0;
}

.section.compact {
    padding: 44px 0;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0;
    color: var(--gray-900);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.14;
    letter-spacing: -0.04em;
}

.section-heading p,
.page-lead {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--gray-600);
    font-size: 17px;
}

.search-panel {
    margin-top: -42px;
    position: relative;
    z-index: 5;
}

.search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(12px);
}

.search-card input,
.library-search input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 0 16px;
    outline: none;
    color: var(--gray-800);
    background: var(--white);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-card input:focus,
.library-search input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.9);
    box-shadow: var(--shadow-md);
}

.movie-card[hidden] {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: var(--gray-100);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.05);
}

.poster-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 50%;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.72));
}

.poster-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    background: rgba(217, 119, 6, 0.95);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 12px;
    color: var(--white);
    font-size: 15px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber-600), var(--amber-400));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.36);
}

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

.movie-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 700;
}

.movie-card h3 {
    margin: 8px 0 8px;
    color: var(--gray-900);
    font-size: 17px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-item h3 a:hover,
.detail-title a:hover {
    color: var(--amber-700);
}

.movie-card p,
.category-card p,
.ranking-item p,
.detail-copy p {
    color: var(--gray-600);
}

.movie-card p {
    display: -webkit-box;
    min-height: 46px;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 14px;
}

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

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--amber-700);
    font-size: 12px;
    font-weight: 800;
    background: var(--amber-50);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 24px;
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.96));
    box-shadow: var(--shadow-sm);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: var(--gray-900);
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
}

.mini-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.mini-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.82);
}

.mini-list a:hover {
    color: var(--amber-700);
}

.library-search {
    margin: 24px 0 28px;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 58px 82px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    color: var(--white);
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gray-900), var(--amber-700));
}

.ranking-poster img {
    width: 82px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-item h3 {
    margin: 0 0 6px;
    font-size: 20px;
    line-height: 1.3;
}

.ranking-item p {
    margin: 0 0 8px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--gray-500);
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
    gap: 30px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: var(--slate-950);
    box-shadow: var(--shadow-lg);
}

.player-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-950);
    cursor: pointer;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    cursor: pointer;
    background: rgba(2, 6, 23, 0.45);
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    filter: blur(2px) saturate(1.12);
}

.player-button {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    font-size: 28px;
    background: linear-gradient(135deg, var(--amber-600), var(--amber-400));
    box-shadow: 0 20px 44px rgba(217, 119, 6, 0.42);
    cursor: pointer;
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-panel,
.detail-side,
.related-panel {
    border: 1px solid var(--gray-200);
    border-radius: 26px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.detail-panel {
    margin-top: 24px;
    padding: 28px;
}

.detail-side {
    padding: 20px;
}

.detail-side img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 18px;
}

.detail-title {
    margin: 0 0 14px;
    color: var(--gray-900);
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.detail-copy h2,
.related-panel h2 {
    margin: 0 0 14px;
    color: var(--gray-900);
    font-size: 24px;
}

.detail-copy p {
    margin: 0 0 18px;
    font-size: 16px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.detail-meta-grid div {
    padding: 12px;
    border-radius: 16px;
    background: var(--gray-50);
}

.detail-meta-grid strong {
    display: block;
    color: var(--gray-500);
    font-size: 12px;
}

.related-panel {
    margin-top: 34px;
    padding: 24px;
}

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

.site-footer {
    margin-top: 72px;
    color: rgba(255, 255, 255, 0.78);
    background: var(--slate-950);
}

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

.footer-brand {
    color: var(--white);
}

.footer-inner p {
    max-width: 520px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.62);
}

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

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

@media (max-width: 1180px) {
    .site-nav {
        gap: 14px;
    }

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

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

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

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

    .hero-carousel,
    .hero-inner {
        min-height: 760px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 26px;
        padding-top: 42px;
    }

    .hero-poster {
        max-width: 360px;
    }

    .section-heading {
        display: block;
    }

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

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

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

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

@media (max-width: 640px) {
    .header-inner {
        height: 64px;
    }

    .brand,
    .footer-brand {
        font-size: 19px;
    }

    .hero-carousel,
    .hero-inner {
        min-height: 700px;
    }

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

    .hero-poster {
        display: none;
    }

    .hero-controls {
        bottom: 18px;
    }

    .hero-arrows {
        display: none;
    }

    .section {
        padding: 52px 0;
    }

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

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

    .ranking-item {
        grid-template-columns: 44px 64px minmax(0, 1fr);
        gap: 12px;
    }

    .ranking-number {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .ranking-poster img {
        width: 64px;
    }

    .ranking-item h3 {
        font-size: 17px;
    }

    .detail-panel,
    .related-panel,
    .detail-side {
        padding: 18px;
        border-radius: 20px;
    }

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