:root {
    --orange: #ea580c;
    --orange-dark: #c2410c;
    --red: #dc2626;
    --amber: #f59e0b;
    --blue: #2563eb;
    --green: #059669;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.65;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: var(--orange);
    letter-spacing: -0.02em;
}

.brand {
    flex: 0 0 auto;
    font-size: 24px;
}

.brand-icon,
.footer-brand span {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(234, 88, 12, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
    color: var(--gray-700);
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"],
.mobile-panel a:hover {
    color: var(--orange);
}

.header-search {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.header-search input,
.mobile-panel input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-900);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 220px;
    padding: 10px 14px;
    border-radius: 999px 0 0 999px;
}

.header-search button,
.search-page-form button,
.mobile-panel button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
    padding: 11px 18px;
    border-radius: 0 999px 999px 0;
}

.header-search input:focus,
.mobile-panel input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--gray-700);
    font-size: 26px;
    cursor: pointer;
}

.mobile-panel {
    border-top: 1px solid var(--gray-200);
    padding: 16px;
    background: #fff;
}

.mobile-panel form {
    display: flex;
    margin-bottom: 16px;
}

.mobile-panel input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 12px 0 0 12px;
}

.mobile-panel button {
    padding: 12px 16px;
    border-radius: 0 12px 12px 0;
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
}

.mobile-panel nav a {
    padding: 10px 12px;
    border-radius: 10px;
}

.mobile-panel nav a:hover {
    background: #fff7ed;
}

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(125deg, #ea580c 0%, #dc2626 62%, #7f1d1d 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.24), transparent 34%), radial-gradient(circle at 82% 28%, rgba(255, 237, 213, 0.18), transparent 30%), linear-gradient(to top, rgba(17, 24, 39, 0.22), transparent 44%);
}

.hero-stage {
    position: relative;
    min-height: 560px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 48px;
    align-items: center;
    opacity: 0;
    transform: translateX(28px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy .eyebrow,
.sub-hero .eyebrow,
.detail-copy .eyebrow {
    color: #ffedd5;
}

.hero-copy h1,
.sub-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-desc,
.sub-hero p,
.detail-copy p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(17px, 2.1vw, 23px);
}

.hero-focus {
    display: grid;
    gap: 6px;
    width: min(680px, 100%);
    margin: 28px 0;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(127, 29, 29, 0.28);
    backdrop-filter: blur(10px);
}

.hero-focus strong {
    font-size: 24px;
}

.hero-focus span {
    color: rgba(255, 255, 255, 0.82);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 999px;
    font-weight: 850;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.header-search button:hover,
.search-page-form button:hover,
.mobile-panel button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(127, 29, 29, 0.22);
}

.btn.primary {
    color: var(--orange);
    background: #fff;
}

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

.hero-poster {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    max-height: 430px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 32px 70px rgba(17, 24, 39, 0.32);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 24, 39, 0.65), transparent 55%);
}

.hero-poster span {
    position: absolute;
    left: 20px;
    bottom: 18px;
    z-index: 1;
    padding: 7px 12px;
    background: rgba(17, 24, 39, 0.72);
    border-radius: 999px;
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 0;
    bottom: 44px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-controls button {
    border: 0;
    cursor: pointer;
}

.hero-prev,
.hero-next {
    width: 42px;
    height: 42px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    font-size: 26px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    background: rgba(255, 255, 255, 0.44);
    border-radius: 50%;
}

.hero-dot.is-active {
    width: 28px;
    background: #fff;
    border-radius: 999px;
}

.feature-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    margin-top: -70px;
    margin-bottom: 64px;
}

.section-block {
    padding: 56px 0;
}

.white-section {
    background: #fff;
}

.green-section {
    background: linear-gradient(135deg, #f0fdf4, #ccfbf1);
}

.ranking-preview {
    background: linear-gradient(135deg, #fffbeb, #ffedd5);
}

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

.section-heading span {
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 4px 0 0;
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.15;
}

.section-heading a,
.text-link {
    color: var(--orange);
    font-weight: 850;
}

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

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

.movie-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(234, 88, 12, 0.28);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}

.movie-card img {
    transition: transform 0.35s ease;
}

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

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    color: #fff;
    background: rgba(17, 24, 39, 0.76);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.card-body {
    padding: 16px;
}

.card-body h2,
.wide-info h2,
.content-panel h2,
.category-card-large h2 {
    margin: 0 0 8px;
    line-height: 1.25;
}

.card-body h2 {
    font-size: 18px;
}

.card-body h2 a,
.wide-info h2 a,
.category-card-large h2 a {
    transition: color 0.2s ease;
}

.card-body h2 a:hover,
.wide-info h2 a:hover,
.category-card-large h2 a:hover {
    color: var(--orange);
}

.card-body p,
.wide-info p,
.category-card-large p,
.content-panel p {
    color: var(--gray-500);
}

.card-body p {
    display: -webkit-box;
    min-height: 3.2em;
    margin: 0 0 12px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.wide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--gray-500);
    font-size: 13px;
}

.card-meta span:first-child {
    color: var(--orange);
    font-weight: 800;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-row span {
    padding: 4px 9px;
    color: var(--orange-dark);
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.movie-card.compact .card-body h2 {
    font-size: 15px;
}

.movie-card.compact .card-body p,
.movie-card.compact .tag-row {
    display: none;
}

.wide-grid,
.ranking-list,
.full-ranking,
.side-list {
    display: grid;
    gap: 16px;
}

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

.wide-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
}

.wide-cover {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
}

.wide-info h2 {
    font-size: 19px;
}

.wide-info p {
    display: -webkit-box;
    margin: 0 0 8px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-number {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    border-radius: 50%;
    font-size: 18px;
    font-weight: 950;
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.26);
}

.full-ranking .wide-card {
    grid-template-columns: 52px 96px minmax(0, 1fr) auto;
}

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

.category-tile {
    display: grid;
    gap: 10px;
    min-height: 170px;
    padding: 28px;
    color: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-5px) scale(1.01);
}

.category-tile span {
    font-size: 26px;
    font-weight: 950;
}

.category-tile em {
    font-style: normal;
    opacity: 0.88;
}

.tile-0 {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.tile-1 {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.tile-2 {
    background: linear-gradient(135deg, #059669, #14b8a6);
}

.tile-3 {
    background: linear-gradient(135deg, #d97706, #eab308);
}

.sub-hero,
.detail-hero {
    color: #fff;
    background: linear-gradient(135deg, #ea580c, #dc2626 72%, #7f1d1d);
}

.sub-hero {
    padding: 78px 0 64px;
}

.amber-hero {
    background: linear-gradient(135deg, #d97706, #ea580c 70%, #991b1b);
}

.sub-hero h1 {
    font-size: clamp(38px, 5vw, 58px);
}

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

.category-card-large {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    padding: 22px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 18px;
}

.category-covers img {
    min-height: 0;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px 160px;
    gap: 14px;
    margin: -28px 0 32px;
    padding: 18px;
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
    min-height: 48px;
    padding: 0 15px;
    border-radius: 12px;
}

.category-movie-grid {
    padding-bottom: 56px;
}

.search-page-form {
    display: flex;
    gap: 10px;
    width: min(620px, 100%);
    margin-top: 26px;
}

.search-page-form input {
    flex: 1;
}

.search-page-form button {
    min-width: 120px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
}

.search-results-wrap {
    padding: 48px 0;
}

.no-result {
    grid-column: 1 / -1;
    padding: 40px;
    text-align: center;
    color: var(--gray-500);
    background: #fff;
    border-radius: 22px;
}

.detail-hero {
    padding: 52px 0;
}

.detail-hero-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(17, 24, 39, 0.34);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

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

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

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

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #020617;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.player-video,
.player-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.player-video {
    z-index: 1;
    background: #020617;
}

.player-cover {
    z-index: 2;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: #fff;
    cursor: pointer;
    background: #020617;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.player-cover img {
    position: absolute;
    inset: 0;
    filter: saturate(1.05);
}

.player-cover strong {
    position: relative;
    z-index: 1;
    align-self: end;
    max-width: 80%;
    margin-bottom: 34px;
    font-size: clamp(22px, 4vw, 36px);
    line-height: 1.15;
    text-align: center;
}

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

.play-pulse {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    color: var(--orange);
    background: #fff;
    border-radius: 50%;
    font-size: 34px;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
}

.play-pulse::before {
    content: "";
    position: absolute;
    inset: -12px;
    border: 2px solid rgba(255, 255, 255, 0.58);
    border-radius: 50%;
    animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
    from {
        transform: scale(0.8);
        opacity: 1;
    }
    to {
        transform: scale(1.18);
        opacity: 0;
    }
}

.content-panel {
    padding: 26px;
    background: #fff;
    border: 1px solid rgba(229, 231, 235, 0.85);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.content-panel h2 {
    font-size: 24px;
}

.content-panel p {
    margin: 0;
    font-size: 16px;
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-list dt {
    color: var(--gray-500);
    font-weight: 700;
}

.info-list dd {
    margin: 0;
}

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

.side-list .poster-link {
    aspect-ratio: 2 / 3;
}

.side-list .card-body {
    padding: 12px;
}

.side-list .card-meta,
.side-list .tag-row,
.side-list .poster-year {
    display: none;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 46px 0;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

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

.site-footer p {
    color: #9ca3af;
}

.site-footer ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer a:hover {
    color: #fb923c;
}

.footer-bottom {
    padding: 18px 0;
    text-align: center;
    color: #9ca3af;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
    .desktop-nav {
        gap: 12px;
        font-size: 14px;
    }

    .header-search input {
        width: 170px;
    }

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

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

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

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

    .detail-side {
        order: 2;
    }
}

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

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

    .hero-carousel,
    .hero-stage {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 46px 0 110px;
    }

    .hero-poster {
        max-height: 320px;
        width: min(320px, 100%);
    }

    .hero-controls {
        bottom: 28px;
    }

    .feature-strip,
    .category-large-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .category-card-large {
        grid-template-columns: 1fr;
    }

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

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

    .detail-poster {
        width: min(260px, 100%);
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 20px;
    }

    .poster-grid,
    .small-grid,
    .wide-grid,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .feature-strip {
        margin-top: -40px;
    }

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

    .wide-card,
    .full-ranking .wide-card {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .rank-number,
    .wide-card .text-link {
        display: none;
    }

    .wide-cover {
        grid-row: span 2;
    }

    .wide-info h2 {
        font-size: 16px;
    }

    .wide-info p,
    .wide-meta span:nth-child(n + 3) {
        display: none;
    }

    .search-page-form {
        flex-direction: column;
    }

    .player-frame {
        border-radius: 16px;
    }

    .content-panel {
        padding: 20px;
    }

    .side-list .movie-card {
        grid-template-columns: 76px minmax(0, 1fr);
    }
}
