:root {
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-200: #fed7aa;
    --orange-400: #fb923c;
    --orange-500: #f97316;
    --orange-600: #ea580c;
    --orange-700: #c2410c;
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --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;
    --white: #ffffff;
    --shadow-sm: 0 8px 24px rgba(120, 53, 15, 0.08);
    --shadow-md: 0 18px 42px rgba(120, 53, 15, 0.14);
    --shadow-lg: 0 28px 64px rgba(120, 53, 15, 0.22);
}

* {
    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(--gray-800);
    background: linear-gradient(180deg, var(--amber-50) 0%, var(--orange-50) 44%, var(--white) 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 251, 235, 0.88);
    border-bottom: 1px solid rgba(251, 146, 60, 0.18);
    backdrop-filter: blur(18px);
}

.nav-wrap,
.mobile-nav,
.page-container,
.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.nav-wrap {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 10px 22px rgba(249, 115, 22, 0.3);
}

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

.brand-text strong {
    font-size: 22px;
    background: linear-gradient(90deg, var(--orange-600), var(--amber-500));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
    color: var(--orange-600);
}

.nav-search,
.mobile-search,
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    border: 1px solid var(--orange-200);
    border-radius: 999px;
    padding: 6px;
    box-shadow: var(--shadow-sm);
}

.nav-search input,
.mobile-search input,
.search-box input {
    border: 0;
    outline: 0;
    min-width: 0;
    background: transparent;
    padding: 8px 10px;
}

.nav-search button,
.mobile-search button,
.search-box button,
.btn-primary,
.btn-ghost,
.filter-btn,
.player-start {
    border: 0;
    cursor: pointer;
}

.nav-search button,
.mobile-search button,
.search-box button {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
}

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

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--orange-700);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 0 0 18px;
}

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

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--orange-400), var(--amber-500));
}

.hero-bubble {
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    animation: pulse 3s ease-in-out infinite;
}

.hero-bubble.one {
    width: 170px;
    height: 170px;
    left: 8%;
    top: 16%;
}

.hero-bubble.two {
    width: 260px;
    height: 260px;
    right: 9%;
    bottom: 12%;
    animation-delay: 0.4s;
}

.hero-slide {
    display: none;
    min-height: 620px;
    align-items: center;
    background-image: linear-gradient(90deg, rgba(124, 45, 18, 0.84), rgba(249, 115, 22, 0.58), rgba(255, 251, 235, 0.12)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: flex;
    animation: fadeIn 0.7s ease both;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 42px;
    align-items: center;
    color: var(--white);
}

.hero-copy .eyebrow,
.page-hero .eyebrow,
.detail-copy .eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--amber-100);
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

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

.hero-copy h1 span {
    color: var(--amber-200);
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 26px;
    font-size: clamp(18px, 2.2vw, 24px);
    color: var(--amber-50);
}

.hero-actions,
.detail-actions,
.pagination,
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

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

.btn-primary {
    color: var(--orange-700);
    background: var(--white);
    box-shadow: 0 16px 38px rgba(120, 53, 15, 0.18);
}

.btn-ghost {
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
}

.btn-primary:hover,
.btn-ghost:hover,
.movie-card:hover,
.rank-item:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hero-poster {
    position: relative;
    justify-self: end;
    width: min(100%, 340px);
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 34px 90px rgba(67, 20, 7, 0.34);
    border: 8px solid rgba(255, 255, 255, 0.32);
}

.hero-poster img,
.poster-link img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--orange-200), var(--amber-100));
}

.hero-panel {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    border-radius: 20px;
    padding: 16px;
    background: rgba(17, 24, 39, 0.72);
    backdrop-filter: blur(12px);
}

.hero-panel strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

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

.hero-dot {
    width: 40px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--white);
}

.page-container {
    padding: 54px 0;
}

.page-hero,
.detail-hero {
    background: linear-gradient(135deg, var(--orange-400), var(--amber-500));
    color: var(--white);
    padding: 56px 0;
}

.page-hero .page-container,
.detail-hero .page-container {
    padding: 0;
}

.page-hero h1,
.detail-copy h1 {
    margin: 12px 0 10px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.page-hero p,
.detail-copy p {
    margin: 0;
    color: var(--amber-50);
    font-size: 18px;
}

.section-block {
    padding: 24px 0 56px;
}

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

.section-heading h2 {
    margin: 0 0 6px;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.1;
    color: var(--gray-800);
}

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

.section-more {
    color: var(--orange-600);
    font-weight: 800;
}

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

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

.movie-card,
.rank-item,
.category-card,
.filter-panel,
.player-wrap,
.detail-panel,
.search-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(251, 146, 60, 0.16);
    border-radius: 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card {
    overflow: hidden;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--orange-100);
}

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

.poster-link img {
    transition: transform 0.45s ease;
}

.rating-badge,
.hot-badge,
.rank-no {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.28);
}

.rating-badge {
    right: 12px;
    top: 12px;
    padding: 5px 10px;
    font-size: 13px;
}

.card-body {
    padding: 16px;
}

.card-title {
    display: block;
    color: var(--gray-900);
    font-weight: 900;
    font-size: 18px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    min-height: 46px;
    margin: 8px 0 12px;
    color: var(--gray-600);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.card-meta span,
.detail-meta span,
.rank-meta span {
    border-radius: 999px;
    background: var(--orange-50);
    padding: 4px 8px;
}

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

.tag-row span,
.filter-btn,
.category-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--orange-100);
    color: var(--orange-700);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.card-wide {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
}

.card-wide .poster-link {
    aspect-ratio: 3 / 4;
}

.feature-band {
    background: linear-gradient(90deg, var(--amber-100), var(--orange-100));
    padding: 56px 0;
}

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 78px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px 18px 14px 12px;
}

.rank-no {
    position: static;
    width: 52px;
    height: 52px;
    font-size: 18px;
}

.rank-thumb {
    width: 96px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    overflow: hidden;
    background: var(--orange-100);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-main h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-main p {
    margin: 0 0 10px;
    color: var(--gray-600);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-score {
    font-size: 24px;
    font-weight: 900;
    color: var(--orange-600);
}

.category-card {
    display: flex;
    min-height: 120px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255,247,237,0.92));
}

.category-card strong {
    font-size: 22px;
    color: var(--gray-900);
}

.category-card span {
    color: var(--orange-600);
    font-weight: 800;
}

.pagination {
    justify-content: center;
    margin-top: 36px;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--orange-200);
    color: var(--gray-700);
    font-weight: 800;
}

.pagination .is-current {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
    border-color: transparent;
}

.filter-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.filter-panel,
.search-panel {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.filter-panel h2,
.search-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.filter-row {
    align-items: flex-start;
    margin: 12px 0 22px;
}

.filter-btn {
    border: 0;
    background: var(--gray-100);
    color: var(--gray-700);
}

.filter-btn.is-active,
.filter-btn:hover {
    color: var(--white);
    background: linear-gradient(90deg, var(--orange-500), var(--amber-500));
}

.search-count {
    margin: 12px 0 0;
    color: var(--gray-600);
    font-weight: 700;
}

.detail-hero {
    position: relative;
    overflow: hidden;
}

.detail-bg {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-image: linear-gradient(90deg, rgba(124,45,18,0.94), rgba(249,115,22,0.56)), var(--detail-image);
    background-size: cover;
    background-position: center;
    filter: blur(2px);
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(67, 20, 7, 0.32);
    border: 7px solid rgba(255, 255, 255, 0.28);
    aspect-ratio: 3 / 4;
}

.detail-actions {
    margin-top: 24px;
}

.detail-panel {
    padding: 26px;
    margin-bottom: 28px;
}

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

.detail-panel p {
    margin: 0;
    color: var(--gray-700);
    font-size: 16px;
}

.player-wrap {
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    background: var(--gray-900);
}

.player-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--gray-900);
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.22), rgba(17, 24, 39, 0.78));
    transition: opacity 0.2s ease;
}

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

.player-start {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    color: var(--orange-700);
    background: var(--white);
    font-size: 28px;
    font-weight: 900;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.site-footer {
    background: linear-gradient(135deg, var(--amber-900), #7c2d12);
    color: var(--amber-50);
    padding: 46px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    color: var(--white);
    font-size: 24px;
    margin-bottom: 12px;
}

.site-footer p {
    color: var(--amber-100);
    margin: 8px 0;
}

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

.site-footer a:not(.footer-brand) {
    display: block;
    color: var(--amber-100);
    margin: 7px 0;
}

.copyright {
    width: min(1180px, calc(100% - 32px));
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(254, 243, 199, 0.22);
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.5;
    }
}

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

    .menu-toggle {
        display: flex;
    }

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

    .hero-poster {
        display: none;
    }

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

    .filter-panel,
    .search-panel {
        position: static;
    }
}

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

    .brand-text small {
        display: none;
    }

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

    .hero-copy h1 {
        font-size: 46px;
    }

    .section-heading,
    .rank-item {
        align-items: flex-start;
    }

    .section-heading,
    .footer-grid {
        flex-direction: column;
        display: flex;
    }

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

    .rank-item {
        grid-template-columns: 52px 76px minmax(0, 1fr);
    }

    .rank-score {
        grid-column: 2 / -1;
        font-size: 20px;
    }

    .card-wide {
        grid-template-columns: 104px minmax(0, 1fr);
    }

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

@media (max-width: 480px) {
    .movie-grid,
    .compact-grid,
    .category-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-primary,
    .btn-ghost {
        width: 100%;
    }
}
