* {
    box-sizing: border-box;
}

:root {
    --stone-950: #0c0a09;
    --stone-900: #1c1917;
    --stone-800: #292524;
    --stone-700: #44403c;
    --stone-600: #57534e;
    --stone-200: #e7e5e4;
    --stone-100: #f5f5f4;
    --stone-50: #fafaf9;
    --amber-950: #451a03;
    --amber-900: #78350f;
    --amber-800: #92400e;
    --amber-700: #b45309;
    --amber-600: #d97706;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --amber-200: #fde68a;
    --amber-100: #fef3c7;
    --amber-50: #fffbeb;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(28, 25, 23, 0.16);
    --shadow-soft: 0 10px 28px rgba(120, 53, 15, 0.12);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--stone-900);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, var(--stone-50) 0%, rgba(255, 251, 235, 0.78) 42%, var(--stone-100) 100%);
}

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

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--amber-50);
    background: linear-gradient(90deg, var(--amber-900), var(--amber-800), #9a3412);
    box-shadow: 0 12px 30px rgba(69, 26, 3, 0.25);
}

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

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

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-950);
    font-weight: 900;
    font-size: 22px;
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

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

.brand-copy strong {
    font-size: 24px;
    letter-spacing: -0.04em;
}

.brand-copy small {
    margin-top: 5px;
    color: rgba(253, 230, 138, 0.86);
    font-size: 12px;
}

.header-search {
    flex: 1 1 auto;
    max-width: 470px;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px solid rgba(253, 230, 138, 0.26);
    border-radius: 999px;
    background: rgba(69, 26, 3, 0.46);
}

.header-search input,
.page-search input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    color: var(--amber-50);
    background: transparent;
    padding: 10px 16px;
}

.header-search input::placeholder,
.page-search input::placeholder {
    color: rgba(253, 230, 138, 0.64);
}

.header-search button,
.page-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    color: var(--white);
    cursor: pointer;
    background: var(--amber-600);
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.page-search button:hover {
    transform: translateY(-1px);
    background: var(--amber-700);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 600;
    white-space: nowrap;
}

.main-nav a {
    color: rgba(255, 251, 235, 0.92);
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--amber-200);
}

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

.strip-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 9px 24px 11px;
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
}

.strip-inner::-webkit-scrollbar {
    display: none;
}

.strip-inner a {
    flex: 0 0 auto;
    color: rgba(255, 251, 235, 0.86);
    font-size: 14px;
}

.strip-inner a:hover {
    color: var(--amber-200);
}

.hero {
    background: var(--stone-950);
}

.hero-stage {
    position: relative;
    height: 600px;
    overflow: hidden;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, var(--amber-900), var(--stone-900));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.18));
}

.hero-copy {
    position: absolute;
    left: 50%;
    bottom: 86px;
    width: min(1180px, calc(100% - 48px));
    transform: translateX(-50%);
    color: var(--white);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-400);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 14px 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta,
.detail-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.78);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
    color: var(--white);
    background: var(--amber-600);
    box-shadow: 0 16px 30px rgba(217, 119, 6, 0.38);
}

.btn-primary:hover,
.btn-ghost:hover {
    transform: translateY(-2px) scale(1.02);
}

.btn-ghost {
    color: var(--amber-900);
    background: var(--amber-100);
    box-shadow: var(--shadow-soft);
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    font-size: 34px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.46);
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.05);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.55);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px 0;
}

.section-title {
    margin-bottom: 28px;
}

.section-title span {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--amber-700);
    font-weight: 900;
    letter-spacing: 0.12em;
}

.section-title h2,
.page-hero h1,
.detail-hero h1 {
    margin: 0;
    color: var(--stone-900);
    letter-spacing: -0.045em;
}

.section-title h2 {
    font-size: clamp(26px, 3.5vw, 38px);
}

.row-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-link {
    color: var(--amber-700);
    font-weight: 800;
}

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

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

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

.movie-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--amber-50), var(--stone-100));
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--amber-900), var(--stone-800));
}

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

.movie-link:hover .movie-poster img {
    transform: scale(1.09);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.poster-meta {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: flex;
    gap: 7px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    min-height: 48px;
    margin: 0 0 9px;
    color: var(--stone-900);
    font-size: 18px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-link:hover .movie-info h3 {
    color: var(--amber-800);
}

.movie-card-large .movie-info h3 {
    font-size: 21px;
}

.movie-info p {
    min-height: 42px;
    margin: 0 0 14px;
    color: var(--stone-600);
    font-size: 14px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.type-pill,
.chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    line-height: 1;
}

.type-pill {
    color: var(--stone-700);
    background: var(--stone-200);
}

.chip {
    color: var(--amber-900);
    background: var(--amber-100);
}

.chip-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.soft-panel {
    max-width: none;
    margin-top: 58px;
    padding: 58px max(24px, calc((100% - 1280px) / 2 + 24px));
    background: rgba(255, 251, 235, 0.72);
    border-top: 1px solid rgba(180, 83, 9, 0.12);
    border-bottom: 1px solid rgba(180, 83, 9, 0.12);
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 158px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--amber-900), var(--amber-700));
    box-shadow: var(--shadow-soft);
    color: var(--white);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -54px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

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

.category-tile span {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 12px;
    font-size: 23px;
    font-weight: 900;
}

.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
    color: rgba(255, 251, 235, 0.82);
    font-size: 14px;
    line-height: 1.7;
}

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

.split-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: start;
}

.latest-panel,
.rank-panel {
    border-radius: var(--radius);
    padding: 24px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.rank-row + .rank-row {
    margin-top: 14px;
}

.rank-link {
    display: grid;
    grid-template-columns: 48px 92px 1fr;
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.rank-no {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    background: var(--amber-700);
}

.rank-link img {
    width: 92px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--amber-900), var(--stone-800));
}

.rank-copy {
    min-width: 0;
    display: block;
}

.rank-copy strong,
.rank-copy em,
.rank-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy strong {
    color: var(--stone-900);
    font-size: 16px;
}

.rank-copy em {
    margin: 3px 0;
    color: var(--amber-800);
    font-size: 12px;
    font-style: normal;
}

.rank-copy small {
    color: var(--stone-600);
    font-size: 13px;
}

.rank-page-list {
    max-width: 980px;
}

.rank-page-list .rank-row {
    padding: 16px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 66px 24px 34px;
}

.page-hero h1,
.detail-hero h1 {
    margin-top: 12px;
    font-size: clamp(34px, 5vw, 56px);
}

.page-hero p,
.detail-hero p {
    max-width: 850px;
    color: var(--stone-600);
    font-size: 18px;
    line-height: 1.85;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--stone-600);
    font-size: 14px;
}

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

.category-movies {
    padding-bottom: 20px;
}

.search-hero {
    padding-bottom: 20px;
}

.page-search {
    max-width: 680px;
    display: flex;
    margin-top: 24px;
    padding: 5px;
    border-radius: 999px;
    background: var(--amber-900);
    box-shadow: var(--shadow-soft);
}

.search-summary {
    margin-bottom: 24px;
    color: var(--stone-700);
    font-weight: 700;
}

.detail-hero {
    color: var(--white);
    background: radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.25), transparent 32%), linear-gradient(135deg, var(--stone-950), var(--amber-950));
    max-width: none;
    padding-left: max(24px, calc((100% - 1280px) / 2 + 24px));
    padding-right: max(24px, calc((100% - 1280px) / 2 + 24px));
}

.detail-hero h1 {
    color: var(--white);
}

.detail-hero p {
    color: rgba(255, 255, 255, 0.78);
}

.detail-hero .breadcrumb {
    color: rgba(255, 255, 255, 0.64);
}

.detail-hero .breadcrumb a {
    color: var(--amber-300);
}

.detail-meta-line {
    margin-bottom: 0;
}

.detail-meta-line span {
    border-radius: 999px;
    padding: 7px 12px;
    color: var(--amber-50);
    background: rgba(255, 255, 255, 0.08);
}

.player-section {
    max-width: 1280px;
    margin: -10px auto 0;
    padding: 0 24px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.36);
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: var(--white);
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--amber-950);
    font-size: 34px;
    background: linear-gradient(135deg, var(--amber-200), var(--amber-500));
    box-shadow: 0 18px 45px rgba(245, 158, 11, 0.32);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 30px;
}

.detail-main,
.side-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-soft);
}

.detail-main {
    padding: 30px;
}

.detail-main h2,
.side-card h2 {
    margin: 0 0 16px;
    color: var(--stone-900);
    font-size: 24px;
}

.detail-main p {
    color: var(--stone-700);
    font-size: 17px;
    line-height: 2;
}

.side-card {
    overflow: hidden;
    padding: 20px;
    margin-bottom: 20px;
}

.side-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--amber-900), var(--stone-800));
}

.side-card dl,
.side-card dd {
    margin: 0;
}

.side-card dl div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--stone-200);
}

.side-card dl div:last-child {
    border-bottom: 0;
}

.side-card dt {
    color: var(--stone-600);
    font-size: 14px;
}

.side-card dd {
    color: var(--stone-900);
    font-weight: 800;
}

.tags-card .tag-cloud {
    justify-content: flex-start;
}

.site-footer {
    margin-top: 80px;
    color: var(--amber-100);
    background: linear-gradient(180deg, var(--amber-950), var(--stone-950));
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 30px;
    align-items: center;
}

.footer-inner h2 {
    margin: 0 0 10px;
    color: var(--white);
}

.footer-inner p {
    max-width: 760px;
    margin: 0;
    color: rgba(253, 230, 138, 0.78);
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-weight: 700;
}

.footer-links a:hover {
    color: var(--amber-300);
}

@media (max-width: 1080px) {
    .header-inner {
        height: auto;
        min-height: 76px;
        flex-wrap: wrap;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .header-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }

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

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

@media (max-width: 720px) {
    .header-inner {
        gap: 14px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-copy strong {
        font-size: 20px;
    }

    .main-nav {
        gap: 12px;
        font-size: 14px;
    }

    .strip-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-stage {
        height: 500px;
    }

    .hero-copy {
        width: calc(100% - 32px);
        bottom: 70px;
    }

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

    .hero-control {
        width: 38px;
        height: 38px;
        font-size: 28px;
    }

    .hero-prev {
        left: 12px;
    }

    .hero-next {
        right: 12px;
    }

    .content-section,
    .page-hero,
    .player-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .movie-grid,
    .category-grid,
    .grid-large,
    .full-categories {
        grid-template-columns: 1fr;
    }

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

    .rank-link {
        grid-template-columns: 42px 76px 1fr;
    }

    .rank-link img {
        width: 76px;
        height: 48px;
    }

    .page-search {
        border-radius: 24px;
        flex-direction: column;
        align-items: stretch;
    }

    .detail-main,
    .side-card,
    .latest-panel,
    .rank-panel {
        padding: 20px;
    }

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