:root {
    color-scheme: light;
    --bg-dark: #020617;
    --bg-hero: #0f172a;
    --bg-soft: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-soft: #cbd5e1;
    --line: #e2e8f0;
    --line-dark: rgba(148, 163, 184, 0.24);
    --amber: #f59e0b;
    --amber-dark: #d97706;
    --amber-soft: #fffbeb;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-strong: 0 30px 80px rgba(15, 23, 42, 0.22);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-soft);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    border-bottom: 1px solid var(--line-dark);
    backdrop-filter: blur(18px);
}

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.35);
}

.brand-mark span {
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #ffffff;
}

.brand-copy {
    display: grid;
    gap: 2px;
}

.brand-copy strong {
    font-size: 20px;
    line-height: 1.1;
    letter-spacing: 0.02em;
}

.brand-copy small {
    color: var(--text-soft);
    font-size: 12px;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: #e2e8f0;
    font-weight: 700;
}

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

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover,
.mobile-panel a.is-active {
    color: #fbbf24;
}

.header-search {
    display: flex;
    align-items: center;
    width: min(330px, 28vw);
    padding: 4px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.92);
}

.header-search input,
.mobile-search input,
.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-width: 0;
    color: inherit;
    border: 0;
    outline: 0;
    background: transparent;
}

.header-search input {
    padding: 8px 12px;
    color: #ffffff;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: #94a3b8;
}

.header-search button,
.mobile-search button,
.quick-search button {
    flex: 0 0 auto;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--amber);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.quick-search button:hover,
.primary-button:hover {
    background: var(--amber-dark);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 5px auto;
    background: #ffffff;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line-dark);
    background: #0f172a;
}

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

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

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding: 18px 0;
    color: #e2e8f0;
    font-weight: 700;
}

.mobile-search {
    display: flex;
    gap: 8px;
    padding: 0 0 18px;
}

.mobile-search input {
    border-radius: 999px;
    padding: 12px 16px;
    color: #ffffff;
    background: #1e293b;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 540px;
    overflow: hidden;
    background: var(--bg-hero);
}

.hero-track,
.hero-slide,
.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-overlay {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.16) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.18) 55%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    padding: 64px 0;
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.96);
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.eyebrow.dark {
    background: var(--amber-soft);
    color: var(--amber-dark);
}

.hero h1,
.hero h2 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 660px;
    margin: 0 0 26px;
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.7;
}

.hero-tags,
.detail-meta,
.movie-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.movie-meta-row span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 900;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.primary-button {
    background: var(--amber);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.25);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #ffffff;
    background: rgba(15, 23, 42, 0.28);
}

.ghost-button:hover {
    border-color: #fbbf24;
    color: #fbbf24;
    transform: translateY(-1px);
}

.hero-arrow {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(2, 6, 23, 0.58);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(2, 6, 23, 0.86);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 28px;
    background: var(--amber);
}

.quick-panel,
.content-section {
    position: relative;
}

.quick-panel {
    margin-top: -42px;
    z-index: 8;
}

.quick-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 26px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.quick-copy h2,
.section-heading h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.detail-side h2,
.footer-links h2 {
    margin: 0;
}

.quick-copy h2,
.section-heading h2 {
    color: var(--text-main);
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.quick-copy p,
.page-hero p {
    color: var(--text-muted);
    line-height: 1.75;
}

.quick-search {
    display: flex;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fafc;
}

.quick-search input {
    padding: 12px 14px;
}

.quick-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-links a,
.category-chip {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    transition: color 0.2s ease, border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.quick-links a:hover,
.category-chip:hover,
.category-chip.is-active {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #d97706;
    transform: translateY(-1px);
}

.content-section {
    padding: 72px 0;
}

.section-light {
    background: #f8fafc;
}

.section-white {
    background: #ffffff;
}

.section-dark {
    background: linear-gradient(135deg, #1e293b, #020617);
    color: #ffffff;
}

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

.section-heading a {
    color: var(--amber-dark);
    font-weight: 900;
}

.light-heading h2,
.light-heading a {
    color: #ffffff;
}

.compact-heading {
    align-items: center;
    margin-bottom: 18px;
}

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

.full-grid {
    margin-top: 28px;
}

.movie-card,
.feature-card,
.ranking-item,
.category-overview-card,
.side-panel,
.detail-card,
.poster-card,
.side-category-card,
.ranking-panel {
    border: 1px solid var(--line);
    background: var(--bg-card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.movie-card,
.feature-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border 0.24s ease;
}

.movie-card:hover,
.feature-card:hover,
.ranking-item:hover,
.category-overview-card:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: var(--shadow-soft);
    transform: translateY(-4px);
}

.movie-card-link {
    display: grid;
    height: 100%;
}

.movie-card-image,
.rank-thumb,
.poster-card img {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

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

.movie-card-image img,
.feature-card img,
.rank-thumb img,
.category-tile img,
.category-cover img,
.poster-card img,
.player-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.movie-card:hover .movie-card-image img,
.feature-card:hover img,
.ranking-item:hover .rank-thumb img,
.category-tile:hover img,
.category-overview-card:hover .category-cover img,
.poster-card:hover img {
    transform: scale(1.08);
}

.movie-year {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.76);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-card h3,
.feature-content strong,
.ranking-item h3,
.category-overview-body h2,
.poster-card strong {
    color: var(--text-main);
    font-weight: 900;
    line-height: 1.28;
}

.movie-card h3 {
    display: -webkit-box;
    min-height: 44px;
    margin: 0;
    overflow: hidden;
    font-size: 18px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card p,
.ranking-item p,
.category-overview-body p,
.detail-one-line {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--text-muted);
    line-height: 1.65;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta-row span {
    background: #f1f5f9;
    color: #475569;
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

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

.feature-link,
.category-tile,
.category-cover {
    position: relative;
    display: block;
    overflow: hidden;
    min-height: 280px;
}

.feature-shade,
.category-tile-shade,
.category-cover span {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.12));
}

.feature-content {
    position: absolute;
    inset: auto 0 0 0;
    display: grid;
    gap: 10px;
    padding: 24px;
    color: #ffffff;
}

.feature-content strong {
    color: #ffffff;
    font-size: 26px;
}

.feature-content span:last-child {
    color: #cbd5e1;
    line-height: 1.6;
}

.feature-badge {
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.92);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.scroll-row {
    display: grid;
    grid-auto-columns: minmax(260px, 1fr);
    grid-auto-flow: column;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 0 14px;
    scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
    scroll-snap-align: start;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 28px;
    align-items: start;
}

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

.movie-card-horizontal .movie-card-link {
    grid-template-columns: 210px minmax(0, 1fr);
}

.movie-card-horizontal .movie-card-image {
    min-height: 100%;
    aspect-ratio: auto;
}

.movie-card-horizontal .movie-card-body {
    align-content: center;
}

.ranking-panel,
.side-panel,
.detail-card,
.poster-card,
.side-category-card {
    border-radius: var(--radius-md);
}

.ranking-panel,
.side-panel {
    padding: 22px;
}

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

.ranking-item {
    overflow: hidden;
    border-radius: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item a {
    display: grid;
    grid-template-columns: 54px 134px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 12px;
}

.rank-number {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #fffbeb;
    color: var(--amber-dark);
    font-weight: 1000;
}

.rank-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}

.rank-copy {
    min-width: 0;
}

.rank-copy h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.rank-copy span {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 800;
}

.mini-ranking .ranking-item a {
    grid-template-columns: 42px 96px minmax(0, 1fr);
    gap: 10px;
}

.mini-ranking .rank-copy p {
    display: none;
}

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

.category-tile {
    min-height: 220px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.category-tile strong,
.category-tile small {
    position: absolute;
    left: 18px;
    right: 18px;
    z-index: 2;
    color: #ffffff;
}

.category-tile strong {
    bottom: 54px;
    font-size: 22px;
    font-weight: 1000;
}

.category-tile small {
    bottom: 20px;
    display: -webkit-box;
    overflow: hidden;
    color: #cbd5e1;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.32), transparent 32%), linear-gradient(135deg, #1e293b, #020617);
}

.page-hero .section-shell {
    padding: 72px 0;
}

.small-page-hero .section-shell,
.category-page-hero .section-shell,
.search-hero .section-shell,
.ranking-hero .section-shell {
    padding: 64px 0;
}

.page-hero h1 {
    max-width: 840px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.06;
    letter-spacing: -0.045em;
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 18px;
}

.breadcrumb,
.detail-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    color: #cbd5e1;
    font-weight: 800;
}

.breadcrumb:hover,
.detail-breadcrumb a:hover {
    color: #fbbf24;
}

.category-nav-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

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

.category-overview-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-cover {
    min-height: 190px;
}

.category-cover strong {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 2;
    color: #ffffff;
    font-size: 28px;
    font-weight: 1000;
}

.category-overview-body {
    display: grid;
    gap: 12px;
    padding: 20px;
}

.category-overview-body h2 a:hover {
    color: var(--amber-dark);
}

.category-sample-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-sample-links a {
    padding: 7px 9px;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.category-sample-links a:hover {
    background: #fffbeb;
    color: var(--amber-dark);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
    display: grid;
    gap: 8px;
    color: #475569;
    font-weight: 900;
}

.filter-panel input,
.filter-panel select {
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text-main);
    background: #f8fafc;
}

.filter-status {
    margin: 18px 0 0;
    color: var(--text-muted);
    font-weight: 800;
}

.empty-state {
    display: none;
    margin-top: 26px;
    padding: 38px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    color: #64748b;
    text-align: center;
    background: #ffffff;
}

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

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

.side-panel {
    position: sticky;
    top: 96px;
}

.side-panel h2 {
    margin-bottom: 16px;
    font-size: 24px;
}

.side-grid {
    display: grid;
    gap: 16px;
}

.side-grid .movie-card:nth-child(n+7) {
    display: none;
}

.detail-hero {
    padding: 32px 0 0;
    color: #ffffff;
    background: linear-gradient(180deg, #020617 0%, #111827 48%, #f8fafc 48%, #f8fafc 100%);
}

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

.detail-main {
    display: grid;
    gap: 22px;
}

.detail-player {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    background: #000000;
    box-shadow: var(--shadow-strong);
}

.movie-video,
.player-cover,
.player-cover img,
.player-cover-shade,
.player-loading,
.player-message {
    position: absolute;
    inset: 0;
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    z-index: 3;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #000000;
}

.detail-player.is-started .player-cover {
    display: none;
}

.player-cover-shade {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.78));
}

.player-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.96);
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.38);
    transform: translate(-50%, -50%);
}

.player-icon::after {
    position: absolute;
    top: 50%;
    left: 52%;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 28px solid #ffffff;
    content: "";
    transform: translate(-45%, -50%);
}

.player-loading {
    z-index: 2;
    display: none;
    place-items: center;
    background: rgba(0, 0, 0, 0.25);
}

.player-loading::after {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    content: "";
    animation: spin 0.8s linear infinite;
}

.detail-player.is-loading .player-loading {
    display: grid;
}

.player-message {
    z-index: 5;
    display: none;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: rgba(2, 6, 23, 0.86);
}

.detail-player.is-error .player-message {
    display: grid;
}

.detail-card {
    display: grid;
    gap: 22px;
    padding: 28px;
    color: var(--text-main);
}

.detail-card h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.detail-one-line {
    display: block;
    font-size: 18px;
}

.detail-card section {
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.detail-card h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

.detail-card section p {
    margin: 0;
    color: #334155;
    font-size: 17px;
    line-height: 1.9;
    white-space: pre-wrap;
}

.detail-card .detail-meta span {
    background: #f1f5f9;
    color: #475569;
}

.detail-side {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 18px;
}

.poster-card {
    overflow: hidden;
    color: var(--text-main);
}

.poster-card img {
    aspect-ratio: 3 / 4;
}

.poster-card div {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.poster-card span {
    color: var(--text-muted);
    font-weight: 800;
}

.side-category-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    color: var(--text-main);
}

.side-category-card a {
    padding: 11px 12px;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-weight: 900;
}

.side-category-card a:hover {
    background: #fffbeb;
    color: var(--amber-dark);
}

.related-list .movie-card-horizontal .movie-card-link {
    grid-template-columns: 180px minmax(0, 1fr);
}

.site-footer {
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #cbd5e1;
}

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

.footer-brand p {
    max-width: 440px;
    color: #94a3b8;
    line-height: 1.75;
}

.footer-logo .brand-mark {
    width: 38px;
    height: 38px;
}

.footer-links h2 {
    margin-bottom: 14px;
    color: #ffffff;
    font-size: 18px;
}

.footer-links div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

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

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #94a3b8;
    text-align: center;
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .header-search {
        display: none;
    }

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

    .category-overview-grid,
    .ranking-layout,
    .detail-layout,
    .two-column-section {
        grid-template-columns: 1fr;
    }

    .detail-side,
    .side-panel {
        position: static;
    }

    .poster-card {
        display: none;
    }
}

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

    .mobile-toggle {
        display: block;
    }

    .brand-copy small {
        display: none;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-right: 18px;
        padding-left: 18px;
    }

    .hero-arrow {
        display: none;
    }

    .quick-panel {
        margin-top: 0;
    }

    .quick-grid,
    .filter-panel,
    .footer-shell {
        grid-template-columns: 1fr;
    }

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

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

    .ranking-item a {
        grid-template-columns: 42px 96px minmax(0, 1fr);
        gap: 10px;
    }

    .rank-copy p {
        display: none;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .section-shell,
    .footer-shell,
    .mobile-panel nav,
    .mobile-search {
        width: min(100% - 24px, 1180px);
    }

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

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

    .hero h1,
    .hero h2 {
        font-size: 38px;
    }

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

    .hero-actions,
    .page-hero-actions,
    .quick-search {
        flex-direction: column;
    }

    .primary-button,
    .ghost-button,
    .quick-search button {
        width: 100%;
    }

    .content-section,
    .page-hero .section-shell {
        padding: 44px 0;
    }

    .movie-grid,
    .feature-grid,
    .category-tile-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

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

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

    .movie-card-horizontal .movie-tags,
    .movie-card-horizontal .movie-meta-row span:nth-child(n+3) {
        display: none;
    }

    .detail-card {
        padding: 20px;
    }

    .player-icon {
        width: 66px;
        height: 66px;
    }

    .player-icon::after {
        border-top-width: 13px;
        border-bottom-width: 13px;
        border-left-width: 21px;
    }

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