html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

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

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;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fffbeb;
    background: linear-gradient(90deg, #78350f 0%, #92400e 52%, #78350f 100%);
    box-shadow: 0 18px 40px rgba(120, 53, 15, 0.28);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: #fcd34d;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 22px;
    font-weight: 700;
}

.nav-menu a {
    color: #fff7ed;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover {
    color: #fcd34d;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    color: #fffbeb;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    cursor: pointer;
}

.category-strip {
    border-top: 1px solid rgba(253, 230, 138, 0.18);
    background: rgba(69, 26, 3, 0.28);
}

.category-strip-inner {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0 12px;
}

.category-strip a {
    flex: 0 0 auto;
    padding: 8px 14px;
    color: #fef3c7;
    border: 1px solid rgba(253, 230, 138, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.category-strip a:hover {
    color: #78350f;
    background: #fcd34d;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 74vh;
    color: #fff7ed;
    background: #451a03;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.45), transparent 34%),
        radial-gradient(circle at 78% 18%, rgba(245, 158, 11, 0.28), transparent 30%),
        linear-gradient(135deg, rgba(69, 26, 3, 0.96), rgba(120, 53, 15, 0.78) 50%, rgba(28, 25, 23, 0.96));
    z-index: 0;
}

.hero-slider {
    position: relative;
    z-index: 1;
    min-height: 74vh;
}

.hero-slide {
    display: none;
    align-items: center;
    min-height: 74vh;
    padding: 76px 0 70px;
}

.hero-slide.is-active {
    display: flex;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    background-size: cover;
    background-position: center;
    filter: saturate(1.08) contrast(1.08);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(69, 26, 3, 0.68), rgba(28, 25, 23, 0.78));
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 420px);
    align-items: center;
    gap: 46px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

.hero-title {
    margin: 22px 0 16px;
    max-width: 760px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-lead {
    max-width: 700px;
    margin: 0 0 24px;
    color: #fde68a;
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.65;
}

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

.hero-meta span,
.movie-meta span,
.detail-meta span,
.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    color: #78350f;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 700;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #78350f;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.32);
}

.btn-secondary {
    color: #fff7ed;
    border-color: rgba(253, 230, 138, 0.45);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.hero-card {
    position: relative;
    padding: 14px;
    border: 1px solid rgba(253, 230, 138, 0.34);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(120, 53, 15, 0.5), rgba(245, 158, 11, 0.28));
}

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

.hero-poster-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 16px;
    border-radius: 18px;
    color: #fff7ed;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.2), rgba(28, 25, 23, 0.86));
    backdrop-filter: blur(8px);
}

.hero-poster-caption strong {
    display: block;
    font-size: 22px;
}

.hero-poster-caption span {
    display: block;
    margin-top: 6px;
    color: #fcd34d;
    font-size: 13px;
}

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

.hero-controls button,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 40px;
    height: 40px;
    color: #fff7ed;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.hero-dots {
    display: flex;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(28, 25, 23, 0.28);
}

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

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

.section {
    padding: 64px 0;
}

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

.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    color: #b45309;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section h1,
.section h2,
.page-hero h1,
.detail-title {
    margin: 0;
    color: #292524;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section h2,
.page-hero h1,
.detail-title {
    font-size: clamp(28px, 4vw, 46px);
}

.section-desc,
.page-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #57534e;
    line-height: 1.8;
    font-size: 17px;
}

.search-panel {
    margin: 0 0 28px;
    padding: 20px;
    border: 1px solid #fde68a;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 40px rgba(120, 53, 15, 0.08);
    backdrop-filter: blur(14px);
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.search-input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    color: #292524;
    background: #fffbeb;
    outline: none;
}

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

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-tags button {
    padding: 8px 13px;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    color: #92400e;
    background: #fff7ed;
    cursor: pointer;
    font-weight: 800;
}

.filter-tags button.is-active {
    color: #fff7ed;
    background: #92400e;
    border-color: #92400e;
}

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

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

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

.card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 35px rgba(120, 53, 15, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(217, 119, 6, 0.34);
    box-shadow: 0 26px 55px rgba(120, 53, 15, 0.18);
}

.poster-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #78350f 0%, #f59e0b 100%);
}

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

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

.card-badge,
.card-duration,
.rank-no {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(28, 25, 23, 0.76);
    backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 800;
}

.card-badge {
    left: 10px;
    top: 10px;
    padding: 5px 9px;
}

.card-duration {
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
}

.play-mark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff7ed;
    font-size: 46px;
    opacity: 0;
    background: rgba(28, 25, 23, 0.34);
    transition: opacity 0.22s ease;
}

.card-link:hover .play-mark {
    opacity: 1;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
}

.card-body h3 {
    margin: 0;
    color: #292524;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.card-body p {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    color: #57534e;
    font-size: 14px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    color: #78716c;
    font-size: 12px;
    font-weight: 700;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    padding: 28px;
    border-radius: 28px;
    color: #fff7ed;
    background:
        radial-gradient(circle at top right, rgba(253, 230, 138, 0.36), transparent 40%),
        linear-gradient(135deg, #78350f 0%, #92400e 58%, #292524 100%);
    box-shadow: 0 22px 48px rgba(120, 53, 15, 0.18);
}

.category-card h2 {
    margin: 0 0 12px;
    font-size: 28px;
    color: #fff7ed;
}

.category-card p {
    margin: 0 0 22px;
    max-width: 620px;
    color: #fde68a;
    line-height: 1.75;
}

.category-card .mini-list {
    display: grid;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.category-card .mini-list li {
    color: #fffbeb;
    font-weight: 700;
}

.page-hero {
    padding: 62px 0;
    color: #fff7ed;
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.34), transparent 30%),
        linear-gradient(135deg, #78350f 0%, #92400e 54%, #292524 100%);
}

.page-hero h1,
.page-hero p {
    color: #fff7ed;
}

.page-hero p {
    color: #fde68a;
}

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

.rank-item {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.rank-link {
    display: grid;
    grid-template-columns: 58px 76px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 12px 16px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #78350f;
    background: #fde68a;
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    width: 76px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

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

.rank-main h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 900;
}

.rank-main p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #57534e;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-hot {
    color: #b45309;
    font-weight: 900;
    white-space: nowrap;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 28px 0;
    color: #78716c;
    font-size: 14px;
    font-weight: 700;
}

.breadcrumb a {
    color: #92400e;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
    padding: 32px 0 64px;
}

.player-shell,
.detail-card,
.side-card {
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.16);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 55px rgba(120, 53, 15, 0.12);
}

.video-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #1c1917;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #1c1917;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #fff7ed;
    background: linear-gradient(180deg, rgba(28, 25, 23, 0.08), rgba(28, 25, 23, 0.58));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: #78350f;
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
    max-width: 84%;
    text-align: center;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.25;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

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

.detail-title {
    margin-bottom: 16px;
}

.detail-meta {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f4;
}

.content-block + .content-block {
    margin-top: 26px;
}

.content-block h2 {
    margin: 0 0 12px;
    color: #292524;
    font-size: 22px;
    font-weight: 900;
}

.content-block p {
    margin: 0;
    color: #44403c;
    line-height: 1.9;
    font-size: 16px;
}

.review-box {
    padding: 22px;
    border-left: 5px solid #f59e0b;
    border-radius: 18px;
    background: #fffbeb;
}

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

.side-card h2 {
    margin: 0 0 16px;
    color: #292524;
    font-size: 22px;
    font-weight: 900;
}

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

.side-link {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fffbeb;
    transition: background 0.2s ease, transform 0.2s ease;
}

.side-link:hover {
    background: #fef3c7;
    transform: translateY(-2px);
}

.side-link img {
    width: 70px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

.side-link strong {
    display: block;
    color: #292524;
    font-size: 14px;
    line-height: 1.4;
}

.side-link span {
    display: block;
    margin-top: 5px;
    color: #78716c;
    font-size: 12px;
}

.empty-state {
    display: none;
    padding: 36px;
    text-align: center;
    color: #78716c;
    border: 1px dashed #f59e0b;
    border-radius: 22px;
    background: rgba(255, 251, 235, 0.78);
}

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

.site-footer {
    color: #d6d3d1;
    background: linear-gradient(90deg, #1c1917 0%, #292524 55%, #1c1917 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.footer-brand {
    color: #fff7ed;
    font-size: 20px;
    font-weight: 900;
}

.site-footer p,
.site-footer li {
    color: #a8a29e;
    line-height: 1.8;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer h2,
.site-footer h3 {
    margin: 0 0 12px;
    color: #fff7ed;
}

.footer-bottom {
    padding: 20px 0 28px;
    border-top: 1px solid rgba(214, 211, 209, 0.12);
    color: #a8a29e;
    text-align: center;
}

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

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

    .hero-card {
        max-width: 420px;
    }

    .side-card {
        position: static;
    }
}

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

    .nav-toggle {
        display: inline-flex;
    }

    .nav-menu {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border-radius: 18px;
        background: #78350f;
        box-shadow: 0 20px 40px rgba(28, 25, 23, 0.3);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 14px;
        border-radius: 12px;
    }

    .brand-name {
        max-width: 210px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .hero,
    .hero-slider,
    .hero-slide {
        min-height: auto;
    }

    .hero-slide {
        padding: 48px 0 84px;
    }

    .hero-grid {
        gap: 28px;
    }

    .hero-card {
        width: 100%;
    }

    .section {
        padding: 44px 0;
    }

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

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

    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-link {
        grid-template-columns: 44px 62px minmax(0, 1fr);
    }

    .rank-hot {
        grid-column: 3;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

    .hero-title {
        font-size: 38px;
    }

    .card-link {
        flex-direction: row;
    }

    .poster-box {
        width: 120px;
        flex: 0 0 120px;
    }

    .card-body p {
        min-height: auto;
    }
}
