:root {
    --rose: #ec4899;
    --rose-deep: #db2777;
    --blue: #3b82f6;
    --orange: #f97316;
    --red: #ef4444;
    --green-soft: #f0fdf4;
    --pink-soft: #fdf2f8;
    --blue-soft: #eff6ff;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --panel: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

html {
    scroll-behavior: smooth;
}

body.site-page {
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #fff7fb 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

button,
input {
    font: inherit;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(90deg, var(--pink-soft), var(--blue-soft), var(--green-soft));
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 76px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    font-size: 22px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 22px rgba(239, 68, 68, 0.28);
}

.brand-copy {
    display: grid;
    line-height: 1.05;
}

.brand-copy strong,
.footer-brand strong {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #dc2626, #ea580c);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.brand-copy small {
    margin-top: 5px;
    font-size: 12px;
    color: #4b5563;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-left: auto;
    color: #374151;
    font-weight: 700;
}

.nav-links a,
.nav-dropdown > a {
    transition: color 0.22s ease;
}

.nav-links a:hover,
.nav-dropdown:hover > a {
    color: var(--rose-deep);
}

.nav-dropdown {
    position: relative;
    padding: 28px 0;
}

.dropdown-menu {
    position: absolute;
    top: 66px;
    left: -20px;
    width: 265px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.22s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    padding: 9px 10px;
    border-radius: 10px;
    color: #374151;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #fce7f3;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.search-form input,
.filter-input {
    width: 230px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    color: #111827;
    background: rgba(255, 255, 255, 0.88);
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-form input:focus,
.filter-input:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.16);
}

.search-form button,
.primary-btn,
.secondary-btn {
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form button,
.primary-btn {
    color: #fff;
    background: linear-gradient(90deg, var(--rose), var(--blue));
    box-shadow: 0 14px 26px rgba(236, 72, 153, 0.22);
}

.search-form button {
    height: 42px;
    padding: 0 18px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 24px;
}

.secondary-btn {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
}

.search-form button:hover,
.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 18px 34px rgba(59, 130, 246, 0.26);
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #111827;
    font-size: 22px;
}

.mobile-panel {
    display: grid;
    gap: 8px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel[hidden] {
    display: none;
}

.mobile-panel a {
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: #374151;
    font-weight: 800;
}

.hero-slider {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background-size: cover;
    background-position: center;
    transition: opacity 0.65s ease;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.68) 46%, rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(249, 250, 251, 0.96), rgba(249, 250, 251, 0) 28%);
}

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

.hero-content {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    padding: 78px 0 105px;
}

.hero-copy {
    width: min(690px, 100%);
    color: #fff;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #f9a8d4;
    font-weight: 900;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.045em;
}

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

.hero-copy p {
    max-width: 660px;
    margin: 0 0 26px;
    color: #e5e7eb;
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.7;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 28px;
}

.hero-tags span,
.meta-pill,
.tag-list span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-weight: 800;
}

.hero-tags span {
    padding: 8px 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 34px;
    z-index: 4;
}

.hero-control-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-buttons {
    display: flex;
    gap: 10px;
}

.hero-prev,
.hero-next {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.46);
    cursor: pointer;
}

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

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

.hero-dot.is-active {
    width: 30px;
    background: linear-gradient(90deg, var(--rose), var(--blue));
}

.section {
    padding: 66px 0;
}

.section-soft {
    background: linear-gradient(90deg, var(--pink-soft), var(--blue-soft), var(--green-soft));
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-bar {
    width: 6px;
    height: 38px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--rose), var(--blue));
}

.section-title h2,
.section-title h1 {
    margin: 0;
    font-size: clamp(27px, 3.2vw, 40px);
    line-height: 1.1;
    font-weight: 950;
}

.section-head p,
.page-lead {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.8;
}

.more-link {
    color: var(--rose-deep);
    font-weight: 900;
}

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(236, 72, 153, 0.55);
    box-shadow: 0 22px 38px rgba(15, 23, 42, 0.14);
}

.movie-card.is-hidden {
    display: none;
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #111827;
}

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

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

.poster-shade {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.year-badge {
    right: 10px;
    padding: 5px 9px;
    background: rgba(17, 24, 39, 0.72);
}

.rank-badge {
    left: 10px;
    padding: 5px 10px;
    background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--blue));
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-body {
    display: grid;
    gap: 9px;
    padding: 15px;
}

.movie-card-body strong {
    overflow: hidden;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-card-body em {
    min-height: 42px;
    overflow: hidden;
    display: -webkit-box;
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-list span {
    padding: 5px 8px;
    color: #be185d;
    background: #fce7f3;
    font-size: 12px;
}

.movie-card-compact .movie-card-body em,
.movie-card-compact .tag-list {
    display: none;
}

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

.side-panel,
.info-panel,
.detail-panel,
.search-panel {
    border: 1px solid rgba(229, 231, 235, 0.82);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.side-panel {
    position: sticky;
    top: 100px;
    align-self: start;
    padding: 22px;
}

.side-panel h2,
.info-panel h2,
.detail-panel h2,
.search-panel h2 {
    margin: 0 0 18px;
    font-size: 22px;
    font-weight: 950;
}

.ranking-list {
    display: grid;
    gap: 8px;
}

.ranking-list li a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 60px;
    align-items: center;
    gap: 10px;
    padding: 11px 10px;
    border-radius: 14px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-list li a:hover {
    background: #fdf2f8;
    transform: translateX(4px);
}

.rank-num {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--rose), var(--orange));
}

.rank-title {
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-meta {
    color: #f59e0b;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

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

.category-tile {
    position: relative;
    overflow: hidden;
    min-height: 178px;
    padding: 24px;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--rose), var(--blue));
    box-shadow: 0 18px 34px rgba(59, 130, 246, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(3n + 2) {
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.category-tile:nth-child(3n) {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.category-tile::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 155px;
    height: 155px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 46px rgba(236, 72, 153, 0.22);
}

.category-tile strong {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 10px;
    font-size: 25px;
    font-weight: 950;
}

.category-tile span,
.category-tile p {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.7;
}

.page-hero {
    padding: 66px 0;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #ec4899 55%, #f97316);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 950;
}

.page-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-input {
    width: min(330px, 100%);
}

.filter-chip {
    padding: 9px 13px;
    border: 1px solid #e5e7eb;
    color: #374151;
    background: #fff;
    cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(90deg, var(--rose), var(--blue));
}

.empty-state {
    display: none;
    padding: 28px;
    border-radius: 20px;
    color: #6b7280;
    background: #fff;
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 52px 0 60px;
    color: #fff;
    background: #020617;
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 20%, rgba(236, 72, 153, 0.42), transparent 28%), radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.36), transparent 30%), linear-gradient(135deg, rgba(2, 6, 23, 0.94), rgba(30, 41, 59, 0.86));
}

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

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: #f9a8d4;
    font-weight: 800;
}

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

.detail-copy h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.08;
    font-weight: 950;
}

.detail-copy p {
    max-width: 850px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.85;
}

.meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 28px;
}

.meta-pill {
    padding: 8px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.info-panel,
.detail-panel,
.search-panel {
    padding: 28px;
}

.info-panel p,
.detail-panel p {
    color: #4b5563;
    line-height: 1.92;
    margin: 0 0 18px;
}

.player-section {
    padding: 54px 0 24px;
    background: #020617;
}

.player-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 18px;
    color: #fff;
}

.player-head h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 950;
}

.player-head p {
    color: #cbd5e1;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
    aspect-ratio: 16 / 9;
}

.player-shell video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: #fff;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover strong {
    font-size: clamp(22px, 3vw, 38px);
    font-weight: 950;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.36);
}

.player-play-circle {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--rose), var(--blue));
    box-shadow: 0 18px 36px rgba(236, 72, 153, 0.32);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.search-panel {
    margin: -36px auto 42px;
    position: relative;
    z-index: 2;
}

.search-title-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.site-footer {
    margin-top: 30px;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 34px;
    padding: 44px 0;
}

.site-footer p {
    max-width: 430px;
    margin-top: 14px;
    color: #9ca3af;
    line-height: 1.8;
}

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

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

.footer-links a {
    color: #9ca3af;
}

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

.footer-bottom {
    padding: 17px;
    border-top: 1px solid #374151;
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 980px) {
    .nav-links,
    .search-form {
        display: none;
    }

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

    .hero-slider,
    .hero-content {
        min-height: 520px;
    }

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

    .side-panel {
        position: static;
    }

    .detail-layout {
        grid-template-columns: 210px minmax(0, 1fr);
    }

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

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

    .nav-inner {
        min-height: 66px;
    }

    .brand-copy strong {
        font-size: 22px;
    }

    .hero-slider,
    .hero-content {
        min-height: 620px;
    }

    .hero-content {
        align-items: flex-end;
        padding-bottom: 112px;
    }

    .hero-control-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .section {
        padding: 46px 0;
    }

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

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

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

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

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

    .detail-poster {
        width: min(250px, 72vw);
    }

    .player-section {
        padding-top: 38px;
    }

    .player-shell {
        border-radius: 18px;
    }

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