
* {
    box-sizing: border-box;
}

:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --orange-800: #9a3412;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --shadow: 0 18px 45px rgba(41, 37, 36, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--stone-50);
    color: var(--stone-800);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

img {
    display: block;
    max-width: 100%;
    background: linear-gradient(135deg, var(--amber-100), var(--stone-200));
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(90deg, var(--amber-900), var(--orange-800), var(--amber-900));
    box-shadow: 0 12px 30px rgba(28, 25, 23, 0.24);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-icon,
.footer-brand span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--amber-900);
    background: #fff;
    font-size: 15px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.brand-text strong {
    display: block;
    font-size: 20px;
    line-height: 1.1;
}

.brand-text small {
    display: block;
    color: var(--amber-200);
    font-size: 12px;
    line-height: 1.3;
    margin-top: 3px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    font-size: 15px;
    white-space: nowrap;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: var(--amber-200);
}

.menu-button {
    display: none;
    color: #fff;
    background: transparent;
    border: 0;
    font-size: 30px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    background: rgba(120, 53, 15, 0.98);
    border-top: 1px solid rgba(253, 230, 138, 0.18);
}

.mobile-nav.open {
    display: block;
}

.mobile-nav nav {
    display: grid;
    gap: 12px;
    padding: 18px 0 22px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: var(--stone-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-position: center;
    background-size: cover;
    transform: scale(1.03);
    transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    height: 100%;
}

.hero-copy {
    width: min(680px, 100%);
    color: #fff;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.45);
}

.hero-tags,
.hero-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-tags span,
.hero-keywords span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(217, 119, 6, 0.92);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.hero-keywords span {
    color: var(--amber-100);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    font-weight: 500;
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0 0 24px;
    color: var(--stone-200);
    font-size: clamp(18px, 2vw, 23px);
}

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

.primary-button,
.ghost-button,
.form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button,
.form-button {
    color: #fff;
    background: var(--amber-600);
    box-shadow: 0 13px 28px rgba(217, 119, 6, 0.33);
}

.primary-button:hover,
.form-button:hover {
    background: var(--amber-700);
    transform: translateY(-1px);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(0, 0, 0, 0.44);
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.44);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

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

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

.hero-dots {
    position: absolute;
    right: 0;
    bottom: 34px;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 9px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    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-dot.active {
    width: 34px;
    background: #fff;
}

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

.tint-section {
    padding: 54px 0;
    background: linear-gradient(180deg, var(--amber-50), var(--stone-50));
}

.dark-section {
    padding: 60px 0;
    color: #fff;
    background: linear-gradient(180deg, var(--amber-900), var(--orange-800));
}

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

.section-heading div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-heading span {
    color: var(--amber-600);
    font-size: 22px;
}

.dark-section .section-heading span {
    color: var(--amber-200);
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.15;
}

.section-heading p {
    max-width: 560px;
    margin: 0;
    color: var(--stone-500);
}

.dark-section .section-heading p {
    color: var(--amber-100);
}

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

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(41, 37, 36, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--stone-200);
}

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

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

.type-pill,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.type-pill {
    right: 12px;
}

.rank-badge {
    left: 12px;
    background: var(--amber-600);
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    color: #fff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.74));
    transition: opacity 0.22s ease;
}

.poster-mask span {
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--amber-600);
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--stone-800);
    font-size: 18px;
    line-height: 1.35;
}

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

.card-body p {
    display: -webkit-box;
    min-height: 45px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--stone-600);
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--stone-500);
    font-size: 13px;
}

.genre-line {
    margin-top: 10px;
    overflow: hidden;
    color: var(--stone-500);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.small-card .card-body {
    padding: 14px;
}

.small-card .card-body h3 {
    font-size: 16px;
}

.category-card {
    display: block;
    min-height: 176px;
    padding: 24px;
    border-radius: 20px;
    color: var(--stone-800);
    background: #fff;
    box-shadow: 0 10px 30px rgba(41, 37, 36, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--stone-600);
}

.category-card span {
    color: var(--amber-700);
    font-weight: 800;
}

.filter-bar,
.search-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding: 18px;
    margin-bottom: 28px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(41, 37, 36, 0.08);
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
    min-height: 46px;
    border: 1px solid var(--stone-200);
    border-radius: 12px;
    padding: 0 14px;
    color: var(--stone-800);
    background: var(--stone-50);
    font: inherit;
    outline: none;
}

.filter-bar input,
.search-panel input {
    flex: 1 1 260px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.page-hero {
    padding: 56px 0;
    color: #fff;
    background: linear-gradient(90deg, var(--amber-900), var(--orange-800), var(--amber-900));
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 4vw, 48px);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--amber-100);
    font-size: 18px;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
    align-items: start;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

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

.play-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    color: #fff;
    background-position: center;
    background-size: cover;
    cursor: pointer;
}

.play-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.72));
}

.play-cover button {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--amber-600);
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    transition: transform 0.2s ease, background 0.2s ease;
}

.play-cover:hover button {
    background: var(--amber-700);
    transform: scale(1.06);
}

.play-cover.hidden {
    display: none;
}

.content-card,
.side-card {
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(41, 37, 36, 0.08);
}

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

.content-card h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}

.content-card h2 {
    margin: 30px 0 12px;
    font-size: 24px;
}

.content-card p {
    color: var(--stone-700);
    font-size: 17px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    padding-top: 20px;
    margin-top: 22px;
    border-top: 1px solid var(--stone-200);
}

.tag-list span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--stone-700);
    background: var(--stone-100);
    font-size: 13px;
}

.side-card {
    position: sticky;
    top: 92px;
    padding: 24px;
}

.side-card h2,
.side-card h3 {
    margin: 0 0 18px;
}

.info-list {
    display: grid;
    gap: 0;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--stone-100);
    color: var(--stone-600);
}

.info-row strong {
    color: var(--stone-800);
    text-align: right;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 15px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(41, 37, 36, 0.08);
}

.rank-row b {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #fff;
    background: var(--amber-600);
}

.rank-row h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.rank-row p {
    margin: 0;
    color: var(--stone-500);
    font-size: 14px;
}

.rank-row span {
    color: var(--amber-700);
    font-weight: 800;
}

.empty-tip {
    display: none;
    padding: 38px;
    border-radius: 18px;
    color: var(--stone-500);
    text-align: center;
    background: #fff;
}

.empty-tip.show {
    display: block;
}

.site-footer {
    color: var(--stone-200);
    background: linear-gradient(180deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 32px;
    padding: 44px 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #fff;
    font-size: 18px;
}

.site-footer p,
.site-footer a,
.site-footer span {
    display: block;
    color: var(--stone-400);
    font-size: 14px;
}

.site-footer a,
.site-footer span {
    margin: 7px 0;
}

.site-footer a:hover {
    color: var(--amber-400);
}

.site-footer h3 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
}

.footer-bottom {
    padding: 20px 16px;
    border-top: 1px solid rgba(214, 211, 209, 0.14);
    color: var(--stone-500);
    text-align: center;
    font-size: 13px;
}

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

    .menu-button {
        display: block;
    }

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

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

    .side-card {
        position: static;
    }

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

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

    .hero {
        min-height: 560px;
        height: 72vh;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.74));
    }

    .hero-arrow {
        display: none;
    }

    .hero-actions,
    .filter-bar,
    .search-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .grid-4,
    .grid-3,
    .grid-2,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .content-card {
        padding: 22px;
    }

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

    .rank-row span {
        grid-column: 2;
    }
}
