:root {
    --amber: #f59e0b;
    --orange: #f97316;
    --red: #ef4444;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.14);
    --shadow-card: 0 14px 30px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-900);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 34%, #f8fafc 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber), var(--orange), var(--red));
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.24);
}

.nav-shell {
    width: min(1200px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

.desktop-nav a,
.mobile-nav a {
    opacity: 0.92;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    opacity: 1;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 14px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.16);
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 999px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    gap: 12px;
    flex-wrap: wrap;
    font-weight: 700;
}

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

.hero-carousel {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    color: var(--white);
    background: var(--slate-950);
}

.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.7s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.72;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.55), transparent 34%),
        linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62), rgba(249, 115, 22, 0.36));
}

.hero-content {
    position: relative;
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 116px 0 84px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-kicker {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
}

.hero-content h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 86px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.05em;
    text-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 26px;
    font-size: clamp(17px, 2vw, 24px);
    color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags span,
.tag-list span,
.detail-tags a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    padding: 8px 12px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-actions,
.card-actions,
.detail-title-row,
.section-heading,
.toolbar,
.movie-meta-row {
    display: flex;
    align-items: center;
}

.hero-actions {
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button,
.light-link,
.text-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
    padding: 13px 24px;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber), var(--orange));
    box-shadow: 0 14px 26px rgba(249, 115, 22, 0.3);
}

.primary-button:hover,
.ghost-button:hover,
.light-link:hover,
.text-link:hover {
    transform: translateY(-2px);
}

.primary-button.small {
    padding: 10px 16px;
    font-size: 14px;
}

.ghost-button {
    padding: 12px 22px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(18px);
}

.hero-controls button {
    border: 0;
    color: var(--white);
    background: transparent;
}

.hero-controls > button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

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

.hero-dots button.is-active {
    width: 28px;
    background: var(--white);
}

.section-shell {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 70px 0;
}

.quick-search-section .section-shell {
    padding: 30px 0 0;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 520px);
    gap: 24px;
    align-items: center;
    margin-top: -58px;
    padding: 28px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-content-card h1 {
    margin: 0;
    letter-spacing: -0.04em;
}

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

.wide-search {
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: var(--slate-100);
    box-shadow: inset 0 0 0 1px var(--slate-200);
}

.wide-search input,
.toolbar input,
.toolbar select {
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--slate-900);
    background: var(--white);
}

.wide-search input {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
}

.wide-search button {
    border: 0;
    padding: 0 22px;
    color: var(--white);
    background: linear-gradient(90deg, var(--amber), var(--orange));
    font-weight: 900;
}

.section-heading {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.section-heading h2 {
    font-size: clamp(30px, 4vw, 48px);
}

.section-heading.inverted {
    color: var(--white);
}

.text-link {
    color: var(--orange);
}

.light-link {
    color: var(--white);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #fed7aa, #f97316);
}

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

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

.quality-badge,
.rank-mark {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--white);
    font-size: 12px;
    font-weight: 950;
    backdrop-filter: blur(10px);
}

.quality-badge {
    right: 12px;
    padding: 5px 9px;
    background: rgba(15, 23, 42, 0.65);
}

.rank-mark {
    left: 12px;
    padding: 5px 10px;
    background: linear-gradient(90deg, var(--amber), var(--red));
}

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

.movie-meta-row {
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 800;
}

.category-pill {
    color: #b45309;
}

.movie-card h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.28;
}

.movie-card h3 a:hover {
    color: var(--orange);
}

.movie-card p {
    min-height: 58px;
    margin: 0 0 14px;
    color: var(--slate-500);
    font-size: 14px;
}

.tag-list span {
    padding: 4px 8px;
    color: var(--slate-700);
    background: var(--slate-100);
}

.card-actions {
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 800;
}

.highlight-section {
    width: min(1260px, calc(100% - 24px));
    margin-top: 20px;
    padding: 58px 30px;
    border-radius: 34px;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.38), transparent 28%),
        linear-gradient(135deg, #111827, #0f172a 55%, #7f1d1d);
}

.highlight-section .movie-card {
    color: var(--slate-900);
}

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

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

.category-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.category-cover-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

.category-cover-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.category-card-body span {
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
}

.category-card-body h3 {
    margin: 8px 0 8px;
    font-size: 22px;
}

.category-card-body p {
    margin: 0 0 14px;
    color: var(--slate-500);
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    color: var(--white);
    background:
        radial-gradient(circle at 18% 20%, rgba(254, 243, 199, 0.32), transparent 24%),
        linear-gradient(135deg, var(--amber), var(--orange), var(--red));
}

.page-hero .section-shell {
    padding-top: 86px;
    padding-bottom: 76px;
}

.page-hero h1 {
    font-size: clamp(40px, 6vw, 74px);
    line-height: 1;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
}

.toolbar {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
    padding: 16px;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.toolbar input,
.toolbar select {
    height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--slate-200);
}

.toolbar input {
    flex: 1 1 280px;
}

.result-count {
    color: var(--slate-500);
    font-weight: 900;
}

.breadcrumb-line {
    padding-top: 36px;
    padding-bottom: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--slate-500);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb-line a:hover {
    color: var(--orange);
}

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

.player-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000000;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

.player-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 8px;
    padding: 28px;
    border: 0;
    color: var(--white);
    text-align: center;
    background:
        radial-gradient(circle at center, rgba(245, 158, 11, 0.28), transparent 28%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.78));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 76px;
    height: 76px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber), var(--red));
    box-shadow: 0 18px 40px rgba(239, 68, 68, 0.34);
    font-size: 30px;
}

.play-overlay strong {
    max-width: 720px;
    font-size: clamp(22px, 4vw, 40px);
    line-height: 1.15;
}

.play-overlay em {
    font-style: normal;
    font-weight: 900;
    color: #fde68a;
}

.detail-content-card,
.poster-panel,
.side-rank {
    border-radius: var(--radius-xl);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-content-card {
    margin-top: 24px;
    padding: 30px;
}

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

.detail-content-card h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.lead-text {
    margin: 20px 0 24px;
    color: var(--slate-700);
    font-size: 20px;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 26px;
}

.detail-meta-grid div {
    padding: 15px;
    border-radius: 18px;
    background: var(--slate-100);
}

.detail-meta-grid span {
    display: block;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 900;
}

.detail-meta-grid strong {
    display: block;
    margin-top: 3px;
    font-size: 18px;
}

.detail-block {
    margin-top: 26px;
}

.detail-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.detail-block p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
}

.detail-tags a {
    padding: 8px 12px;
    color: #92400e;
    background: #fef3c7;
}

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

.poster-panel {
    overflow: hidden;
}

.poster-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #fed7aa, #f97316);
}

.poster-panel div {
    padding: 18px;
}

.poster-panel h2,
.side-rank h2 {
    margin: 0 0 8px;
}

.poster-panel p {
    margin: 0;
    color: var(--slate-500);
}

.side-rank {
    padding: 18px;
}

.side-rank a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid var(--slate-200);
    color: var(--slate-700);
    font-weight: 800;
}

.side-rank a:hover {
    color: var(--orange);
}

.side-rank span {
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-size: 12px;
}

.related-section {
    padding-top: 20px;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 34px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: var(--white);
}

.site-footer p {
    max-width: 440px;
    margin: 14px 0 0;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.footer-links a:hover {
    color: #fbbf24;
}

.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    border-top: 1px solid rgba(226, 232, 240, 0.14);
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

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

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

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

    .mobile-toggle {
        display: block;
    }

    .hero-carousel {
        min-height: 620px;
    }

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

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

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

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

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

@media (max-width: 620px) {
    .nav-shell,
    .section-shell,
    .footer-grid,
    .footer-bottom {
        width: min(100% - 22px, 1200px);
    }

    .brand {
        font-size: 18px;
    }

    .hero-content {
        width: min(100% - 22px, 1200px);
        padding-top: 92px;
    }

    .hero-actions,
    .section-heading,
    .detail-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .wide-search {
        border-radius: 22px;
        flex-direction: column;
    }

    .wide-search button {
        min-height: 48px;
    }

    .movie-grid,
    .featured-grid,
    .rank-grid,
    .category-grid,
    .large-category-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

    .toolbar input,
    .toolbar select {
        width: 100%;
    }

    .detail-content-card {
        padding: 22px;
    }

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