:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);
    --radius-md: 14px;
    --radius-lg: 22px;
    --max-width: 1280px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amber-800);
    font-weight: 800;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), #ea580c);
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.25);
}

.brand-name {
    font-size: 21px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

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

.nav-link {
    color: var(--gray-700);
    font-weight: 600;
    transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-input {
    width: 260px;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    padding: 11px 16px;
    color: var(--gray-900);
    background: var(--white);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.header-search button,
.mobile-search button,
.primary-button,
.ghost-button {
    border-radius: 999px;
    padding: 11px 18px;
    font-weight: 700;
    color: var(--white);
    background: var(--amber-600);
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover {
    background: var(--amber-700);
    transform: translateY(-1px);
}

.ghost-button {
    color: var(--gray-800);
    background: var(--white);
}

.ghost-button:hover {
    color: var(--amber-700);
}

.mobile-menu-button {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gray-100);
}

.mobile-menu-button span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: var(--gray-800);
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid var(--gray-200);
    background: var(--white);
}

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.mobile-link {
    padding: 10px 0;
    color: var(--gray-700);
    font-weight: 700;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: var(--white);
    background: var(--gray-900);
}

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

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

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.15)),
        linear-gradient(0deg, rgba(17, 24, 39, 0.65), transparent 45%);
}

.hero-copy {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 70vh;
    padding: 92px 0 96px;
}

.hero-copy-inner {
    max-width: 720px;
}

.eyebrow,
.detail-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 13px;
    color: var(--white);
    background: var(--amber-600);
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 16px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    font-size: clamp(32px, 5vw, 60px);
}

.hero-copy p {
    max-width: 640px;
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

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

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.45);
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

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

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
    width: 36px;
    background: var(--white);
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(180deg, var(--amber-50), var(--white));
}

.section-muted {
    background: var(--gray-100);
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    letter-spacing: -0.03em;
}

.section-subtitle {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--gray-600);
    line-height: 1.8;
}

.grid-large {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

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

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

.movie-card,
.movie-list-card,
.category-card,
.info-panel {
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.movie-card,
.movie-list-card,
.category-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link,
.category-card {
    display: block;
    height: 100%;
}

.poster {
    position: relative;
    height: 290px;
    overflow: hidden;
    background: var(--gray-200);
}

.poster-tall {
    height: 430px;
}

.poster img,
.list-poster img,
.related-poster img,
.detail-cover img,
.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.76));
}

.poster-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.poster-badges span,
.card-badge,
.rank-no,
.meta-pill,
.tag-link {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 18px;
}

.overlay-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    color: var(--white);
}

.card-body h3,
.list-content h3,
.category-card h3,
.related-copy h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.card-large .card-body h3 {
    font-size: 26px;
}

.card-body p,
.list-content p,
.category-card p,
.related-copy p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.7;
}

.overlay-body p,
.overlay-body .card-meta {
    color: #e5e7eb;
}

.card-body p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.list-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 14px;
    color: var(--gray-500);
    font-size: 13px;
}

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

.list-link {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0;
    min-height: 128px;
}

.list-poster {
    height: 100%;
    min-height: 140px;
    overflow: hidden;
    background: var(--gray-200);
}

.list-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 22px;
}

.rank-no {
    align-self: flex-start;
    margin-bottom: 10px;
    background: var(--amber-600);
}

.category-card {
    position: relative;
    min-height: 238px;
    padding: 22px;
    color: var(--white);
    background: var(--gray-900);
}

.category-card img {
    position: absolute;
    inset: 0;
    opacity: 0.42;
}

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

.category-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    min-height: 194px;
    flex-direction: column;
    justify-content: flex-end;
}

.category-card p {
    color: #e5e7eb;
}

.page-hero {
    padding: 76px 0 54px;
    color: var(--white);
    background:
        radial-gradient(circle at top left, rgba(245, 158, 11, 0.38), transparent 28%),
        linear-gradient(135deg, var(--gray-900), #2d1f12 65%, var(--gray-900));
}

.page-hero h1 {
    margin: 14px 0 12px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-button {
    border-radius: 999px;
    padding: 9px 14px;
    color: var(--gray-700);
    background: var(--gray-100);
    font-weight: 700;
}

.filter-button.active,
.filter-button:hover {
    color: var(--white);
    background: var(--amber-600);
}

.empty-state {
    display: none;
    padding: 48px;
    text-align: center;
    color: var(--gray-500);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.empty-state.show {
    display: block;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 360px;
    gap: 32px;
    padding: 36px 0 72px;
}

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

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

.player-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--shadow-lg);
}

.player-stage {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--white);
    background: rgba(0, 0, 0, 0.45);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-trigger {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 22px 50px rgba(217, 119, 6, 0.35);
    font-size: 34px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-trigger:hover {
    background: var(--amber-700);
    transform: scale(1.05);
}

.player-message {
    display: none;
    padding: 12px 16px;
    color: var(--white);
    background: rgba(185, 28, 28, 0.9);
}

.player-message.show {
    display: block;
}

.detail-card,
.sidebar-card {
    border-radius: var(--radius-md);
    padding: 26px;
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.detail-card h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.16;
}

.meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 26px;
}

.meta-pill {
    color: var(--amber-800);
    background: var(--amber-100);
}

.tag-link {
    color: var(--gray-700);
    background: var(--gray-100);
}

.tag-link:hover {
    color: var(--white);
    background: var(--amber-600);
}

.detail-section {
    margin-top: 26px;
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: var(--gray-700);
    font-size: 17px;
    line-height: 1.9;
}

.quote-line {
    border-left: 4px solid var(--amber-600);
    padding: 14px 18px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--gray-800);
    background: var(--amber-50);
    font-size: 18px;
    line-height: 1.8;
}

.sidebar {
    display: grid;
    align-content: start;
    gap: 22px;
}

.detail-cover {
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 3 / 4;
    background: var(--gray-200);
}

.sidebar-card h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 14px;
    align-items: center;
}

.related-poster {
    overflow: hidden;
    height: 70px;
    border-radius: 10px;
    background: var(--gray-200);
}

.related-copy h3 {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 5px;
    font-size: 15px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-copy p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gray-500);
    font-size: 13px;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.site-footer {
    color: var(--gray-300);
    background: var(--gray-900);
}

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

.footer-main p {
    max-width: 680px;
    margin: 18px 0 0;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 18px;
    color: var(--white);
}

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

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

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

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

.search-layout {
    padding: 48px 0 72px;
}

.search-title {
    margin: 0 0 20px;
    font-size: 34px;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

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

    .sidebar {
        grid-template-columns: 320px 1fr;
    }
}

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

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

    .hero-control {
        display: none;
    }

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

    .poster {
        height: 240px;
    }

    .poster-tall {
        height: 360px;
    }

    .section-head,
    .filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-input {
        width: 100%;
    }

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

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

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

    .header-inner {
        height: 64px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-slider,
    .hero-copy {
        min-height: 640px;
    }

    .hero-copy {
        padding: 74px 0 88px;
    }

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

    .hero-actions {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
        text-align: center;
    }

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

    .poster,
    .poster-tall {
        height: 360px;
    }

    .list-link {
        grid-template-columns: 120px 1fr;
    }

    .list-content {
        padding: 14px;
    }

    .detail-card,
    .sidebar-card {
        padding: 20px;
    }

    .related-item {
        grid-template-columns: 86px 1fr;
    }
}
