:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-strong: #263449;
    --line: #334155;
    --text: #f8fafc;
    --muted: #94a3b8;
    --soft: #cbd5e1;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-dark: #d97706;
    --shadow: rgba(245, 158, 11, 0.18);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 30%), var(--bg);
    color: var(--text);
}

img {
    background: #0b1120;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.97), rgba(15, 23, 42, 0.98));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(14px);
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    flex: 0 0 auto;
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #111827;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    font-weight: 900;
    box-shadow: 0 10px 28px var(--shadow);
}

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

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-desc {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-nav a,
.mobile-panel a,
.footer-links a {
    color: var(--soft);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
    color: var(--accent-light);
}

.search-form {
    position: relative;
    width: min(260px, 30vw);
}

.search-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
    padding: 11px 44px 11px 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.search-form button {
    position: absolute;
    right: 4px;
    top: 4px;
    height: calc(100% - 8px);
    min-width: 38px;
    border: 0;
    border-radius: 10px;
    color: #111827;
    background: var(--accent);
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    font-size: 22px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel-inner {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    display: grid;
    gap: 14px;
}

.hero {
    position: relative;
    height: clamp(430px, 58vw, 620px);
    overflow: hidden;
    background: #020617;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg) 0%, rgba(15, 23, 42, 0.82) 35%, rgba(15, 23, 42, 0.42) 65%, rgba(15, 23, 42, 0.16) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: clamp(48px, 8vw, 92px);
}

.hero-copy {
    width: min(720px, 100%);
}

.badge,
.meta-pill,
.tag,
.category-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    line-height: 1;
}

.badge {
    padding: 8px 12px;
    background: var(--accent);
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 18px;
}

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

.hero p {
    margin: 18px 0 0;
    max-width: 680px;
    color: var(--soft);
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.7;
}

.hero-actions,
.section-actions,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid var(--line);
    color: var(--text);
    background: rgba(30, 41, 59, 0.78);
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.btn-primary {
    border-color: transparent;
    background: var(--accent);
    color: #111827;
    box-shadow: 0 16px 38px var(--shadow);
}

.btn-primary:hover {
    background: var(--accent-light);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.48);
    color: var(--text);
    font-size: 30px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

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

.hero-arrow.prev {
    left: 24px;
}

.hero-arrow.next {
    right: 24px;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-dots button {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.52);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 32px;
    background: var(--accent);
}

.main-space {
    padding: 52px 0 68px;
}

.section {
    margin-top: 58px;
}

.section:first-child {
    margin-top: 0;
}

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

.section-title h2,
.page-head h1 {
    margin: 0;
    color: var(--text);
    letter-spacing: -0.03em;
}

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

.section-title p,
.page-head p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.grid {
    display: grid;
    gap: 24px;
}

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

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

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

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

.stack {
    display: grid;
    gap: 16px;
}

.movie-card,
.list-card,
.category-card,
.rank-card,
.info-panel,
.player-wrap {
    background: rgba(30, 41, 59, 0.94);
    border: 1px solid rgba(51, 65, 85, 0.72);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
}

.movie-card,
.list-card,
.category-card,
.rank-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover,
.list-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.42);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.card-media {
    position: relative;
    height: 210px;
    overflow: hidden;
    background: #020617;
}

.movie-card.large .card-media {
    height: 340px;
}

.card-media img,
.list-media img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.movie-card:hover .card-media img,
.list-card:hover .list-media img,
.rank-card:hover .rank-poster img {
    transform: scale(1.08);
}

.year-label,
.rank-num {
    position: absolute;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.72);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.year-label {
    right: 12px;
    bottom: 12px;
    padding: 6px 9px;
}

.card-body,
.category-body,
.rank-body {
    padding: 18px;
}

.movie-card.large .card-body {
    padding: 24px;
}

.movie-card h3,
.list-card h3,
.rank-card h3,
.category-card h2 {
    margin: 0;
    color: var(--text);
    transition: color 0.2s ease;
}

.movie-card:hover h3,
.list-card:hover h3,
.rank-card:hover h3,
.category-card:hover h2 {
    color: var(--accent-light);
}

.movie-card h3 {
    font-size: 17px;
    line-height: 1.45;
}

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

.movie-card p,
.list-card p,
.rank-card p,
.category-card p {
    color: var(--muted);
    line-height: 1.65;
}

.movie-card p {
    margin: 9px 0 14px;
    font-size: 14px;
}

.line-2,
.line-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-2 {
    -webkit-line-clamp: 2;
}

.line-3 {
    -webkit-line-clamp: 3;
}

.card-tags,
.meta-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.meta-pill,
.tag,
.category-chip {
    padding: 7px 10px;
    font-size: 12px;
    background: rgba(51, 65, 85, 0.88);
    color: var(--soft);
}

.meta-pill.accent,
.category-chip.accent {
    color: var(--accent-light);
}

.list-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 0;
}

.list-media {
    position: relative;
    min-height: 132px;
    overflow: hidden;
}

.list-body {
    padding: 16px;
}

.list-card h3 {
    font-size: 18px;
    line-height: 1.35;
}

.list-card p {
    margin: 8px 0 12px;
    font-size: 14px;
}

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

.category-card {
    padding: 24px;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-card h2 {
    font-size: 24px;
}

.category-card p {
    margin: 12px 0 18px;
}

.category-sample {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.page-head {
    margin-bottom: 28px;
}

.page-head h1 {
    font-size: clamp(30px, 5vw, 48px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

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

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

.detail-main {
    min-width: 0;
}

.player-wrap {
    position: relative;
    background: #000;
    border-radius: 18px;
}

.player-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 18px;
}

.player-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28));
    color: var(--text);
    cursor: pointer;
    transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-start {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #111827;
    font-size: 34px;
    box-shadow: 0 18px 40px var(--shadow);
}

.detail-title {
    margin: 28px 0 14px;
    font-size: clamp(30px, 5vw, 46px);
    line-height: 1.16;
    letter-spacing: -0.04em;
}

.info-panel {
    padding: 24px;
    margin-top: 22px;
}

.info-panel h2 {
    margin: 0 0 12px;
    font-size: 22px;
}

.info-panel p {
    margin: 0;
    color: var(--soft);
    line-height: 1.85;
}

.info-panel p + p {
    margin-top: 14px;
    color: var(--muted);
}

.detail-tags {
    margin-top: 18px;
}

.sidebar-title {
    margin: 0 0 16px;
    font-size: 22px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    position: relative;
}

.rank-poster {
    position: relative;
    height: 136px;
    overflow: hidden;
    background: #020617;
}

.rank-num {
    left: 10px;
    top: 10px;
    padding: 6px 9px;
    color: #111827;
    background: var(--accent);
}

.rank-card h3 {
    font-size: 16px;
    line-height: 1.45;
}

.rank-card p {
    margin: 7px 0 10px;
    font-size: 13px;
}

.filter-panel {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(30, 41, 59, 0.72);
}

.search-page-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-page-form input {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.85);
    color: var(--text);
    padding: 13px 16px;
    outline: none;
}

.search-page-form button {
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: #111827;
    padding: 0 22px;
    font-weight: 800;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.52);
    padding: 38px 0;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-grid p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
}

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

@media (max-width: 1080px) {
    .main-nav,
    .header-search {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

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

@media (max-width: 760px) {
    .header-inner {
        height: 64px;
    }

    .brand-name {
        font-size: 20px;
    }

    .brand-desc {
        display: none;
    }

    .hero {
        height: 520px;
    }

    .hero-arrow {
        display: none;
    }

    .grid-4,
    .grid-3,
    .grid-2,
    .category-grid,
    .feature-grid,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .section-head,
    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .list-card,
    .rank-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .list-media,
    .rank-poster {
        min-height: 128px;
        height: 100%;
    }

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

@media (max-width: 520px) {
    .header-inner,
    .container,
    .mobile-panel-inner {
        width: min(100% - 22px, 1280px);
    }

    .card-media {
        height: 190px;
    }

    .movie-card.large .card-media {
        height: 260px;
    }

    .list-card,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .list-media,
    .rank-poster {
        height: 190px;
    }
}
