:root {
    color-scheme: light;
    --site-bg: #f8fafc;
    --site-panel: #ffffff;
    --site-text: #111827;
    --site-muted: #64748b;
    --site-soft: #fff7ed;
    --site-line: #e5e7eb;
    --site-orange: #ea580c;
    --site-amber: #f59e0b;
    --site-dark: #0f172a;
    --site-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--site-text);
    background: linear-gradient(180deg, #ffffff 0%, var(--site-bg) 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 22px;
    max-width: 1280px;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.site-logo__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-orange), var(--site-amber));
    box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.site-logo__text {
    display: grid;
    line-height: 1.15;
}

.site-logo strong {
    font-size: 21px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #ea580c, #d97706);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.site-logo em {
    margin-top: 3px;
    color: var(--site-muted);
    font-size: 12px;
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.site-nav a {
    color: #334155;
    font-weight: 650;
    font-size: 15px;
    transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--site-orange);
}

.site-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 300px;
    padding: 5px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fff7ed;
}

.site-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 8px 10px 8px 14px;
    color: #334155;
    background: transparent;
}

.site-search button,
.primary-button,
.ghost-button,
.movie-card__link,
.rank-row__play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    font-weight: 750;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search button,
.primary-button,
.movie-card__link,
.rank-row__play {
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-orange), var(--site-amber));
    box-shadow: 0 12px 26px rgba(234, 88, 12, 0.24);
}

.site-search button {
    padding: 8px 15px;
}

.primary-button,
.ghost-button {
    min-height: 46px;
    padding: 0 22px;
}

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

.primary-button:hover,
.ghost-button:hover,
.movie-card__link:hover,
.rank-row__play:hover,
.site-search button:hover {
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
}

.mobile-panel {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px 24px 22px;
    border-top: 1px solid var(--site-line);
    background: #ffffff;
}

.mobile-panel.is-open {
    display: grid;
}

.mobile-panel a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
    font-weight: 650;
}

.hero-slider {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--site-dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-slide__content {
    width: min(720px, calc(100% - 48px));
    margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: #ffffff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(249, 115, 22, 0.92);
    box-shadow: 0 10px 28px rgba(249, 115, 22, 0.35);
    font-weight: 760;
}

.hero-slide h1,
.detail-hero h1,
.page-hero h1 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero-lead,
.detail-hero p,
.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-meta,
.hero-tags,
.detail-tags,
.movie-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-meta {
    margin: 22px 0 14px;
}

.hero-meta span,
.hero-tags span,
.detail-tags span,
.movie-card__tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
}

.hero-meta span,
.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

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

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

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

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

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

.section-block--tight {
    padding-top: 36px;
    padding-bottom: 36px;
}

.section-block--soft {
    max-width: none;
    padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
    padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.section-heading span {
    color: var(--site-orange);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

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

.section-heading a {
    color: var(--site-orange);
    font-weight: 780;
}

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

.category-tile,
.category-card-large {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    border-radius: 24px;
    padding: 22px;
    color: #ffffff;
    background-position: center;
    background-size: cover;
    box-shadow: var(--site-shadow);
}

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

.category-tile span,
.category-card-large p {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.65;
}

.movie-row {
    display: grid;
    grid-auto-columns: minmax(260px, 1fr);
    grid-auto-flow: column;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: var(--site-panel);
    box-shadow: 0 15px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    scroll-snap-align: start;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.15);
}

.movie-card__cover {
    display: block;
    height: 260px;
    background-color: #1e293b;
    background-position: center;
    background-size: cover;
}

.movie-card__body {
    padding: 18px;
}

.movie-card__meta,
.compact-card__meta,
.rank-row__meta {
    color: var(--site-orange);
    font-size: 13px;
    font-weight: 760;
    line-height: 1.5;
}

.movie-card h3,
.compact-card h3,
.rank-row h3 {
    margin: 8px 0 8px;
    color: #111827;
    font-size: 20px;
    line-height: 1.28;
}

.movie-card p,
.compact-card p,
.rank-row p {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0 0 14px;
    overflow: hidden;
    color: var(--site-muted);
    line-height: 1.62;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card__tags span,
.detail-tags span {
    color: #9a3412;
    background: #ffedd5;
}

.movie-card__link {
    width: 100%;
    min-height: 40px;
    margin-top: 16px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 58px 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-row__num {
    color: var(--site-orange);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-row__poster {
    width: 96px;
    height: 118px;
    border-radius: 16px;
    background-color: #1e293b;
    background-position: center;
    background-size: cover;
}

.rank-row__play {
    min-width: 70px;
    min-height: 38px;
}

.page-hero,
.detail-hero {
    display: flex;
    align-items: center;
    min-height: 360px;
    padding: 72px max(24px, calc((100vw - 1280px) / 2 + 24px));
    color: #ffffff;
    background-color: #0f172a;
    background-position: center;
    background-size: cover;
}

.page-hero--orange {
    background-image: radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 32%), linear-gradient(135deg, #ea580c, #f59e0b);
}

.page-hero span {
    display: inline-flex;
    color: #ffedd5;
    font-weight: 800;
    letter-spacing: 0.12em;
}

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

.category-card-large {
    display: grid;
    align-content: space-between;
    min-height: 300px;
}

.category-card-large span {
    color: #fed7aa;
    font-weight: 800;
}

.category-card-large h2 {
    margin: 8px 0 12px;
    font-size: 32px;
}

.category-card-large__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-card-large__links a,
.category-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-weight: 720;
}

.category-card-large__links a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-nav a {
    color: #9a3412;
    background: #ffedd5;
}

.category-nav a.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-orange), var(--site-amber));
}

.filter-box {
    margin-bottom: 26px;
}

.filter-box input {
    width: 100%;
    min-height: 52px;
    border: 1px solid #fed7aa;
    border-radius: 18px;
    outline: 0;
    padding: 0 18px;
    color: #334155;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.filter-box--large input {
    min-height: 60px;
    font-size: 18px;
}

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

.compact-card {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 14px;
    min-height: 126px;
    padding: 14px;
    border: 1px solid var(--site-line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.compact-card__poster {
    border-radius: 16px;
    background-color: #1e293b;
    background-position: center;
    background-size: cover;
}

.detail-hero {
    min-height: 520px;
}

.detail-hero__content {
    max-width: 820px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 650;
}

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

.watch-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    max-width: 1280px;
    margin: -90px auto 0;
    padding: 0 24px 24px;
    position: relative;
    z-index: 2;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.34);
}

.movie-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #020617;
}

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68));
    cursor: pointer;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    padding-left: 5px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--site-orange), var(--site-amber));
    box-shadow: 0 18px 40px rgba(234, 88, 12, 0.42);
    font-size: 36px;
}

.player-start strong {
    font-size: 20px;
}

.player-shell.is-playing .player-start {
    display: none;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
}

.player-message.is-visible {
    display: block;
}

.detail-content,
.side-card {
    margin-top: 24px;
    border: 1px solid var(--site-line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-content {
    padding: 28px;
}

.detail-content h2,
.side-card h2 {
    margin: 0 0 14px;
    font-size: 24px;
}

.detail-content p {
    margin: 0 0 22px;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 22px;
}

.side-card {
    padding: 22px;
}

.side-card dl {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px 10px;
    margin: 0 0 18px;
}

.side-card dt {
    color: var(--site-muted);
    font-weight: 700;
}

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

.side-links {
    display: grid;
    gap: 10px;
}

.side-links a {
    padding: 11px 12px;
    border-radius: 14px;
    color: #334155;
    background: #f8fafc;
    font-weight: 650;
}

.side-links a:hover {
    color: var(--site-orange);
    background: #fff7ed;
}

.site-footer {
    margin-top: 42px;
    border-top: 1px solid var(--site-line);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 38px 24px;
}

.site-footer__brand {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--site-orange);
    font-size: 22px;
    font-weight: 850;
}

.site-footer p {
    max-width: 620px;
    margin: 0;
    color: var(--site-muted);
    line-height: 1.7;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-content: start;
}

.site-footer__links a {
    color: #334155;
    font-weight: 700;
}

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

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

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-search {
        flex-basis: 260px;
        margin-left: auto;
    }

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

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

    .watch-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .site-header__inner {
        padding: 0 16px;
    }

    .site-search {
        display: none;
    }

    .hero-slider {
        min-height: 650px;
    }

    .hero-slide__content {
        width: calc(100% - 32px);
        margin-left: 16px;
    }

    .section-block,
    .section-block--soft {
        padding: 44px 16px;
    }

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

    .category-grid,
    .category-large-grid,
    .rank-list--home,
    .compact-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-card__cover {
        height: 220px;
    }

    .rank-row {
        grid-template-columns: 48px 76px minmax(0, 1fr);
    }

    .rank-row__play {
        display: none;
    }

    .rank-row__poster {
        width: 76px;
        height: 96px;
    }

    .detail-hero,
    .page-hero {
        min-height: 420px;
        padding: 54px 16px;
    }

    .watch-section {
        margin-top: -50px;
        padding: 0 16px 16px;
    }

    .site-footer__inner {
        flex-direction: column;
        padding: 32px 16px;
    }
}

@media (max-width: 520px) {
    .site-logo em {
        display: none;
    }

    .movie-grid,
    .movie-grid--six {
        grid-template-columns: 1fr;
    }

    .movie-card__cover {
        height: 280px;
    }

    .compact-card {
        grid-template-columns: 78px minmax(0, 1fr);
    }
}
