:root {
    --amber: #d97706;
    --amber-light: #fbbf24;
    --amber-soft: #fffbeb;
    --slate: #0f172a;
    --slate-2: #1e293b;
    --slate-3: #334155;
    --text: #1f2937;
    --muted: #64748b;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

* {
    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(--text);
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 36%, #f8fafc 100%);
}

body.locked {
    overflow: hidden;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid #fde68a;
    box-shadow: 0 8px 28px rgba(146, 64, 14, 0.08);
    backdrop-filter: blur(16px);
}

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

.nav-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 20px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.site-logo {
    font-size: 22px;
    color: #92400e;
}

.logo-mark {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #92400e);
    box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 15px;
    font-weight: 700;
    color: #475569;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: #b45309;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #fef3c7;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #92400e;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid #fde68a;
    background: #ffffff;
}

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

.mobile-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: #475569;
    font-weight: 700;
}

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(251, 191, 36, 0.35), transparent 30%), linear-gradient(135deg, #1e293b, #0f172a 68%, #451a03);
    min-height: 660px;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(15, 23, 42, 0.42), rgba(0, 0, 0, 0.65));
    z-index: 1;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.9s ease, transform 1.2s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}

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

.hero-content {
    position: relative;
    z-index: 3;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 660px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 40px;
    padding: 70px 0;
}

.hero-copy {
    max-width: 720px;
    color: #ffffff;
}

.hero-kicker,
.section-kicker,
.poster-badge,
.label-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(251, 191, 36, 0.38);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    color: #fde68a;
    font-weight: 800;
}

.hero-kicker {
    padding: 9px 14px;
    margin-bottom: 18px;
    backdrop-filter: blur(12px);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0 0 22px;
    font-size: 18px;
    line-height: 1.8;
    color: #e5e7eb;
}

.hero-meta,
.movie-meta,
.detail-meta,
.search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.movie-meta span,
.detail-meta span,
.search-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.13);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.32);
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.hero-panel {
    padding: 18px;
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.58);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 20px;
}

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

.hero-mini {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(4px);
}

.hero-mini img {
    width: 78px;
    height: 94px;
    object-fit: cover;
    border-radius: 14px;
}

.hero-mini strong {
    display: block;
    color: #ffffff;
    margin-bottom: 6px;
}

.hero-mini span {
    color: #fcd34d;
    font-size: 13px;
}

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

.hero-dots button {
    width: 34px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

.hero-dots button.active {
    background: #f59e0b;
}

main {
    min-height: 58vh;
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: rgba(255, 255, 255, 0.58);
}

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

.section-kicker {
    padding: 7px 12px;
    color: #b45309;
    background: #fef3c7;
}

.section-title {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
    color: #0f172a;
}

.section-desc {
    max-width: 720px;
    margin: 12px 0 0;
    color: #64748b;
    line-height: 1.8;
}

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.09);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

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

.movie-card a:hover img,
.compact-card:hover img,
.related-card:hover img {
    transform: scale(1.08);
}

.poster-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 10px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(0.78);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.9);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3,
.related-card h3,
.rank-item h3 {
    margin: 0;
    color: #111827;
    font-size: 16px;
    line-height: 1.4;
}

.movie-card p,
.rank-item p {
    margin: 8px 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.movie-meta {
    color: #64748b;
    margin-bottom: 10px;
}

.movie-meta span {
    background: #f1f5f9;
}

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

.tag-row span {
    border-radius: 8px;
    padding: 5px 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
}

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

.category-card {
    position: relative;
    min-height: 172px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 22px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #1e293b);
    box-shadow: var(--shadow);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -60px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.22);
}

.category-card h2,
.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #e5e7eb;
    line-height: 1.7;
}

.search-panel {
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid #fde68a;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
}

.search-row {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
}

.search-row input,
.search-row select,
.category-filter input {
    width: 100%;
    min-height: 48px;
    border: 1px solid #fcd34d;
    border-radius: 16px;
    padding: 0 16px;
    color: #1f2937;
    background: #ffffff;
    outline: none;
}

.search-row input:focus,
.search-row select:focus,
.category-filter input:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

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

.search-results.open {
    display: grid;
}

.search-result {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.search-result img {
    width: 76px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
}

.search-result h3 {
    margin: 0 0 6px;
    font-size: 15px;
}

.search-result p {
    margin: 0 0 8px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

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

.rank-item a {
    display: grid;
    grid-template-columns: 54px 86px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 126px;
    padding: 14px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-num {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #b45309);
    font-weight: 900;
}

.rank-item img {
    width: 86px;
    height: 108px;
    border-radius: 14px;
    object-fit: cover;
}

.page-hero {
    padding: 72px 0 42px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 10%, rgba(251, 191, 36, 0.28), transparent 36%), linear-gradient(135deg, #1e293b, #0f172a 70%, #451a03);
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #d1d5db;
    line-height: 1.8;
}

.category-filter {
    margin-bottom: 24px;
}

.movie-card.hidden {
    display: none;
}

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

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

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

.player-card,
.detail-card,
.sidebar-card {
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.14), rgba(0, 0, 0, 0.56));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
    display: flex;
    width: 82px;
    height: 82px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.96);
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.4);
    font-size: 34px;
}

.player-message {
    display: none;
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    text-align: center;
}

.player-message.show {
    display: block;
}

.detail-card {
    padding: 28px;
    margin-top: 24px;
}

.detail-card h1 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.15;
}

.detail-meta {
    margin-bottom: 22px;
    color: #92400e;
}

.detail-meta span {
    background: #fef3c7;
}

.detail-section {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid #e5e7eb;
}

.detail-section h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 22px;
}

.detail-section p {
    margin: 0;
    color: #475569;
    line-height: 2;
}

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

.detail-tags span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
}

.sidebar-card {
    padding: 20px;
    margin-bottom: 22px;
}

.sidebar-card h2 {
    margin: 0 0 16px;
    color: #111827;
    font-size: 20px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #f8fafc;
    font-weight: 800;
}

.compact-card img {
    width: 74px;
    height: 94px;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.25s ease;
}

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

.related-card {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.related-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.related-card h3 {
    padding: 12px;
    font-size: 15px;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.footer-shell {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 54px 0;
}

.footer-logo {
    color: #ffffff;
    font-size: 22px;
}

.footer-shell p {
    max-width: 520px;
    color: #94a3b8;
    line-height: 1.8;
}

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

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

.footer-links a {
    color: #cbd5e1;
}

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

.footer-bottom {
    padding: 18px 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    text-align: center;
}

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

    .menu-toggle {
        display: block;
    }

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

    .hero-panel {
        max-width: 720px;
    }

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

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

@media (max-width: 760px) {
    .section {
        padding: 48px 0;
    }

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

    .hero-content {
        padding: 44px 0 84px;
    }

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

    .hero-panel {
        display: none;
    }

    .movie-grid,
    .category-grid,
    .rank-list,
    .related-grid,
    .footer-shell,
    .search-results {
        grid-template-columns: 1fr 1fr;
    }

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

    .rank-item a {
        grid-template-columns: 44px 74px 1fr;
    }

    .rank-item img {
        width: 74px;
        height: 96px;
    }

    .detail-card {
        padding: 20px;
    }
}

@media (max-width: 520px) {
    .nav-shell,
    .footer-shell,
    .section-shell,
    .hero-content {
        width: min(100% - 22px, 1180px);
    }

    .site-logo {
        font-size: 18px;
    }

    .movie-grid,
    .category-grid,
    .rank-list,
    .related-grid,
    .footer-shell,
    .search-results {
        grid-template-columns: 1fr;
    }

    .movie-card a {
        display: grid;
        grid-template-columns: 118px 1fr;
    }

    .movie-card .poster-wrap {
        aspect-ratio: auto;
        min-height: 176px;
    }

    .category-card {
        min-height: 150px;
    }
}
