:root {
    --bg: #fff7ed;
    --surface: rgba(255, 255, 255, 0.86);
    --surface-strong: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(251, 146, 60, 0.18);
    --amber: #d97706;
    --amber-dark: #b45309;
    --orange: #ea580c;
    --red: #dc2626;
    --shadow: 0 22px 60px rgba(146, 64, 14, 0.16);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.23), transparent 32rem),
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 28rem),
        linear-gradient(180deg, #fff7ed 0%, #ffffff 46%, #fff7ed 100%);
    min-height: 100vh;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(251, 146, 60, 0.18);
    box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

.header-inner {
    max-width: 1180px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.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: 16px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.25);
}

.brand-text {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -0.04em;
    background: linear-gradient(90deg, var(--amber), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.desktop-nav > a,
.nav-dropdown > a {
    padding: 22px 0;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.nav-dropdown:hover > a {
    color: var(--amber);
}

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    left: 0;
    top: 100%;
    width: 190px;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(251, 146, 60, 0.16);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.22s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #4b5563;
}

.dropdown-panel a:hover {
    color: var(--amber-dark);
    background: #fffbeb;
}

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

.header-search input {
    width: 230px;
    height: 40px;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 999px;
    padding: 0 16px;
    outline: none;
    background: rgba(255, 255, 255, 0.82);
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(217, 119, 6, 0.72);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.18);
}

.header-search button,
.primary-btn,
.secondary-btn,
.play-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    transition: 0.22s ease;
}

.header-search button,
.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 14px 30px rgba(217, 119, 6, 0.24);
}

.header-search button {
    height: 40px;
    padding: 0 17px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
}

.secondary-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
}

.header-search button:hover,
.primary-btn:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(217, 119, 6, 0.32);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: #fff7ed;
    color: var(--amber-dark);
    font-size: 22px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px 18px;
}

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

.mobile-nav > a,
.mobile-cat-grid a {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 247, 237, 0.82);
    font-weight: 700;
}

.mobile-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

main {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 22px 68px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    border-radius: 30px;
    background: #111827;
    box-shadow: var(--shadow);
}

.hero-track {
    position: relative;
    min-height: 600px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.52) 46%, rgba(17, 24, 39, 0.16) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 55%);
}

.hero-content {
    position: absolute;
    left: clamp(24px, 6vw, 72px);
    bottom: clamp(28px, 7vw, 72px);
    z-index: 2;
    max-width: 680px;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #fbbf24;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0 0 16px;
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.04;
    letter-spacing: -0.06em;
}

.hero p {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 26px;
}

.hero-meta span,
.card-tags span,
.detail-tags span,
.category-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    padding: 7px 12px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-dots {
    position: absolute;
    right: 30px;
    bottom: 30px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: 0.2s ease;
}

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

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.quick-card,
.stat-card,
.category-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(18px);
    border-radius: 22px;
    box-shadow: 0 16px 45px rgba(146, 64, 14, 0.1);
}

.quick-card {
    padding: 18px;
    transition: 0.22s ease;
}

.quick-card:hover,
.category-card:hover,
.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.quick-card strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
    font-size: 18px;
}

.quick-card span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.content-section {
    margin-top: 54px;
}

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

.section-heading h1,
.section-heading h2 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

.section-more {
    color: var(--amber-dark);
    font-weight: 900;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(251, 146, 60, 0.14);
    box-shadow: 0 12px 30px rgba(146, 64, 14, 0.08);
    transition: 0.24s ease;
}

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

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 62%);
    transition: opacity 0.22s ease;
}

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

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.92);
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    transition: 0.22s ease;
}

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

.card-body {
    padding: 16px;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.card-tags span,
.detail-tags span,
.category-tag {
    padding: 5px 9px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid rgba(251, 191, 36, 0.28);
}

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

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

.meta-line,
.card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.card-desc {
    display: -webkit-box;
    min-height: 44px;
    margin-top: 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.compact .card-body {
    padding: 13px;
}

.compact h3 {
    font-size: 16px;
}

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

.category-card {
    padding: 22px;
    min-height: 172px;
    transition: 0.22s ease;
}

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

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

.rank-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 24px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 54px 56px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    transition: 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    box-shadow: 0 12px 35px rgba(146, 64, 14, 0.1);
}

.rank-num {
    color: var(--red);
    font-weight: 900;
    font-size: 22px;
    text-align: center;
}

.rank-poster {
    overflow: hidden;
    width: 56px;
    height: 74px;
    border-radius: 12px;
    background: linear-gradient(135deg, #78350f, #fbbf24);
}

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

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    margin-bottom: 4px;
    color: #111827;
}

.rank-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 22px 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
}

.filter-input,
.filter-select {
    min-height: 44px;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 999px;
    padding: 0 16px;
    background: #ffffff;
    outline: none;
}

.filter-input {
    flex: 1 1 280px;
}

.filter-select {
    flex: 0 0 160px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: stretch;
    margin-top: 22px;
    padding: 24px;
    border-radius: 30px;
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.28), transparent 24rem),
        linear-gradient(135deg, #111827, #451a03 52%, #7c2d12);
    box-shadow: var(--shadow);
}

.detail-cover {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #78350f, #fbbf24);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.detail-cover img {
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

.detail-info h1 {
    margin: 10px 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-info p {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.9;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fbbf24;
}

.player-section,
.text-panel {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 45px rgba(146, 64, 14, 0.08);
}

.player-section h2,
.text-panel h2 {
    margin: 0 0 16px;
    font-size: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-poster {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.1)),
        var(--player-cover) center / cover no-repeat;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-shell.is-playing .player-poster {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-button {
    width: 96px;
    height: 96px;
    color: #ffffff;
    font-size: 32px;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.text-panel p {
    color: #4b5563;
    line-height: 1.95;
    font-size: 16px;
}

.site-footer {
    border-top: 1px solid rgba(251, 146, 60, 0.18);
    background: rgba(255, 255, 255, 0.74);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 22px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: var(--muted);
}

.footer-inner strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 20px;
}

.footer-inner p {
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-weight: 800;
    color: var(--amber-dark);
}

.empty-result {
    display: none;
    padding: 26px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--muted);
}

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

    .header-search input {
        width: 180px;
    }

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

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

@media (max-width: 820px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    main {
        padding: 18px 16px 50px;
    }

    .hero,
    .hero-track,
    .hero-slide img {
        min-height: 540px;
    }

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

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

    .category-grid,
    .stats-grid,
    .rank-layout,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-cover img {
        min-height: auto;
    }

    .footer-inner,
    .section-heading {
        display: block;
    }

    .section-more {
        display: inline-flex;
        margin-top: 14px;
    }
}

@media (max-width: 520px) {
    .brand-text {
        font-size: 20px;
    }

    .hero,
    .hero-track,
    .hero-slide img {
        min-height: 500px;
        border-radius: 22px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 28px;
    }

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

    .hero-dots {
        right: 20px;
        bottom: 18px;
    }

    .quick-links,
    .movie-grid,
    .movie-grid.dense,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .filter-select {
        flex: 1 1 100%;
    }
}
