:root {
    color-scheme: light;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --shadow-soft: 0 18px 45px rgba(41, 37, 36, 0.14);
    --shadow-card: 0 10px 30px rgba(120, 53, 15, 0.12);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--stone-800);
    background: linear-gradient(180deg, var(--amber-50) 0%, var(--stone-50) 34%, #fff 100%);
    line-height: 1.6;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--amber-900), var(--amber-800), var(--amber-900));
    color: var(--amber-50);
    box-shadow: 0 8px 30px rgba(28, 25, 23, 0.26);
}

.top-nav {
    max-width: 1280px;
    margin: 0 auto;
    height: 72px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 210px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(252, 211, 77, 0.16);
    color: var(--amber-300);
    border: 1px solid rgba(252, 211, 77, 0.35);
    box-shadow: inset 0 0 18px rgba(252, 211, 77, 0.2);
}

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

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.04em;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    font-weight: 600;
}

.nav-link {
    position: relative;
    transition: color 0.22s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    background: var(--amber-300);
    transform-origin: center;
    transition: transform 0.22s ease;
}

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

.nav-link:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--amber-50);
}

.mobile-menu {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

.mobile-nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--amber-50);
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hero-carousel {
    position: relative;
    height: min(78vh, 720px);
    min-height: 520px;
    overflow: hidden;
    background: var(--stone-900);
}

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

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 40%, rgba(245, 158, 11, 0.35), transparent 28%),
        linear-gradient(90deg, rgba(28, 25, 23, 0.92) 0%, rgba(28, 25, 23, 0.72) 43%, rgba(28, 25, 23, 0.22) 100%),
        linear-gradient(0deg, rgba(28, 25, 23, 0.94) 0%, transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    padding: 96px 24px 92px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #fff;
}

.hero-kicker {
    width: fit-content;
    color: var(--amber-300);
    font-weight: 700;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(252, 211, 77, 0.35);
}

.hero-content h1 {
    margin: 0 0 16px;
    max-width: 860px;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.hero-content p {
    margin: 0;
    max-width: 760px;
    font-size: clamp(16px, 2vw, 22px);
    color: rgba(255, 255, 255, 0.84);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-actions,
.detail-info .primary-btn {
    margin-top: 28px;
}

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

.primary-btn {
    background: var(--amber-600);
    color: #fff;
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.32);
}

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

.ghost-btn {
    margin-left: 12px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
}

.ghost-btn:hover {
    border-color: var(--amber-300);
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, 0.36);
    font-size: 38px;
    line-height: 1;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.58);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 22px;
    transform: translateY(-50%);
}

.hero-next {
    right: 22px;
    transform: translateY(-50%);
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-500);
}

.content-section,
.page-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px;
}

.page-main {
    min-height: 60vh;
}

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

.section-heading > div {
    position: relative;
    padding-left: 18px;
}

.section-line {
    position: absolute;
    left: 0;
    top: 6px;
    width: 5px;
    height: 36px;
    border-radius: 999px;
    background: var(--amber-600);
}

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

.section-heading p {
    margin: 7px 0 0;
    color: var(--stone-600);
}

.section-more {
    color: var(--amber-700);
    font-weight: 700;
}

.search-panel {
    position: relative;
    max-width: 560px;
    margin: 0 0 28px;
}

.search-input {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--stone-200);
    border-radius: 16px;
    padding: 0 48px 0 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 25px rgba(41, 37, 36, 0.07);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-icon {
    position: absolute;
    right: 17px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--amber-700);
    font-size: 22px;
}

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

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

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

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

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

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

.movie-card {
    border-radius: var(--radius-lg);
    background: #fff;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
}

.poster-wrap {
    position: relative;
    height: 270px;
    overflow: hidden;
    background: var(--stone-900);
}

.movie-card-small .poster-wrap {
    height: 190px;
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), transparent 58%);
    transition: opacity 0.24s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.62);
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.rank-badge {
    left: 12px;
    right: auto;
    background: var(--amber-600);
    font-weight: 800;
}

.play-hover {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    color: #fff;
    background: rgba(245, 158, 11, 0.88);
    transform: translate(-50%, -50%) scale(0.86);
    transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
    flex: 1;
    padding: 17px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
    color: var(--stone-800);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body p {
    margin: 0;
    color: var(--stone-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--stone-500);
    font-size: 12px;
}

.category-pill {
    display: inline-flex;
    width: fit-content;
    padding: 4px 10px;
    color: var(--amber-700);
    background: var(--amber-100);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.movie-card-horizontal .card-link {
    flex-direction: row;
}

.movie-card-horizontal .poster-wrap {
    width: 42%;
    height: auto;
    min-height: 230px;
    flex-shrink: 0;
}

.movie-card-horizontal .card-body {
    justify-content: center;
}

.highlight-section {
    max-width: 1232px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--amber-100), #ffedd5);
    box-shadow: var(--shadow-soft);
}

.dark-section {
    max-width: 1232px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--stone-900), var(--stone-800));
}

.dark-section .section-heading h2,
.dark-section .section-heading p {
    color: #fff;
}

.dark-section .section-more {
    color: var(--amber-300);
}

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

.category-tile,
.category-overview-card {
    border-radius: var(--radius-lg);
    padding: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
}

.category-tile strong {
    display: block;
    font-size: 22px;
    color: var(--stone-800);
    margin-bottom: 8px;
}

.category-tile p,
.category-overview-card p {
    color: var(--stone-600);
    margin: 0 0 14px;
}

.category-tile div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--amber-700);
    font-size: 13px;
}

.page-hero {
    min-height: 260px;
    border-radius: var(--radius-xl);
    padding: 42px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 28%, rgba(252, 211, 77, 0.3), transparent 22%),
        linear-gradient(135deg, var(--amber-900), var(--stone-900));
    box-shadow: var(--shadow-soft);
}

.page-hero span {
    color: var(--amber-300);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-hero h1 {
    margin: 8px 0 10px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
}

.page-hero p {
    margin: 0;
    max-width: 720px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
}

.category-overview-card {
    margin-top: 34px;
}

.category-overview-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.category-overview-title h2 {
    margin: 0;
    font-size: 28px;
}

.category-overview-title a {
    color: var(--amber-700);
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--stone-600);
}

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

.detail-hero-section {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 34px;
    padding: 34px;
    border-radius: var(--radius-xl);
    color: #fff;
    background:
        radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.32), transparent 24%),
        linear-gradient(135deg, var(--stone-900), var(--amber-900));
    box-shadow: var(--shadow-soft);
}

.detail-poster {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.28);
    background: var(--stone-900);
}

.detail-poster img {
    width: 100%;
    height: 460px;
    object-fit: cover;
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.05;
}

.detail-meta,
.detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.detail-meta span,
.detail-facts span {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-one-line {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 19px;
}

.player-section {
    margin: 34px 0;
}

.video-frame {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-soft);
}

.video-frame video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.46));
    cursor: pointer;
}

.play-overlay span {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.9);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
    font-size: 38px;
    padding-left: 6px;
    transition: transform 0.2s ease;
}

.play-overlay:hover span {
    transform: scale(1.08);
}

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

.detail-text {
    padding: 34px;
    border-radius: var(--radius-xl);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.detail-text h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.detail-text h2:not(:first-child) {
    margin-top: 30px;
}

.detail-text p {
    color: var(--stone-700);
    font-size: 17px;
    margin: 0;
}

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

.detail-facts span {
    color: var(--amber-800);
    background: var(--amber-100);
    border-color: transparent;
}

.site-footer {
    margin-top: 60px;
    background: linear-gradient(90deg, var(--stone-900), var(--stone-800), var(--stone-900));
    color: var(--stone-200);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand p {
    margin: 14px 0 0;
    max-width: 520px;
    color: var(--stone-200);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links h3 {
    margin: 0 0 10px;
    color: #fff;
}

.footer-links a {
    color: var(--stone-200);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 18px 24px;
    text-align: center;
    color: var(--stone-200);
}

.is-filtered-out {
    display: none !important;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .mobile-menu.is-open {
        display: block;
    }

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

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

    .hero-arrow {
        display: none;
    }

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

    .movie-card-horizontal .card-link {
        flex-direction: column;
    }

    .movie-card-horizontal .poster-wrap {
        width: 100%;
        min-height: 260px;
    }

    .page-hero {
        align-items: start;
        flex-direction: column;
        padding: 30px;
    }

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

    .detail-poster img {
        height: 420px;
    }

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

@media (max-width: 560px) {
    .top-nav,
    .content-section,
    .page-main {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand {
        min-width: auto;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        display: none;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .ghost-btn {
        margin-left: 0;
    }

    .movie-grid-2,
    .movie-grid-3,
    .movie-grid-4,
    .movie-grid-5,
    .movie-grid-6,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .poster-wrap,
    .movie-card-small .poster-wrap {
        height: 310px;
    }

    .detail-hero-section,
    .detail-text {
        padding: 22px;
    }

    .detail-poster img {
        height: auto;
    }
}
