:root {
    --amber: #d97706;
    --amber-light: #f59e0b;
    --blue: #2563eb;
    --blue-light: #60a5fa;
    --slate: #0f172a;
    --muted: #64748b;
    --paper: #ffffff;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.08);
}

* {
    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: #111827;
    background: linear-gradient(180deg, #f9fafb 0%, #eff6ff 48%, #fff7ed 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(217, 119, 6, 0.16);
}

.navbar {
    width: min(1280px, calc(100% - 32px));
    min-height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 26px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--blue));
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
}

.brand-text {
    display: grid;
    line-height: 1.08;
}

.brand-text strong {
    font-size: 21px;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--amber), var(--blue));
    -webkit-background-clip: text;
    color: transparent;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
    font-size: 15px;
    color: #374151;
}

.nav-links a {
    transition: color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover {
    color: var(--amber);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
}

.nav-search input {
    width: 210px;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.72);
    transition: box-shadow 0.25s ease, border 0.25s ease;
}

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

.nav-search button,
.primary-button,
.secondary-button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    background: linear-gradient(90deg, var(--amber), var(--blue));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
    transition: transform 0.25s ease, filter 0.25s ease;
}

.nav-search button:hover,
.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.secondary-button {
    color: #1f2937;
    background: #fff;
    border: 1px solid rgba(217, 119, 6, 0.18);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.15);
    color: #92400e;
    font-size: 24px;
    padding: 8px 12px;
}

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

.hero-wrap {
    padding: 34px 0 26px;
}

.hero-slider {
    position: relative;
    height: 560px;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: var(--shadow);
    background: #0f172a;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.38), transparent 26%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.52) 45%, rgba(15, 23, 42, 0.16) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.08) 55%);
}

.hero-content {
    position: absolute;
    left: 56px;
    right: 56px;
    bottom: 52px;
    max-width: 760px;
    color: #fff;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.95);
    font-size: 14px;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.hero-content p {
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(16px, 2vw, 22px);
    line-height: 1.7;
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px;
    color: #d1d5db;
    font-size: 14px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    cursor: pointer;
    font-size: 26px;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
}

.hero-slider:hover .hero-arrow {
    opacity: 1;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 22px;
    display: flex;
    gap: 8px;
    transform: translateX(-50%);
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

.section {
    padding: 34px 0;
}

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

.section-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--amber);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 3vw, 42px);
    letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-title p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--paper);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

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

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

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

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

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--amber);
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.card-body {
    padding: 18px;
}

.card-meta,
.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
}

.card-meta a {
    color: #b45309;
    font-weight: 800;
}

.card-body h3 {
    min-height: 52px;
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.42;
}

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

.card-body p {
    min-height: 64px;
    margin: 0;
    color: #5b6472;
    line-height: 1.62;
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 27px;
    margin: 14px 0;
}

.card-tags span,
.detail-tags a,
.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    color: #92400e;
    background: linear-gradient(90deg, #fef3c7, #dbeafe);
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 26px;
    min-height: 230px;
    color: #111827;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(255, 255, 255, 0.75);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.category-card::before {
    content: "";
    position: absolute;
    inset: -40% auto auto -20%;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25), transparent 68%);
}

.category-card strong {
    position: relative;
    display: block;
    margin-bottom: 10px;
    font-size: 26px;
}

.category-card p {
    position: relative;
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.7;
}

.category-card span {
    position: relative;
    display: inline-flex;
    color: var(--blue);
    font-weight: 800;
}

.rank-wrap {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

.rank-panel,
.filter-panel,
.detail-card,
.player-card,
.related-panel,
.page-hero {
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
}

.rank-panel {
    padding: 20px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 96px 1fr;
    gap: 14px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--blue));
    font-weight: 900;
}

.rank-item img {
    width: 96px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.rank-info {
    min-width: 0;
}

.rank-info strong {
    display: block;
    overflow: hidden;
    color: #111827;
    font-size: 15px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-info em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.page-hero {
    margin: 34px auto 28px;
    padding: 42px;
    background:
        radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.22), transparent 32%),
        radial-gradient(circle at 90% 12%, rgba(37, 99, 235, 0.18), transparent 30%),
        rgba(255, 255, 255, 0.86);
}

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

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-row input,
.filter-row select,
.search-box input {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 18px;
    outline: none;
    background: #fff;
    font-size: 15px;
}

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

.search-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    margin-top: 24px;
}

.search-box button {
    border: 0;
    border-radius: 999px;
    padding: 0 26px;
    color: #fff;
    background: linear-gradient(90deg, var(--amber), var(--blue));
    font-weight: 800;
    cursor: pointer;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 26px;
    padding: 34px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.player-card {
    overflow: hidden;
    margin-bottom: 24px;
    background: #020617;
}

.player-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay span {
    width: 88px;
    height: 88px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--amber);
    background: rgba(255, 255, 255, 0.93);
    font-size: 40px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.detail-card {
    padding: 28px;
}

.detail-title {
    margin-bottom: 22px;
}

.detail-title h1 {
    line-height: 1.18;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 18px 0 22px;
    color: var(--muted);
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.detail-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-section h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-section p {
    margin: 0;
    color: #374151;
    line-height: 1.9;
    white-space: pre-line;
}

.related-panel {
    position: sticky;
    top: 92px;
    padding: 20px;
}

.related-panel h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 12px;
    align-items: center;
    border-radius: 16px;
    padding: 8px;
    transition: background 0.25s ease;
}

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

.related-item img {
    width: 118px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-item span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.empty-state {
    display: none;
    border-radius: 24px;
    padding: 48px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.site-footer {
    margin-top: 46px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #0f172a 60%, #1e293b);
}

.footer-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 36px 0;
}

.footer-inner strong {
    display: block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 560px;
    margin: 0;
    color: #9ca3af;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    gap: 14px;
}

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

.copyright {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #9ca3af;
    font-size: 14px;
}

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

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

    .related-panel {
        position: static;
    }
}

@media (max-width: 860px) {
    .navbar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 10px 0;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .nav-links,
    .nav-search {
        display: none;
        width: 100%;
    }

    .nav-links.is-open,
    .nav-search.is-open {
        display: flex;
    }

    .nav-links.is-open {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding-top: 10px;
    }

    .nav-links.is-open a {
        padding: 10px 0;
        border-bottom: 1px solid rgba(217, 119, 6, 0.12);
    }

    .nav-search.is-open input {
        width: 100%;
    }

    .hero-slider {
        height: 500px;
        border-radius: 24px;
    }

    .hero-content {
        left: 24px;
        right: 24px;
        bottom: 42px;
    }

    .hero-arrow {
        opacity: 1;
    }

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

    .section-head,
    .footer-inner {
        display: grid;
    }
}

@media (max-width: 560px) {
    .container,
    .navbar,
    .footer-inner,
    .copyright {
        width: min(100% - 24px, 1280px);
    }

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

    .hero-wrap {
        padding-top: 18px;
    }

    .hero-slider {
        height: 460px;
        border-radius: 20px;
    }

    .hero-content h1,
    .hero-content h2 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 15px;
    }

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

    .primary-button,
    .secondary-button {
        text-align: center;
    }

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

    .page-hero,
    .detail-card,
    .filter-panel {
        padding: 24px;
        border-radius: 22px;
    }

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

    .detail-layout {
        padding-top: 22px;
    }

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

    .related-item img {
        width: 102px;
    }
}
