* {
    box-sizing: border-box;
}

:root {
    --bg: #f9fafb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --amber: #d97706;
    --amber-dark: #92400e;
    --orange: #f97316;
    --soft: #fff7ed;
    --shadow: 0 20px 50px rgba(17, 24, 39, 0.10);
    --radius: 24px;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.nav-wrap {
    height: 74px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 22px;
    color: var(--amber-dark);
    letter-spacing: -0.5px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    box-shadow: 0 10px 26px rgba(217, 119, 6, 0.28);
    font-size: 14px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.nav-link,
.nav-button {
    border: 0;
    background: transparent;
    font: inherit;
    color: #374151;
    font-weight: 700;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

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

.nav-dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 210px;
    padding: 10px;
    border-radius: 18px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s 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;
    font-weight: 700;
}

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

.top-search {
    display: flex;
    align-items: center;
    width: 300px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px;
}

.top-search input {
    border: 0;
    outline: 0;
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    background: transparent;
}

.top-search button,
.primary-btn,
.secondary-btn,
.filter-btn,
.hero-dot,
.mobile-toggle {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.top-search button,
.primary-btn {
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(217, 119, 6, 0.20);
}

.secondary-btn {
    border: 1px solid rgba(146, 64, 14, 0.22);
    color: var(--amber-dark);
    background: white;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
}

.mobile-toggle,
.mobile-nav {
    display: none;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    background: radial-gradient(circle at 20% 18%, rgba(251, 191, 36, 0.40), transparent 28%), linear-gradient(110deg, #fff7ed 0%, #fffbeb 45%, #fff 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.48));
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(18px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 48px;
    align-items: center;
    min-height: 600px;
    padding: 56px 0;
}

.hero-copy {
    max-width: 680px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--amber-dark);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -1.6px;
}

.hero p,
.page-hero p,
.detail-title p {
    color: #4b5563;
    font-size: 18px;
    margin: 18px 0 0;
}

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

.hero-card {
    position: relative;
    min-height: 430px;
    border-radius: 34px;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
    transform: rotate(1.5deg);
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 22%, rgba(0, 0, 0, 0.72));
}

.hero-card-info {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    color: white;
}

.hero-card-info strong {
    display: block;
    font-size: 26px;
    line-height: 1.2;
}

.hero-card-info span {
    display: inline-block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.84);
}

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

.hero-dot {
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: rgba(146, 64, 14, 0.22);
    transition: all 0.2s ease;
}

.hero-dot.active {
    width: 54px;
    background: var(--amber);
}

.content-section,
.page-hero,
.detail-layout,
.video-block {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.content-section {
    padding: 58px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.16;
    letter-spacing: -0.8px;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: white;
    border: 1px solid rgba(229, 231, 235, 0.84);
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
    position: relative;
    display: block;
    min-height: 280px;
    background-color: #f3f4f6;
    background-position: center;
    background-size: cover;
}

.poster-year,
.poster-type {
    position: absolute;
    top: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    color: white;
    font-size: 12px;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.68);
    backdrop-filter: blur(8px);
}

.poster-year {
    left: 14px;
}

.poster-type {
    right: 14px;
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

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

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

.card-meta {
    display: flex;
    gap: 10px;
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.tag-row span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--amber-dark);
    background: var(--soft);
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 180px;
    padding: 22px;
    border-radius: 28px;
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.06);
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 110px;
    right: -30px;
    bottom: -30px;
    border-radius: 50%;
    background: rgba(249, 115, 22, 0.12);
}

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

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

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

.rank-item {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px;
    border-radius: 22px;
    background: white;
    border: 1px solid var(--line);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    color: white;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.rank-item h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.rank-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

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

.page-hero {
    padding: 58px 0 34px;
}

.page-hero-card {
    padding: 42px;
    border-radius: 34px;
    background: linear-gradient(135deg, #fff7ed, #ffffff 58%, #fffbeb);
    border: 1px solid rgba(251, 191, 36, 0.28);
    box-shadow: 0 12px 36px rgba(17, 24, 39, 0.06);
}

.filter-bar,
.search-box {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.filter-btn {
    padding: 9px 15px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--line);
    color: #374151;
    font-weight: 800;
}

.filter-btn.active,
.filter-btn:hover {
    color: white;
    border-color: transparent;
    background: linear-gradient(135deg, var(--amber), var(--orange));
}

.search-box input {
    width: min(720px, 100%);
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    font: inherit;
    outline: 0;
    background: white;
}

.detail-layout {
    padding: 38px 0 70px;
}

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

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

.detail-head {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 28px;
    align-items: stretch;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #050505;
    box-shadow: var(--shadow);
}

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

.cover-side {
    min-height: 100%;
    border-radius: 30px;
    background-color: #f3f4f6;
    background-position: center;
    background-size: cover;
    box-shadow: var(--shadow);
}

.detail-title {
    margin-top: 28px;
    padding: 30px;
    border-radius: 30px;
    background: white;
    border: 1px solid var(--line);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

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

.detail-section p {
    color: #374151;
    margin: 12px 0 0;
    font-size: 16px;
}

.related-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.next-card {
    padding: 18px;
    border-radius: 22px;
    background: var(--soft);
    color: var(--amber-dark);
    font-weight: 900;
}

.site-footer {
    margin-top: 30px;
    padding: 48px 0;
    background: #111827;
    color: white;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.68);
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.hidden-card {
    display: none !important;
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
        width: 42px;
        height: 42px;
        border-radius: 14px;
        background: var(--soft);
        color: var(--amber-dark);
        font-size: 22px;
    }

    .mobile-nav.open {
        display: grid;
        gap: 8px;
        padding: 12px 16px 18px;
        background: white;
        border-top: 1px solid var(--line);
    }

    .mobile-link {
        padding: 10px 14px;
        border-radius: 14px;
        font-weight: 800;
    }

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

    .hero-inner,
    .detail-head {
        grid-template-columns: 1fr;
    }

    .cover-side {
        min-height: 360px;
    }

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

@media (max-width: 640px) {
    .nav-wrap {
        height: 66px;
    }

    .brand {
        font-size: 19px;
    }

    .hero {
        min-height: 680px;
    }

    .hero-inner {
        min-height: 680px;
        padding: 34px 0 78px;
        gap: 28px;
    }

    .hero-card {
        min-height: 300px;
        transform: none;
    }

    .section-head,
    .footer-grid,
    .related-nav {
        display: block;
    }

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

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

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

    .rank-score {
        grid-column: 2;
    }
}
