:root {
    --orange: #f97316;
    --orange-dark: #ea580c;
    --pink: #ec4899;
    --pink-dark: #db2777;
    --amber: #f59e0b;
    --blue: #0ea5e9;
    --cyan: #06b6d4;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #fed7aa;
    --soft: #fff7ed;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(248, 113, 113, 0.14);
    --strong-shadow: 0 25px 60px rgba(17, 24, 39, 0.18);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.48), #ffffff 42%, rgba(253, 242, 248, 0.58));
}

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

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

button,
input {
    font: inherit;
}

.site-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.92);
    border-bottom: 1px solid rgba(254, 215, 170, 0.7);
    box-shadow: 0 8px 28px rgba(251, 146, 60, 0.08);
    backdrop-filter: blur(16px);
}

.header-row {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--orange), var(--pink));
    box-shadow: 0 12px 22px rgba(236, 72, 153, 0.26);
    font-size: 22px;
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    color: #374151;
    font-weight: 600;
}

.main-nav a,
.mobile-panel a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
    color: var(--orange);
}

.header-search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 260px;
}

.header-search input,
.mobile-panel input,
.filter-search input {
    width: 100%;
    border: 1px solid #fdba74;
    border-radius: 999px;
    padding: 11px 92px 11px 18px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.86);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.filter-search input:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.header-search button,
.mobile-panel button {
    position: absolute;
    right: 5px;
    border: 0;
    border-radius: 999px;
    padding: 7px 16px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #374151;
    border-radius: 99px;
}

.mobile-panel {
    display: none;
    padding: 16px;
    border-top: 1px solid #fed7aa;
    background: rgba(255, 255, 255, 0.97);
}

.mobile-panel.open {
    display: grid;
    gap: 14px;
}

.mobile-panel form {
    position: relative;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5, #fce7f3, #fef3c7);
}

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

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

.hero-slide > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100vw - 1180px) / 2));
    width: min(620px, calc(100% - 80px));
    transform: translateY(-50%);
    color: #ffffff;
}

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

.hero-tags span,
.hero-meta span,
.detail-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(12px);
}

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

.hero p {
    max-width: 560px;
    margin: 0 0 18px;
    color: #f3f4f6;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.72;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

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

.primary-btn,
.ghost-btn,
.intro-actions a,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.intro-actions a:first-child {
    padding: 14px 26px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    box-shadow: 0 15px 30px rgba(236, 72, 153, 0.28);
}

.ghost-btn,
.intro-actions a:last-child {
    padding: 12px 24px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.intro-actions a:hover,
.section-link:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(1.06);
}

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

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

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

.page-stack {
    display: grid;
    gap: 48px;
    padding-top: 56px;
    padding-bottom: 40px;
}

.intro-panel,
.filter-panel,
.content-section,
.detail-content,
.detail-sidebar,
.watch-panel,
.category-card-large {
    border: 1px solid rgba(254, 215, 170, 0.78);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.intro-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 32px;
}

.intro-panel h2,
.section-heading h2,
.detail-content h2,
.detail-sidebar h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.18;
}

.intro-panel p,
.section-heading p {
    max-width: 740px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.filter-panel {
    display: grid;
    gap: 16px;
    padding: 24px;
}

.filter-search input {
    padding: 14px 18px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 1px solid #fed7aa;
    border-radius: 999px;
    padding: 9px 15px;
    color: #7c2d12;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(90deg, var(--orange), var(--pink));
    box-shadow: 0 12px 22px rgba(236, 72, 153, 0.2);
}

.filter-empty {
    display: none;
    margin: 6px 0 0;
    color: var(--muted);
}

.filter-empty.show {
    display: block;
}

.content-section {
    padding: clamp(24px, 4vw, 42px);
}

.soft-panel {
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.88), rgba(253, 242, 248, 0.88));
}

.amber-panel {
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.9), rgba(255, 237, 213, 0.9));
}

.blue-panel {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.92), rgba(236, 254, 255, 0.9));
}

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

.section-link {
    padding: 10px 18px;
    color: var(--orange-dark);
    background: #fff7ed;
}

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

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

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

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

.movie-card {
    height: 100%;
}

.movie-card > a {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card > a:hover {
    transform: translateY(-6px);
    box-shadow: var(--strong-shadow);
}

.card-poster {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #ffedd5, #fce7f3);
}

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

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

.card-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.52));
    opacity: 0;
    transition: opacity 0.28s ease;
}

.movie-card > a:hover .card-poster::after {
    opacity: 1;
}

.duration-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    backdrop-filter: blur(10px);
}

.duration-badge {
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    font-size: 12px;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--amber), var(--orange));
    font-weight: 900;
}

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card > a:hover .play-hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #1f2937;
    font-size: 17px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

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

.card-body p {
    display: -webkit-box;
    flex: 1;
    margin: 0 0 16px;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

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

.category-grid,
.category-large-grid {
    display: grid;
    gap: 22px;
}

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

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

.category-tile,
.category-card-large a {
    display: block;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card-large a:hover {
    transform: translateY(-5px);
    box-shadow: var(--strong-shadow);
}

.category-tile {
    position: relative;
    min-height: 190px;
    padding: 24px;
    color: #ffffff;
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.58);
    z-index: 0;
}

.category-tile span,
.category-tile small {
    position: relative;
    z-index: 1;
    display: block;
}

.category-tile span {
    margin-top: 40px;
    font-size: 25px;
    font-weight: 900;
}

.category-tile small {
    max-width: 250px;
    margin-top: 10px;
    color: #f9fafb;
    line-height: 1.7;
}

.page-hero {
    padding: 74px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #fb923c, #ec4899 55%, #f59e0b);
}

.slim-hero h1,
.detail-main h1 {
    max-width: 960px;
    margin: 0;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.14;
    letter-spacing: -0.035em;
}

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

.ranking-hero {
    background: linear-gradient(135deg, #f59e0b, #f97316 48%, #ec4899);
}

.search-hero {
    background: linear-gradient(135deg, #0ea5e9, #ec4899 54%, #f97316);
}

.category-cover-wall {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    aspect-ratio: 16 / 10;
    background: #111827;
}

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

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

.category-card-body h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.category-card-body p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.75;
}

.category-card-body span {
    color: var(--orange-dark);
    font-weight: 800;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #fff7ed;
}

.detail-hero {
    padding: 48px 0 72px;
    color: #ffffff;
    background: radial-gradient(circle at 18% 20%, rgba(251, 146, 60, 0.9), transparent 32%), linear-gradient(135deg, #111827, #7c2d12 48%, #831843);
}

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

.detail-line {
    max-width: 760px;
    margin: 18px 0 22px;
    color: #f3f4f6;
    font-size: 19px;
    line-height: 1.8;
}

.detail-poster {
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    box-shadow: 0 25px 64px rgba(0, 0, 0, 0.34);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: -44px;
    margin-bottom: 56px;
}

.watch-panel,
.detail-content {
    grid-column: 1;
}

.detail-sidebar {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    padding: 24px;
}

.watch-panel {
    padding: 18px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #050505;
    aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover img {
    width: 100%;
    height: 100%;
}

.movie-video {
    display: block;
    background: #050505;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: #111827;
}

.player-cover.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover img {
    object-fit: cover;
    filter: brightness(0.58);
}

.player-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--orange);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
    font-size: 34px;
    transform: translate(-50%, -50%);
}

.detail-content {
    display: grid;
    gap: 32px;
    padding: clamp(24px, 4vw, 42px);
}

.detail-content section p {
    margin: 14px 0 0;
    color: #374151;
    font-size: 17px;
    line-height: 1.95;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag-cloud a {
    border-radius: 999px;
    padding: 9px 15px;
    color: #9a3412;
    background: #ffedd5;
    transition: color 0.2s ease, background 0.2s ease;
}

.tag-cloud a:hover {
    color: #ffffff;
    background: linear-gradient(90deg, var(--orange), var(--pink));
}

.compact-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.compact-card {
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 16px;
    background: #fff7ed;
    transition: transform 0.2s ease, background 0.2s ease;
}

.compact-card:hover {
    background: #ffedd5;
    transform: translateX(4px);
}

.compact-card img {
    width: 94px;
    height: 58px;
    border-radius: 12px;
    object-fit: cover;
    grid-row: span 2;
}

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

.compact-card small {
    color: var(--muted);
}

.site-footer {
    border-top: 1px solid rgba(254, 215, 170, 0.82);
    background: linear-gradient(135deg, #fff7ed, #fdf2f8, #fffbeb);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 38px;
    padding: 42px 0;
}

.footer-brand p {
    max-width: 520px;
    color: var(--muted);
    line-height: 1.8;
}

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

.site-footer a:not(.brand) {
    display: block;
    margin: 9px 0;
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--orange);
}

.footer-bottom {
    border-top: 1px solid rgba(254, 215, 170, 0.9);
    padding: 18px 16px;
    color: var(--muted);
    text-align: center;
}

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

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

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

    .detail-sidebar {
        grid-column: 1;
        grid-row: auto;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        left: 24px;
        width: calc(100% - 48px);
    }

    .hero-arrow {
        display: none;
    }

    .intro-panel,
    .section-heading,
    .detail-grid,
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }

    .movie-grid,
    .movie-grid.three-col,
    .movie-grid.four-col,
    .movie-grid.five-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 560px) {
    .site-container {
        width: min(100% - 22px, 1180px);
    }

    .brand-text {
        font-size: 19px;
    }

    .hero {
        height: auto;
        min-height: 660px;
    }

    .hero h1,
    .slim-hero h1,
    .detail-main h1 {
        font-size: 36px;
    }

    .hero p,
    .detail-line {
        font-size: 16px;
    }

    .hero-content {
        top: 52%;
    }

    .page-stack {
        gap: 30px;
        padding-top: 34px;
    }

    .intro-panel,
    .filter-panel,
    .content-section,
    .detail-content,
    .detail-sidebar,
    .watch-panel {
        border-radius: 22px;
        padding: 20px;
    }

    .movie-grid,
    .movie-grid.three-col,
    .movie-grid.four-col,
    .movie-grid.five-col,
    .category-grid,
    .category-large-grid {
        grid-template-columns: 1fr;
    }

    .card-poster {
        aspect-ratio: 16 / 10;
    }

    .page-hero,
    .detail-hero {
        padding: 46px 0;
    }

    .player-play {
        width: 68px;
        height: 68px;
        font-size: 28px;
    }
}
