* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #111827;
    background: linear-gradient(180deg, #fffbeb 0%, #ffffff 48%, #f9fafb 100%);
}

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

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

button,
input,
select {
    font: inherit;
}

.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);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, #b45309, #ea580c);
    box-shadow: 0 10px 24px rgba(180, 83, 9, 0.28);
}

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 14px;
    color: #4b5563;
    font-weight: 700;
    border-radius: 999px;
    transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #92400e;
    background: #fef3c7;
}

.quick-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}

.quick-search input,
.mobile-nav input,
.home-search-inner input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: 0.2s ease;
}

.quick-search input {
    padding: 10px 12px;
}

.quick-search input:focus,
.mobile-nav input:focus,
.home-search-inner input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.quick-search button,
.mobile-nav button,
.home-search-inner button,
.filter-panel button,
.primary-btn,
.ghost-btn,
.section-link {
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.quick-search button,
.mobile-nav button,
.home-search-inner button,
.filter-panel button,
.primary-btn {
    color: #ffffff;
    background: #b45309;
}

.quick-search button {
    padding: 10px 16px;
}

.quick-search button:hover,
.mobile-nav button:hover,
.home-search-inner button:hover,
.filter-panel button:hover,
.primary-btn:hover {
    background: #92400e;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(180, 83, 9, 0.25);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: #374151;
}

.mobile-nav {
    display: none;
    padding: 0 16px 18px;
    border-top: 1px solid #f3f4f6;
    background: #ffffff;
}

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

.mobile-nav form {
    display: flex;
    gap: 8px;
}

.mobile-nav input {
    padding: 11px 12px;
}

.mobile-nav button {
    padding: 11px 16px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.56) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(690px, 100%);
    padding-top: 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    color: #ffffff;
    background: rgba(180, 83, 9, 0.9);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
    margin: 20px 0 16px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-line,
.detail-line {
    margin: 0 0 18px;
    font-size: clamp(18px, 2.3vw, 24px);
    line-height: 1.55;
    color: #fef3c7;
}

.hero-summary {
    margin: 18px 0 0;
    max-width: 620px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
}

.hero-tags,
.movie-meta,
.tag-row,
.hero-actions,
.page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 700;
}

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

.hero-actions {
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
}

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

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.hero-tag-row {
    margin-top: 18px;
}

.hero-tag-row span {
    color: #ffffff;
    background: rgba(180, 83, 9, 0.6);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(-50%);
}

.hero-controls button {
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
}

.hero-controls > button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 30px;
    backdrop-filter: blur(12px);
}

.hero-dots {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

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

.home-search-band {
    padding: 28px 0;
    background: linear-gradient(135deg, #92400e, #ea580c);
    color: #ffffff;
}

.home-search-inner {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
}

.home-search-inner h2 {
    margin: 0 0 8px;
    font-size: clamp(24px, 3vw, 34px);
}

.home-search-inner p {
    margin: 0;
    color: #fffbeb;
}

.home-search-inner form {
    display: flex;
    gap: 10px;
}

.home-search-inner input {
    padding: 14px 16px;
}

.home-search-inner button {
    padding: 14px 20px;
    color: #92400e;
    background: #ffffff;
}

.home-search-inner button:hover {
    color: #ffffff;
}

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

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 3vw, 38px);
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 0;
    color: #6b7280;
    line-height: 1.7;
}

.section-link {
    color: #92400e;
    background: #fef3c7;
}

.section-link:hover {
    color: #ffffff;
    background: #b45309;
}

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

.category-tile {
    min-height: 150px;
    padding: 22px;
    border: 1px solid #fde68a;
    border-radius: 24px;
    background: linear-gradient(160deg, #ffffff, #fffbeb);
    box-shadow: 0 18px 38px rgba(146, 64, 14, 0.08);
    transition: 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover,
.ranking-row:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 48px rgba(17, 24, 39, 0.12);
}

.category-tile span {
    display: block;
    margin-bottom: 10px;
    color: #92400e;
    font-size: 22px;
    font-weight: 900;
}

.category-tile p {
    margin: 0;
    color: #6b7280;
    line-height: 1.65;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid #f3f4f6;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
    transition: 0.2s ease;
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4.15;
    overflow: hidden;
    background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 48%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent);
}

.movie-heat {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 2;
    padding: 6px 9px;
    color: #ffffff;
    background: rgba(180, 83, 9, 0.92);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

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

.movie-meta {
    margin-bottom: 8px;
    color: #92400e;
    font-size: 12px;
    font-weight: 800;
}

.movie-meta span {
    max-width: 100%;
}

.movie-card h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.detail-side-card a:hover {
    color: #b45309;
}

.movie-card p {
    min-height: 58px;
    margin: 10px 0 12px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row span {
    padding: 5px 8px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 12px;
}

.compact .movie-card-body {
    padding: 12px;
}

.compact p {
    display: none;
}

.rank-section {
    padding-bottom: 72px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #f3f4f6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

.rank-item strong,
.ranking-number {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 13px;
    background: linear-gradient(135deg, #b45309, #f97316);
    font-weight: 900;
}

.rank-item span {
    font-weight: 900;
}

.rank-item em {
    color: #6b7280;
    font-style: normal;
    font-size: 13px;
}

.page-hero {
    padding: 86px 0 76px;
    color: #ffffff;
    background: linear-gradient(135deg, #92400e, #ea580c 60%, #f59e0b);
}

.page-hero h1 {
    max-width: 820px;
    margin-bottom: 14px;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #fffbeb;
    font-size: 18px;
    line-height: 1.8;
}

.page-actions {
    margin-top: 24px;
}

.category-overview-list {
    padding: 56px 0;
}

.category-overview-card {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 28px;
    align-items: center;
    padding: 26px;
    margin-bottom: 28px;
    border: 1px solid #f3f4f6;
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
    transition: 0.2s ease;
}

.category-overview-copy h2 {
    margin: 16px 0 12px;
    font-size: 32px;
}

.category-overview-copy p {
    color: #6b7280;
    line-height: 1.8;
}

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

.filter-panel {
    position: sticky;
    top: 88px;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 160px 160px 110px;
    gap: 12px;
    padding: 16px;
    margin: 32px 0;
    border: 1px solid #f3f4f6;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.filter-panel input,
.filter-panel select {
    padding: 12px 14px;
}

.filter-panel button {
    padding: 12px 16px;
}

.catalog-grid {
    padding-bottom: 64px;
}

.empty-state {
    display: none;
    padding: 42px;
    margin: 0 0 70px;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #f59e0b;
    border-radius: 24px;
    background: #fffbeb;
}

.empty-state.is-visible {
    display: block;
}

.ranking-page {
    padding-bottom: 64px;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 54px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid #f3f4f6;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.07);
    transition: 0.2s ease;
}

.ranking-cover {
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    background: #fef3c7;
}

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

.ranking-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.ranking-info p {
    margin: 0 0 10px;
    color: #6b7280;
    line-height: 1.6;
}

.small-btn {
    min-height: 40px;
    padding: 10px 16px;
}

.detail-hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    color: #ffffff;
    background: #111827;
}

.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(8px);
    transform: scale(1.06);
}

.detail-bg-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54)), linear-gradient(0deg, #111827 0%, transparent 48%);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    padding: 36px 0 60px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 38px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
}

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

.detail-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 42px;
    align-items: end;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4.2;
    object-fit: cover;
}

.detail-copy h1 {
    max-width: 860px;
}

.detail-tags {
    margin: 22px 0 24px;
}

.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
}

.detail-main {
    margin-top: -84px;
    position: relative;
    z-index: 5;
    padding-bottom: 72px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000000;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.25);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.7));
    cursor: pointer;
    z-index: 2;
}

.play-layer.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: #b45309;
    box-shadow: 0 20px 48px rgba(180, 83, 9, 0.45);
    font-size: 34px;
}

.play-layer strong {
    font-size: 20px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 330px;
    gap: 28px;
    margin-top: 34px;
}

.detail-article,
.detail-side-card {
    padding: 28px;
    border: 1px solid #f3f4f6;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
}

.detail-article h2,
.detail-side-card h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-article p {
    margin: 0 0 24px;
    color: #374151;
    line-height: 1.95;
    font-size: 16px;
}

.detail-side-card dl {
    display: grid;
    gap: 14px;
    margin: 0;
}

.detail-side-card div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.detail-side-card dt {
    color: #6b7280;
    font-weight: 800;
}

.detail-side-card dd {
    margin: 0;
    color: #111827;
    font-weight: 700;
}

.related-section {
    padding-bottom: 0;
}

.site-footer {
    padding-top: 54px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 38px;
}

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

.site-footer p {
    max-width: 420px;
    color: #9ca3af;
    line-height: 1.8;
}

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

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

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

.footer-bottom {
    padding: 20px 0;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .hero {
        min-height: 620px;
    }

    .home-search-inner,
    .category-overview-card,
    .detail-grid,
    .detail-content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        align-items: start;
    }

    .detail-poster {
        width: min(260px, 100%);
    }

    .filter-panel {
        position: static;
        grid-template-columns: 1fr 1fr;
    }

    .ranking-row {
        grid-template-columns: 44px 82px 1fr;
    }

    .ranking-row .primary-btn {
        grid-column: 1 / -1;
    }
}

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

    .hero {
        min-height: 680px;
    }

    .hero h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 42px;
    }

    .hero-controls {
        bottom: 16px;
    }

    .hero-controls > button {
        width: 40px;
        height: 40px;
    }

    .section-head,
    .home-search-inner form,
    .rank-item {
        align-items: stretch;
        flex-direction: column;
        display: flex;
    }

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

    .category-overview-card {
        padding: 18px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 38px 72px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .ranking-info h2 {
        font-size: 17px;
    }

    .ranking-info p {
        display: none;
    }

    .detail-main {
        margin-top: -40px;
    }

    .player-shell {
        border-radius: 18px;
    }

    .detail-article,
    .detail-side-card {
        padding: 20px;
        border-radius: 20px;
    }
}

@media (max-width: 420px) {
    .movie-grid,
    .category-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

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