:root {
    --color-amber: #d97706;
    --color-amber-dark: #b45309;
    --color-green: #15803d;
    --color-green-dark: #166534;
    --color-rose: #e11d48;
    --color-blue: #2563eb;
    --color-text: #1f2937;
    --color-muted: #6b7280;
    --color-soft: #fffbeb;
    --color-line: #e5e7eb;
    --shadow-soft: 0 16px 40px rgba(31, 41, 55, 0.12);
    --shadow-card: 0 12px 30px rgba(31, 41, 55, 0.10);
    --radius-xl: 22px;
    --radius-lg: 16px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--color-text);
    background: linear-gradient(180deg, #fffbeb 0%, #f0fdf4 42%, #eff6ff 100%);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(240, 253, 244, 0.96));
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
}

.site-nav {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-amber), var(--color-green));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.22);
}

.brand-text {
    font-size: 21px;
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    color: #374151;
    font-weight: 700;
    font-size: 15px;
}

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

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

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

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

.nav-search input,
.mobile-search input {
    width: 230px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.88);
}

.nav-search input:focus,
.mobile-search input:focus {
    border-color: var(--color-amber);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.nav-search button,
.mobile-search button,
.button-primary,
.button-soft,
.button-ghost {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-search button,
.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber), var(--color-green));
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.25);
}

.nav-search button,
.mobile-search button {
    padding: 10px 18px;
}

.button-primary,
.button-soft,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
}

.button-soft {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.button-ghost {
    color: var(--color-amber-dark);
    background: #ffffff;
    border: 1px solid #fcd34d;
}

.nav-search button:hover,
.mobile-search button:hover,
.button-primary:hover,
.button-soft:hover,
.button-ghost:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(31, 41, 55, 0.18);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.10);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #374151;
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid rgba(229, 231, 235, 0.75);
}

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

.mobile-search {
    max-width: 520px;
    margin: 16px auto;
}

.mobile-search input {
    width: 100%;
}

.mobile-links {
    display: grid;
    gap: 8px;
    max-width: 520px;
    margin: 0 auto;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.mobile-link.is-active {
    color: var(--color-amber-dark);
    background: #fef3c7;
}

.hero {
    position: relative;
    min-height: 620px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.06);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(69, 26, 3, 0.92), rgba(20, 83, 45, 0.76), rgba(17, 24, 39, 0.58)),
        radial-gradient(circle at 75% 25%, rgba(251, 191, 36, 0.28), transparent 28%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 88px 0 118px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 800;
    font-size: 13px;
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.045em;
    text-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.hero p {
    max-width: 700px;
    margin: 0 0 26px;
    font-size: clamp(18px, 2.2vw, 23px);
    color: #fffbeb;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span,
.tag-row span,
.detail-tags a,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

.hero-meta span {
    padding: 8px 12px;
    color: #fef3c7;
    background: rgba(255, 255, 255, 0.14);
}

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

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

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

.hero-dot.is-active {
    width: 34px;
    background: #f59e0b;
}

.hero-wave {
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: -1px;
    color: #fffbeb;
}

.section {
    padding: 72px 0;
}

.section-muted {
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.72), rgba(220, 252, 231, 0.74));
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
}

.section-head p,
.page-hero p {
    margin: 8px 0 0;
    color: var(--color-muted);
}

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

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

.movie-card,
.info-card,
.rank-card,
.category-card,
.search-card,
.detail-panel,
.player-panel {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

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

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #bbf7d0);
}

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

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

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

.poster-badge,
.poster-meta {
    position: absolute;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    top: 10px;
    right: 10px;
    background: rgba(217, 119, 6, 0.92);
}

.poster-meta {
    left: 10px;
    bottom: 10px;
    background: rgba(17, 24, 39, 0.72);
}

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

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--color-amber-dark);
}

.movie-card p {
    min-height: 50px;
    margin: 0 0 14px;
    color: var(--color-muted);
    font-size: 14px;
}

.movie-card-info,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--color-muted);
    font-size: 14px;
}

.rating {
    color: var(--color-amber-dark);
    font-weight: 900;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span,
.detail-tags a,
.meta-pill {
    padding: 5px 9px;
    color: #4b5563;
    background: #f3f4f6;
    font-size: 12px;
}

.detail-tags a:hover {
    color: #ffffff;
    background: var(--color-amber);
}

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

.category-card {
    position: relative;
    padding: 24px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--color-muted);
    font-size: 14px;
}

.category-card span {
    color: var(--color-amber-dark);
    font-weight: 900;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 72px 140px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 18px;
    background: linear-gradient(135deg, #f97316, #16a34a);
    font-size: 22px;
    font-weight: 900;
}

.rank-card img {
    width: 140px;
    height: 86px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #fef3c7, #bbf7d0);
}

.rank-card h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.rank-card p {
    margin: 0 0 10px;
    color: var(--color-muted);
}

.rank-score {
    min-width: 105px;
    text-align: right;
    color: var(--color-amber-dark);
    font-weight: 900;
}

.page-hero {
    padding: 58px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 15% 20%, rgba(254, 243, 199, 0.26), transparent 28%),
        linear-gradient(135deg, #b45309, #15803d 58%, #1d4ed8);
}

.page-hero h1,
.page-hero p {
    color: #ffffff;
}

.page-hero p {
    max-width: 760px;
    color: #fffbeb;
}

.content-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
}

.sidebar {
    align-self: start;
    position: sticky;
    top: 90px;
}

.info-card {
    padding: 20px;
}

.info-card h2,
.info-card h3 {
    margin: 0 0 14px;
    font-size: 20px;
}

.filter-list,
.simple-list {
    display: grid;
    gap: 10px;
}

.filter-list a,
.simple-movie-link {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: #374151;
    background: #f9fafb;
    font-weight: 700;
}

.filter-list a:hover,
.filter-list a.is-active,
.simple-movie-link:hover {
    color: var(--color-amber-dark);
    background: #fef3c7;
}

.simple-movie-link {
    align-items: center;
}

.simple-movie-link small {
    color: var(--color-muted);
    font-weight: 600;
    white-space: nowrap;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 0;
}

.page-link,
.page-ellipsis {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 41, 55, 0.08);
    font-weight: 800;
}

.page-link:hover,
.page-link.is-current {
    color: #ffffff;
    background: var(--color-amber);
}

.page-prev,
.page-next {
    padding: 0 16px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
}

.back-link {
    display: inline-flex;
    margin: 28px 0 18px;
    color: var(--color-amber-dark);
    font-weight: 900;
}

.player-panel {
    background: #111827;
}

.video-shell {
    position: relative;
    background: #000000;
}

.video-shell video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
    background: #000000;
}

.video-caption {
    padding: 14px 18px;
    color: #d1d5db;
    background: #111827;
}

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

.detail-title {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.detail-title .meta-pill {
    color: #92400e;
    background: #fef3c7;
}

.detail-meta {
    padding: 0 0 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-line);
}

.detail-panel h2 {
    margin: 24px 0 10px;
    font-size: 24px;
}

.detail-panel p {
    margin: 0;
    color: #374151;
}

.review-box {
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffbeb, #f0fdf4);
    border: 1px solid #fde68a;
}

.detail-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
    display: grid;
    gap: 18px;
}

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

.search-panel {
    padding: 24px;
    margin-bottom: 24px;
}

.big-search {
    display: flex;
    gap: 12px;
}

.big-search input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 15px 16px;
    outline: none;
    font-size: 16px;
}

.big-search button {
    padding: 0 26px;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.search-card {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    padding: 14px;
}

.search-card img {
    width: 150px;
    height: 94px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #fef3c7, #bbf7d0);
}

.search-card h2 {
    margin: 0 0 6px;
    font-size: 19px;
}

.search-card p {
    margin: 0 0 10px;
    color: var(--color-muted);
    font-size: 14px;
}

.sitemap-grid {
    columns: 4 220px;
    column-gap: 28px;
}

.sitemap-grid a {
    display: block;
    break-inside: avoid;
    padding: 7px 0;
    color: #374151;
    border-bottom: 1px dashed #e5e7eb;
}

.sitemap-grid a:hover {
    color: var(--color-amber-dark);
}

.site-footer {
    margin-top: 72px;
    color: #d1d5db;
    background: linear-gradient(135deg, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 42px;
    padding: 46px 0;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-brand p {
    max-width: 460px;
    color: #9ca3af;
}

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

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

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 18px;
    color: #9ca3af;
    border-top: 1px solid rgba(156, 163, 175, 0.2);
}

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

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

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

    .sidebar,
    .detail-sidebar {
        position: static;
    }

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

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

    .site-nav {
        justify-content: space-between;
    }

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

    .hero {
        min-height: 560px;
    }

    .section-head {
        display: block;
    }

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

    .rank-card {
        grid-template-columns: 52px 110px 1fr;
    }

    .rank-card img {
        width: 110px;
        height: 74px;
    }

    .rank-score {
        grid-column: 2 / -1;
        text-align: left;
    }

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

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

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

    .hero-content {
        padding: 70px 0 104px;
    }

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

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

    .search-card img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .big-search {
        display: grid;
    }

    .detail-title {
        display: block;
    }

    .footer-bottom {
        display: grid;
        text-align: center;
    }
}
