:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --orange-50: #fff7ed;
    --orange-100: #ffedd5;
    --orange-600: #ea580c;
    --blue-50: #eff6ff;
    --blue-600: #2563eb;
    --cyan-50: #ecfeff;
    --red-500: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --white: #ffffff;
    --shadow-sm: 0 8px 22px rgba(146, 64, 14, 0.08);
    --shadow-md: 0 16px 40px rgba(146, 64, 14, 0.12);
    --shadow-lg: 0 24px 70px rgba(146, 64, 14, 0.2);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--amber-50), var(--white) 420px);
    line-height: 1.6;
}

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

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

.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
    border-bottom: 1px solid rgba(245, 158, 11, 0.18);
    box-shadow: 0 8px 22px rgba(180, 83, 9, 0.1);
    backdrop-filter: blur(16px);
}

.nav-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 68px;
    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;
    color: var(--amber-800);
}

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

.brand-name {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.desktop-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 700;
    color: var(--gray-700);
}

.desktop-menu a,
.mobile-menu a {
    transition: color 0.25s ease, background-color 0.25s ease;
}

.desktop-menu a:hover,
.desktop-menu a.active,
.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--amber-600);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(254, 243, 199, 0.7);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

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

.mobile-menu {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 14px;
}

.mobile-menu a {
    display: block;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--gray-700);
    font-weight: 700;
}

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

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

.hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 84px;
    background:
        radial-gradient(circle at 10% 12%, rgba(245, 158, 11, 0.25), transparent 32%),
        radial-gradient(circle at 88% 72%, rgba(234, 88, 12, 0.25), transparent 28%),
        linear-gradient(135deg, var(--amber-100), var(--orange-100) 45%, #fef9c3);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(24px);
    opacity: 0.45;
    pointer-events: none;
}

.hero::before {
    width: 170px;
    height: 170px;
    left: 8%;
    top: 54px;
    background: var(--amber-500);
}

.hero::after {
    width: 220px;
    height: 220px;
    right: 8%;
    bottom: 34px;
    background: var(--orange-600);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    align-items: center;
    gap: 44px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--amber-800);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: var(--shadow-sm);
    font-weight: 800;
    margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.06em;
    color: var(--amber-900);
}

.hero-copy p,
.page-hero p,
.detail-title p {
    margin: 18px 0 0;
    max-width: 760px;
    color: var(--amber-700);
    font-size: clamp(17px, 2vw, 22px);
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px) scale(1.015);
}

.btn-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 16px 35px rgba(217, 119, 6, 0.28);
}

.btn-light {
    color: var(--amber-700);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
}

.hero-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero-categories a,
.pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.hero-categories a {
    color: var(--amber-800);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow-sm);
}

.hero-slider {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.62);
    border-radius: 32px;
    background: linear-gradient(145deg, #fed7aa, #fde68a);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateX(22px) scale(0.985);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 2;
}

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.72));
}

.hero-slide-content {
    position: relative;
    z-index: 3;
    padding: 28px;
    color: var(--white);
}

.hero-slide-content h2 {
    margin: 12px 0 8px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
}

.hero-slide-content p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 28px;
    top: 28px;
    display: flex;
    gap: 8px;
}

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

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

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(90deg, var(--blue-50), var(--cyan-50));
}

.section-warm {
    background: linear-gradient(135deg, var(--amber-50), var(--orange-50), #fefce8);
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: var(--shadow-sm);
}

.section-head h2,
.page-section h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    color: var(--gray-800);
}

.more-link {
    color: var(--amber-600);
    font-weight: 800;
}

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

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

.movie-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.12);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.poster-small {
    width: 112px;
    min-width: 112px;
    height: 112px;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
}

.poster-rank {
    width: 92px;
    min-width: 92px;
    height: 122px;
    border-radius: 16px;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.25s ease;
}

.movie-card:hover .poster img,
.rank-row:hover .poster img,
.category-tile:hover img {
    transform: scale(1.08);
}

.poster.image-missing img,
.category-tile.image-missing img,
.hero-slide.image-missing img {
    opacity: 0;
}

.poster.image-missing::after,
.category-tile.image-missing::after {
    content: attr(data-title);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
    text-align: center;
    color: var(--amber-900);
    font-weight: 900;
    background: linear-gradient(135deg, #fde68a, #fed7aa);
}

.poster-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: var(--amber-800);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    font-weight: 900;
}

.top-right {
    top: 12px;
    right: 12px;
}

.bottom-left {
    left: 12px;
    bottom: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-500), var(--orange-600));
}

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

.movie-card-body h3,
.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-card-body h3 a:hover,
.rank-info h3 a:hover {
    color: var(--amber-600);
}

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

.mini-meta,
.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.mini-meta span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: var(--amber-500);
}

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

.pill-blue {
    color: var(--blue-600);
    background: var(--blue-50);
}

.pill-light {
    color: var(--gray-700);
    background: var(--gray-100);
}

.movie-card-horizontal {
    display: flex;
    align-items: stretch;
    gap: 14px;
    padding: 12px;
}

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

.category-tile {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    border-radius: 26px;
    background: linear-gradient(135deg, #fde68a, #fed7aa);
    box-shadow: var(--shadow-sm);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.25s ease;
}

.category-tile::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.72));
}

.category-tile-body {
    position: absolute;
    z-index: 2;
    left: 20px;
    right: 20px;
    bottom: 20px;
    color: var(--white);
}

.category-tile-body h3 {
    margin: 0 0 6px;
    font-size: 24px;
}

.category-tile-body p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
}

.page-hero {
    padding: 64px 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.2), transparent 28%),
        linear-gradient(135deg, var(--amber-100), var(--orange-100), #fef9c3);
}

.page-hero h1 {
    font-size: clamp(38px, 6vw, 60px);
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 12px;
    padding: 18px;
    margin: -28px auto 42px;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 5;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    outline: none;
    background: var(--white);
    color: var(--gray-800);
    font: inherit;
}

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

.rank-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.rank-row {
    display: grid;
    grid-template-columns: 64px 92px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 16px;
    border: 1px solid rgba(245, 158, 11, 0.12);
    border-radius: 24px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.rank-number {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: var(--white);
    background: linear-gradient(135deg, var(--red-500), var(--orange-600));
    font-size: 22px;
    font-weight: 900;
}

.rank-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--amber-700);
    background: var(--amber-100);
    font-weight: 900;
}

.detail-hero {
    padding: 52px 0 40px;
    background:
        radial-gradient(circle at 85% 18%, rgba(245, 158, 11, 0.18), transparent 28%),
        linear-gradient(135deg, var(--amber-100), var(--orange-100), #fef9c3);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--amber-800);
    font-weight: 800;
}

.breadcrumb span {
    color: var(--gray-500);
}

.detail-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.66);
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
}

.detail-title h1 {
    font-size: clamp(34px, 5vw, 58px);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.detail-tags span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--amber-800);
    background: rgba(255, 255, 255, 0.72);
    font-weight: 800;
    font-size: 13px;
}

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

.info-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
}

.info-item b {
    display: block;
    color: var(--amber-800);
    font-size: 13px;
}

.info-item span {
    display: block;
    margin-top: 4px;
    color: var(--gray-700);
    font-weight: 800;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #111827;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #111827;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle at center, rgba(245, 158, 11, 0.42), rgba(17, 24, 39, 0.76));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
    box-shadow: 0 20px 48px rgba(245, 158, 11, 0.36);
    font-size: 28px;
}

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

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

.page-section {
    padding: 42px 0;
}

.content-card {
    padding: 30px;
    border: 1px solid rgba(245, 158, 11, 0.12);
    border-radius: 28px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.content-card h2 {
    margin: 0 0 16px;
    color: var(--gray-800);
}

.content-card p {
    margin: 0 0 14px;
    color: var(--gray-700);
    font-size: 17px;
}

.content-card p:last-child {
    margin-bottom: 0;
}

.site-footer {
    margin-top: 56px;
    padding: 48px 0;
    color: var(--amber-50);
    background: linear-gradient(135deg, var(--amber-900), var(--orange-600));
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
}

.footer-inner p {
    max-width: 680px;
    color: rgba(255, 251, 235, 0.8);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-weight: 800;
}

.search-empty {
    display: none;
    padding: 28px;
    margin-top: 20px;
    border-radius: 24px;
    background: var(--amber-50);
    color: var(--amber-800);
    font-weight: 800;
    text-align: center;
}

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

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

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

    .hero-slider {
        min-height: 460px;
    }

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

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

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

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

    .hero,
    .page-hero {
        padding: 46px 0;
    }

    .hero-slider {
        min-height: 420px;
    }

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

    .section {
        padding: 48px 0;
    }

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

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

    .movie-card-horizontal {
        align-items: flex-start;
    }

    .filter-panel {
        grid-template-columns: 1fr;
        margin-top: -18px;
    }

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

    .rank-number {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .poster-rank {
        width: 76px;
        min-width: 76px;
        height: 100px;
    }

    .rank-link {
        grid-column: 2 / -1;
        width: fit-content;
    }

    .detail-grid {
        gap: 24px;
    }

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

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

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

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

    .poster-small {
        width: 96px;
        min-width: 96px;
        height: 112px;
    }

    .hero-slide-content {
        padding: 22px;
    }

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