:root {
    --color-amber: #d97706;
    --color-amber-dark: #b45309;
    --color-orange: #ea580c;
    --color-ink: #111827;
    --color-muted: #6b7280;
    --color-line: #e5e7eb;
    --color-soft: #f9fafb;
    --shadow-card: 0 10px 25px rgba(17, 24, 39, 0.08);
    --shadow-card-hover: 0 18px 40px rgba(17, 24, 39, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 55%, rgba(251, 191, 36, 0.12) 100%);
    color: var(--color-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input {
    font: inherit;
}

.site-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.86));
    border-bottom: 1px solid rgba(229, 231, 235, 0.62);
    transition: box-shadow 0.25s ease, background 0.25s ease;
    backdrop-filter: blur(16px);
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-amber), var(--color-orange));
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text strong {
    font-size: 19px;
    letter-spacing: 0.02em;
}

.logo-text small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-size: 15px;
    font-weight: 600;
}

.nav-links a {
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--color-amber-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-form {
    position: relative;
    width: 260px;
}

.search-form input {
    width: 100%;
    height: 42px;
    padding: 0 44px 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: var(--color-amber);
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--color-line);
    padding: 14px 0 18px;
}

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

.mobile-panel nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-weight: 600;
    color: #374151;
}

.mobile-panel .search-form {
    width: 100%;
    margin-top: 14px;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.64) 44%, rgba(0, 0, 0, 0.22) 100%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 160px;
    background: linear-gradient(to top, rgba(250, 250, 250, 1), rgba(250, 250, 250, 0));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 560px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(100%, 680px);
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-bottom: 30px;
}

.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #f9fafb;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.hero-actions,
.section-heading,
.filter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.button-primary,
.button-secondary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
    padding: 13px 26px;
    background: var(--color-amber);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.28);
}

.button-primary:hover {
    background: var(--color-amber-dark);
    transform: translateY(-2px);
}

.button-secondary {
    padding: 13px 24px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.button-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.button-ghost {
    color: var(--color-amber-dark);
    font-weight: 800;
}

.button-ghost:hover {
    color: #92400e;
}

.section {
    padding: 58px 0;
}

.section-soft {
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.92), rgba(255, 237, 213, 0.78));
}

.section-white {
    background: #ffffff;
}

.section-heading {
    margin-bottom: 28px;
}

.section-title h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.2;
    font-weight: 850;
    letter-spacing: -0.03em;
}

.section-title p,
.page-hero p,
.detail-title 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.wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transform: translateY(0);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.card-cover {
    position: relative;
    overflow: hidden;
    background: #111827;
    aspect-ratio: 16 / 9;
}

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-badge,
.card-rank {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    top: 10px;
    right: 10px;
    padding: 5px 9px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
}

.card-rank {
    left: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: rgba(217, 119, 6, 0.94);
    color: #ffffff;
}

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

.card-body h3 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.card-meta {
    margin-top: auto;
    gap: 8px;
    color: #6b7280;
    font-size: 12px;
}

.card-meta span,
.tag-chip,
.filter-button {
    border-radius: 999px;
    background: #f3f4f6;
    padding: 4px 9px;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 200px;
    border-radius: 22px;
    padding: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #f97316);
    box-shadow: var(--shadow-card);
}

.category-card:nth-child(2) {
    background: linear-gradient(135deg, #7c2d12, #ea580c);
}

.category-card:nth-child(3) {
    background: linear-gradient(135deg, #111827, #d97706);
}

.category-card:nth-child(4) {
    background: linear-gradient(135deg, #374151, #f59e0b);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.88);
}

.category-card span {
    display: inline-flex;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 13px;
    font-weight: 800;
}

.page-hero {
    padding: 58px 0;
    color: #ffffff;
    background: linear-gradient(90deg, var(--color-amber), var(--color-orange));
}

.page-hero.dark {
    background: linear-gradient(90deg, #1f2937, #111827);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.84);
}

.filter-panel {
    margin: 34px 0 28px;
    padding: 18px;
    border: 1px solid var(--color-line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.filter-row {
    flex-wrap: wrap;
}

.filter-input {
    flex: 1 1 260px;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    outline: none;
}

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

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

.filter-button {
    border: 0;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.filter-button.is-active,
.filter-button:hover {
    background: var(--color-amber);
    color: #ffffff;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 70px 220px 1fr;
    gap: 20px;
    align-items: center;
    padding: 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
    color: rgba(217, 119, 6, 0.32);
    font-size: 38px;
    font-weight: 900;
}

.rank-cover {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 16 / 9;
    background: #111827;
}

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

.rank-content h2,
.rank-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

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

.detail-wrap {
    padding: 32px 0 64px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
    gap: 30px;
}

.movie-player {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.24);
    aspect-ratio: 16 / 9;
}

.movie-player video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(217, 119, 6, 0.94);
    color: #ffffff;
    font-size: 32px;
    box-shadow: 0 16px 36px rgba(217, 119, 6, 0.34);
    cursor: pointer;
}

.detail-title {
    margin: 24px 0;
}

.detail-meta {
    margin-top: 14px;
}

.detail-meta .meta-chip,
.tag-chip {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--color-line);
    color: #4b5563;
    font-size: 13px;
}

.content-card,
.review-card,
.related-panel {
    margin-top: 22px;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.review-card {
    background: linear-gradient(135deg, #fffbeb, #ffedd5);
}

.content-card h2,
.review-card h2,
.related-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.content-card p,
.review-card p {
    margin: 0;
    color: #374151;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.related-panel {
    position: sticky;
    top: 102px;
    margin-top: 0;
}

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

.related-item {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: #f9fafb;
}

.related-cover {
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
    background: #111827;
}

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

.related-item h3 {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.35;
}

.related-item p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.search-page-form {
    max-width: 720px;
    margin-top: 26px;
}

.search-page-form.search-form {
    width: 100%;
}

.search-page-form input {
    height: 52px;
    padding-right: 58px;
}

.search-page-form button {
    width: 42px;
    height: 42px;
}

.empty-state {
    display: none;
    padding: 52px 20px;
    border-radius: 18px;
    background: #ffffff;
    color: #6b7280;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.site-footer {
    background: linear-gradient(135deg, #111827, #1f2937 54%, #111827);
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
    gap: 36px;
    padding: 46px 0;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.site-footer p {
    margin: 0;
    color: #d1d5db;
}

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

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
    font-size: 14px;
}

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

    .nav-links {
        gap: 18px;
    }

    .search-form {
        width: 220px;
    }
}

@media (max-width: 900px) {
    .nav-links,
    .header-actions > .search-form {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero,
    .hero-content {
        min-height: 520px;
    }

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

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

    .related-panel {
        position: static;
    }

    .rank-item {
        grid-template-columns: 52px 150px 1fr;
    }

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

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

    .nav-inner {
        height: 66px;
    }

    .logo-mark {
        width: 34px;
        height: 34px;
    }

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

    .logo-text small {
        display: none;
    }

    .hero,
    .hero-content {
        min-height: 500px;
    }

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

    .section {
        padding: 42px 0;
    }

    .section-heading,
    .hero-actions,
    .filter-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .rank-item {
        grid-template-columns: 1fr;
    }

    .rank-number {
        font-size: 30px;
    }

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