:root {
    --bg: #111827;
    --bg-deep: #06070a;
    --panel: rgba(31, 41, 55, 0.72);
    --panel-solid: #1f2937;
    --line: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --muted: #d1d5db;
    --soft: #9ca3af;
    --amber: #f59e0b;
    --amber-light: #fcd34d;
    --orange: #ea580c;
    --red: #7f1d1d;
    --radius: 18px;
    --shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 10%, rgba(245, 158, 11, 0.18), transparent 32rem),
        radial-gradient(circle at 90% 4%, rgba(127, 29, 29, 0.25), transparent 28rem),
        linear-gradient(180deg, #111827 0%, #0b0f19 45%, #050608 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
    display: block;
    width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(127, 29, 29, 0.96), rgba(124, 45, 18, 0.96));
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px);
}

.site-header-inner {
    width: min(1280px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--amber-light);
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 0.04em;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #111827;
    background: linear-gradient(135deg, var(--amber-light), var(--orange));
    border-radius: 999px;
    font-size: 15px;
    box-shadow: 0 0 26px rgba(245, 158, 11, 0.5);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

.main-nav a:hover,
.footer-links a:hover,
.text-link:hover,
.section-title a:hover {
    color: var(--amber-light);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.large-search input,
.filter-panel input {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 9px 14px;
}

.header-search input:focus,
.large-search input:focus,
.filter-panel input:focus {
    border-color: rgba(252, 211, 77, 0.75);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
    background: rgba(0, 0, 0, 0.2);
}

.header-search button,
.large-search button,
.primary-btn,
.ghost-btn,
.filter-tags button {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.large-search button,
.primary-btn {
    color: #121826;
    background: linear-gradient(135deg, var(--amber-light), var(--amber), var(--orange));
    font-weight: 800;
}

.header-search button {
    padding: 9px 15px;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    padding: 8px 12px;
}

.hero {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-bg {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(17, 24, 39, 0.68) 42%, rgba(0, 0, 0, 0.22) 100%),
        linear-gradient(0deg, rgba(17, 24, 39, 1) 0%, transparent 38%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 120px 0 95px;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--amber-light);
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p {
    max-width: 760px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.75;
}

.hero-tags,
.tags,
.detail-tags,
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin-top: 24px;
}

.hero-tags span,
.tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 11px;
    color: var(--amber-light);
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.24);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
}

.primary-btn:hover,
.header-search button:hover,
.large-search button:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(252, 211, 77, 0.45);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dots button {
    width: 28px;
    height: 5px;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    border: 0;
    border-radius: 99px;
}

.hero-dots button.is-active {
    background: var(--amber-light);
}

.search-panel,
.section-wrap,
.page-main,
.site-footer,
.category-overview-grid {
    width: min(1280px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 560px);
    gap: 28px;
    align-items: center;
    margin-top: -48px;
    padding: 26px;
    position: relative;
    z-index: 10;
    background: rgba(31, 41, 55, 0.82);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-title h2,
.category-overview-card h2,
.detail-article h1,
.detail-article h2,
.side-card h2 {
    margin: 0;
    font-weight: 900;
}

.search-panel h2 {
    font-size: clamp(26px, 4vw, 46px);
}

.large-search {
    display: flex;
    gap: 10px;
}

.large-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
}

.large-search button {
    padding: 0 22px;
}

.section-wrap {
    margin-top: 72px;
}

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

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

.section-title a,
.text-link {
    color: var(--amber);
    font-weight: 800;
}

.rank-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(170px, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
}

.compact-card {
    display: grid;
    gap: 10px;
    min-width: 160px;
    padding: 12px;
    background: rgba(31, 41, 55, 0.74);
    border: 1px solid var(--line);
    border-radius: 18px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.compact-card:hover,
.movie-card:hover,
.category-tile:hover,
.rank-card:hover,
.category-overview-card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 18px 48px rgba(245, 158, 11, 0.12);
}

.compact-card img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
    background: #0b0f19;
}

.compact-card span {
    font-weight: 800;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.compact-card em {
    color: var(--soft);
    font-style: normal;
    font-size: 13px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.category-tile,
.category-overview-card,
.movie-card,
.rank-card,
.side-card,
.detail-article,
.filter-panel {
    background: rgba(31, 41, 55, 0.74);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}

.category-tile {
    display: grid;
    gap: 12px;
    min-height: 150px;
    padding: 22px;
    overflow: hidden;
    position: relative;
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -42px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.16);
}

.category-tile strong {
    font-size: 22px;
}

.category-tile span,
.category-overview-card p,
.movie-card .line,
.meta,
.rank-info p,
.detail-meta,
.side-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.65;
}

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

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

.movie-card {
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0b0f19;
}

.movie-card-medium .movie-poster-link,
.movie-card-small .movie-poster-link {
    aspect-ratio: 2 / 3;
}

.movie-card-large .movie-poster-link {
    aspect-ratio: 16 / 9;
}

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

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

.score {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 42px;
    padding: 5px 8px;
    color: #111827;
    background: var(--amber-light);
    border-radius: 999px;
    text-align: center;
    font-weight: 900;
}

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05));
    opacity: 0;
    font-weight: 900;
    transition: opacity 0.25s ease;
}

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

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

.movie-card h2 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h2 a,
.rank-info h2 a {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.meta {
    margin: 0 0 8px;
    font-size: 13px;
}

.movie-card .line {
    margin: 0 0 12px;
    font-size: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-main {
    padding-top: 36px;
    padding-bottom: 80px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: var(--soft);
}

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

.page-hero {
    position: relative;
    margin-bottom: 36px;
    padding: clamp(36px, 7vw, 84px);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(120, 53, 15, 0.58), rgba(127, 29, 29, 0.32), rgba(31, 41, 55, 0.75)),
        radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.25), transparent 24rem);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.slim-hero h1 {
    font-size: clamp(34px, 5vw, 64px);
}

.category-overview-grid {
    margin-top: 30px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-overview-card {
    padding: 24px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-overview-card h2 {
    margin-bottom: 10px;
    font-size: 26px;
}

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

.filter-panel {
    display: grid;
    gap: 16px;
    margin-bottom: 28px;
    padding: 18px;
}

.filter-panel input {
    width: 100%;
    padding: 14px 18px;
}

.filter-tags button {
    padding: 8px 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.filter-tags button:hover,
.filter-tags button.is-active {
    color: #111827;
    background: var(--amber-light);
}

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

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

.rank-card {
    display: grid;
    grid-template-columns: 52px 92px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #111827;
    background: var(--amber-light);
    border-radius: 14px;
    font-weight: 900;
}

.rank-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
    background: #0b0f19;
}

.rank-info h2 {
    margin: 0 0 7px;
    font-size: 22px;
    font-weight: 900;
}

.rank-info p {
    margin: 0 0 8px;
}

.rank-score {
    color: var(--amber-light);
    font-size: 26px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    display: block;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    color: #fff;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.18));
    border: 0;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    color: #111827;
    background: var(--amber-light);
    border-radius: 999px;
    font-size: 34px;
    box-shadow: 0 0 42px rgba(245, 158, 11, 0.52);
}

.player-overlay strong {
    padding: 0 20px;
    font-size: clamp(22px, 4vw, 42px);
}

.detail-article {
    margin-top: 24px;
    padding: clamp(22px, 4vw, 38px);
}

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

.detail-article h1 {
    font-size: clamp(30px, 4vw, 50px);
}

.detail-article h2 {
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--amber-light);
    font-size: 24px;
}

.detail-article p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 17px;
}

.detail-side {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 18px;
}

.detail-cover {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    background: #0b0f19;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.side-card {
    padding: 20px;
}

.side-card h2 {
    margin-bottom: 14px;
    font-size: 22px;
}

.side-card p {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

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

.side-card strong {
    color: #fff;
}

.side-card a,
.side-card span {
    color: var(--amber-light);
    text-align: right;
}

.detail-related {
    width: 100%;
}

.site-footer {
    margin-top: 70px;
    padding: 46px 0 28px;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 34px;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a {
    color: var(--muted);
}

.copyright {
    margin-top: 32px;
    color: var(--soft);
    text-align: center;
}

[data-card].is-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

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

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

    .detail-side {
        position: static;
        grid-template-columns: 220px 1fr;
    }
}

@media (max-width: 820px) {
    .site-header-inner {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

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

    .main-nav {
        display: none;
        width: 100%;
        margin-left: 0;
        padding: 12px 0 6px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

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

    .main-nav a {
        padding: 10px 12px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 12px;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding: 115px 0 88px;
    }

    .hero-arrow {
        display: none;
    }

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

    .large-search {
        flex-direction: column;
    }

    .large-search button {
        min-height: 46px;
    }

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

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

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

    .rank-card {
        grid-template-columns: 42px 72px 1fr;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
        font-size: 20px;
    }

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

    .detail-cover {
        max-width: 280px;
    }
}

@media (max-width: 520px) {
    .brand {
        font-size: 22px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 38px;
    }

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

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

    .rank-card {
        grid-template-columns: 38px 68px 1fr;
        gap: 12px;
    }

    .rank-info h2 {
        font-size: 18px;
    }
}
