:root {
  --page: #0b0d14;
  --surface: #131622;
  --surface-hover: #1c2030;
  --surface-glass: rgba(22, 26, 38, 0.75);
  --surface-muted: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.22);
  --ink: #f8fafc;
  --muted: #94a3b8;
  --soft: #64748b;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #e50914;
  --accent-dark: #b80710;
  --accent-gradient: linear-gradient(135deg, #e50914 0%, #ff3559 100%);
  --accent-glow: 0 0 25px rgba(229, 9, 20, 0.45);
  --teal: #06b6d4;
  --teal-soft: rgba(6, 182, 212, 0.15);
  --gold: #f59e0b;
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --focus: #6366f1;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  --header-height: 64px;
  --shell: 1320px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  min-width: 280px;
  background: var(--page);
  background-image: radial-gradient(circle at 50% 0%, #1a1e2e 0%, #0b0d14 70%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  padding-bottom: 0;
  -webkit-font-smoothing: antialiased;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
}

body.menu-open,
body.search-open {
  overflow: hidden;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

button {
  border: 0;
  background: none;
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

/* Shell Layout */
.page-shell {
  max-width: var(--shell);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Site Header - PC Single Row & Mobile 2-Row Layout */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #0f121d;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 2px solid rgba(229, 9, 20, 0.7);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.header-inner {
  max-width: var(--shell);
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 8px rgba(229, 9, 20, 0.4));
  transition: transform 0.25s ease;
}

.brand-emblem img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.brand:hover .brand-emblem {
  transform: scale(1.06);
}

.brand-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffe3a8;
  background: linear-gradient(135deg, #ffffff 0%, #ffe3a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

/* Nav Bar */
.header-nav-bar {
  margin-right: auto;
  height: 100%;
}

.header-nav-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.header-nav-inner::-webkit-scrollbar {
  display: none;
}

.header-nav-inner a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: #cbd5e1;
  transition: color 0.2s ease;
  text-decoration: none;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.header-nav-inner a:hover {
  color: #fff;
}

.header-nav-inner a[aria-current="page"] {
  color: #ff3559;
  font-weight: 700;
}

.header-nav-inner a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e50914, #ff526c);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.8);
}

.mobile-header-only {
  display: none !important;
}

/* Header Search Bar Input Box */
.header-search-bar {
  position: relative;
  width: 260px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-search-bar input {
  width: 100%;
  height: 36px;
  padding: 0 38px 0 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.25s ease;
}

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

.header-search-bar input:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.3);
}

.header-search-bar button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  border-radius: 50%;
  transition: color 0.2s ease;
}

.header-search-bar button:hover {
  color: var(--accent);
}

.header-search-bar button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Compact two-row header for tablets and phones. */
@media (max-width: 992px) {
  .header-inner {
    height: auto;
    padding: 8px 16px;
    flex-wrap: wrap;
    gap: 10px 12px;
  }

  .brand {
    order: 1;
  }

  .header-search-bar {
    order: 2;
    flex: 1;
    width: auto;
  }

  .header-actions {
    order: 3;
  }

  .header-nav-bar {
    order: 4;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 4px;
    margin-right: 0;
  }

  .header-nav-inner a {
    padding: 8px 2px;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--soft);
  pointer-events: none;
}

.header-search input {
  width: 220px;
  height: 38px;
  padding: 0 16px 0 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search input:focus {
  outline: none;
  width: 280px;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}

.header-search input::placeholder {
  color: var(--soft);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  transition: all 0.2s ease;
}

.icon-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-hover);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

/* Home Channel Nav Bar */
.home-channel-nav {
  background: rgba(19, 22, 34, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 0;
  margin-bottom: 24px;
}

.home-channel-nav-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  overflow-x: auto;
}

.home-channel-nav-inner::-webkit-scrollbar {
  display: none;
}

.home-channel-nav-inner a {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.home-channel-nav-inner a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.home-channel-nav-inner a[aria-current="page"] {
  color: #fff;
  background: var(--accent-gradient);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(229, 9, 20, 0.3);
}

/* Spotlight Carousel (Hero Section) */
.home-spotlight {
  max-width: var(--shell);
  margin: 0 auto 36px;
  padding: 0 20px;
}

.home-spotlight-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

.spotlight-stage {
  position: relative;
  height: 500px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  background: #000;
}

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

.spotlight-slide[data-active="true"] {
  opacity: 1;
  pointer-events: auto;
}

.spotlight-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.spotlight-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 20, 0.1) 0%, rgba(11, 13, 20, 0.7) 65%, #0b0d14 100%),
              linear-gradient(90deg, #0b0d14 0%, rgba(11, 13, 20, 0.6) 45%, transparent 100%);
}

.spotlight-copy {
  position: absolute;
  bottom: 36px;
  left: 40px;
  right: 40px;
  z-index: 2;
}

.spotlight-label {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(229, 9, 20, 0.25);
  border: 1px solid rgba(229, 9, 20, 0.5);
  color: #ff526c;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.spotlight-copy h1 {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 8px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.spotlight-subtitle {
  font-size: 16px;
  color: #cbd5e1;
  margin-bottom: 14px;
}

.spotlight-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}

.spotlight-meta span {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.spotlight-meta strong {
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--gold);
  font-weight: 700;
}

.spotlight-description {
  font-size: 14px;
  line-height: 1.6;
  color: #94a3b8;
  max-width: 580px;
  margin-bottom: 24px;
}

.spotlight-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: 22px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(229, 9, 20, 0.6);
  filter: brightness(1.1);
}

.spotlight-detail {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.spotlight-detail:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.spotlight-controls {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spotlight-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(11, 13, 20, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.spotlight-arrow:hover {
  background: rgba(229, 9, 20, 0.8);
  border-color: var(--accent);
}

.spotlight-arrow svg {
  width: 18px;
  height: 18px;
}

.spotlight-dots {
  display: flex;
  gap: 6px;
}

.spotlight-dots button {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  padding: 0;
  transition: all 0.3s ease;
}

.spotlight-dots button[aria-pressed="true"] {
  width: 24px;
  background: var(--accent);
  box-shadow: var(--accent-glow);
}

/* Update Feed (Hero Sidebar) */
.home-update-feed {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.home-update-feed header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
}

.home-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.5px;
}

.home-update-feed header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.home-update-feed header a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.home-update-feed header a svg {
  width: 14px;
  height: 14px;
}

.update-feed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 370px;
}

.update-feed-list::-webkit-scrollbar {
  width: 4px;
}

.update-feed-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.update-feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.update-feed-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--glass-border);
  transform: translateX(4px);
}

.update-feed-item time {
  font-size: 11px;
  color: var(--soft);
  white-space: nowrap;
}

.update-feed-item span {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.update-feed-item strong {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-feed-item small {
  font-size: 11px;
  color: var(--teal);
}

.update-feed-item svg {
  width: 14px;
  height: 14px;
  color: var(--soft);
}

.update-feed-more {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Notice Band */
.home-notice-band {
  background: rgba(255, 255, 255, 0.02);
  border-y: 1px solid var(--glass-border);
  padding: 12px 0;
  margin-bottom: 36px;
  font-size: 13px;
}

.home-notice-band .page-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-notice-band p {
  margin: 0;
  color: var(--muted);
}

.home-notice-band div {
  display: flex;
  gap: 16px;
}

.home-notice-band div a {
  color: #cbd5e1;
  font-weight: 500;
}

.home-notice-band div a:hover {
  color: var(--accent);
}

/* Hot Band Section */
.home-hot-band {
  margin-bottom: 0;
}

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

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

.home-title-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.3);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-title-icon svg {
  width: 22px;
  height: 22px;
}

.home-title-icon.teal {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--teal);
}

.home-section-head h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.home-section-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.home-section-head p strong {
  color: var(--accent);
}

.home-more {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.home-more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.home-more:hover {
  color: var(--accent);
}

.home-more:hover svg {
  transform: translateX(4px);
}

.home-hot-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

/* Home Poster Card (Used in home.html) */
.home-poster-card {
  display: flex;
  flex-direction: column;
}

.home-poster-media {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-poster-card:hover .home-poster-media {
  transform: translateY(-6px) scale(1.03);
  border-color: var(--glass-border-hover);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), var(--accent-glow);
}

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

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

.home-card-score {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  background: rgba(11, 13, 20, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
}

.home-card-status {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 3px 8px;
  background: rgba(229, 9, 20, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
}

.home-poster-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 10px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-poster-card h3 a {
  color: #f1f5f9;
  transition: color 0.2s ease;
}

.home-poster-card h3 a:hover {
  color: var(--accent);
}

.home-poster-card p {
  font-size: 12px;
  color: var(--soft);
  margin: 0;
}

/* Channel Bands & Layout */
.home-channel-band {
  margin-bottom: 0;
}

.channel-layout {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 20px;
}

.channel-feature {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.channel-feature a {
  display: block;
  height: 100%;
  position: relative;
}

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

.channel-feature:hover img {
  transform: scale(1.05);
}

.channel-feature-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 13, 20, 0.95) 100%);
}

.channel-feature-copy {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}

.channel-feature-copy small {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
}

.channel-feature-copy strong {
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

.channel-feature-copy em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.channel-feature-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accent-glow);
  opacity: 0;
  transition: all 0.3s ease;
}

.channel-feature-play svg {
  width: 24px;
  height: 24px;
  margin-left: 2px;
}

.channel-feature:hover .channel-feature-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.channel-poster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.channel-ranking {
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 16px;
}

.channel-ranking header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--glass-border);
}

.channel-ranking header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.channel-ranking header a {
  font-size: 12px;
  color: var(--accent);
}

.channel-ranking ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.channel-ranking li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.channel-ranking li span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.channel-ranking li:nth-child(1) span {
  color: var(--gold);
}

.channel-ranking li a {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.channel-ranking li a strong {
  font-size: 13px;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-ranking li a small {
  font-size: 11px;
  color: var(--soft);
}

.channel-ranking li em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

/* Footer */
.site-footer {
  margin-top: 60px;
  padding: 0 0 32px;
  border-top: 1px solid var(--glass-border);
  background: rgba(8, 10, 17, 0.97);
  color: var(--soft);
}

.site-ad {
  max-width: var(--shell);
  margin: 18px auto;
  padding: 0 20px;
}

.site-ad a {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.site-ad img {
  display: block;
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
}

.site-ad-mobile {
  display: none;
}

.mobile-code-ad {
  display: none;
}

.mobile-code-ad-detail {
  width: min(100%, 620px);
  margin-top: 16px;
}

.mobile-code-ad-bottom {
  margin-bottom: 24px;
}

.footer-inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-friends {
  padding: 30px 0 26px;
  border-bottom: 1px solid var(--glass-border);
}

.footer-friends h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #e2e8f0;
  font-size: 18px;
  font-weight: 650;
}

.footer-friends h2 svg {
  width: 22px;
  height: 22px;
  color: #ff526c;
}

.footer-friend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 20px;
}

.footer-friend-list a {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s ease;
}

.footer-friend-list a:hover,
.footer-utility-nav a:hover {
  color: #fff;
}

.footer-legal {
  max-width: 1080px;
  margin: 0 auto;
  padding-top: 30px;
  text-align: center;
}

.footer-disclaimer,
.footer-description {
  margin: 0;
  color: #7f8a9d;
  font-size: 12px;
  line-height: 1.9;
}

.footer-description {
  margin-top: 10px;
}

.footer-utility-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 0;
  margin-top: 16px;
}

.footer-utility-nav a {
  display: inline-flex;
  align-items: center;
  color: #a4adbc;
  font-size: 12px;
  transition: color 0.2s ease;
}

.footer-utility-nav a + a::before {
  width: 1px;
  height: 12px;
  margin: 0 14px;
  background: rgba(255, 255, 255, 0.14);
  content: "";
}

.footer-copyright {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--soft);
}

/* Floating page tools */
.floating-tools {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 84;
  display: grid;
  gap: 10px;
}

.floating-tool {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(19, 22, 34, 0.92);
  color: #f8fafc;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.floating-tool svg {
  width: 20px;
  height: 20px;
}

.floating-tool:hover,
.floating-tool:focus-visible {
  border-color: rgba(255, 255, 255, 0.28);
  background: #262b3a;
  color: #fff;
  transform: translateY(-2px);
}

.floating-tool-top {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.floating-tool-top.is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.floating-tool-share {
  border-color: rgba(255, 71, 91, 0.58);
  background: #d91f2d;
}

.floating-tool-share:hover,
.floating-tool-share:focus-visible {
  border-color: #ff6b7d;
  background: #ee2d3d;
}

.floating-tool-qr {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(7, 55, 66, 0.94);
  color: #67e8f9;
}

.floating-tool-qr:hover,
.floating-tool-qr:focus-visible,
.floating-qr-wrap.is-open .floating-tool-qr {
  border-color: rgba(103, 232, 249, 0.66);
  background: #075d6d;
  color: #fff;
}

.floating-tool-message:hover,
.floating-tool-message:focus-visible {
  border-color: rgba(255, 71, 91, 0.62);
  background: rgba(217, 31, 45, 0.92);
}

.floating-qr-wrap {
  position: relative;
}

.floating-qr-panel {
  position: absolute;
  top: 50%;
  right: 58px;
  visibility: hidden;
  width: 178px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(19, 22, 34, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.floating-qr-panel::after {
  position: absolute;
  top: 50%;
  right: -5px;
  width: 9px;
  height: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: #131622;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.floating-qr-wrap:hover .floating-qr-panel,
.floating-qr-wrap:focus-within .floating-qr-panel,
.floating-qr-wrap.is-open .floating-qr-panel {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.floating-qr-panel canvas {
  display: block;
  width: 152px;
  height: 152px;
  border-radius: 5px;
  background: #fff;
}

.floating-qr-panel strong {
  display: block;
  margin-top: 9px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.floating-toast {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  visibility: hidden;
  place-items: center;
  background: rgba(3, 5, 10, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.floating-toast span {
  display: grid;
  width: min(180px, calc(100vw - 48px));
  min-height: 82px;
  padding: 18px;
  place-items: center;
  border: 1px solid rgba(255, 71, 91, 0.34);
  border-radius: 8px;
  background: rgba(19, 22, 34, 0.98);
  color: #f8fafc;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.52);
  font-size: 15px;
  font-weight: 650;
  text-align: center;
}

.floating-toast.is-visible {
  visibility: visible;
  opacity: 1;
}

/* Mobile Drawer & Search Overlay */
.mobile-drawer,
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.mobile-drawer.open,
.search-overlay.open {
  visibility: visible;
  opacity: 1;
}

.drawer-backdrop,
.search-overlay {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
}

.drawer-panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #131622;
  border-right: 1px solid var(--glass-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--glass-border);
  font-size: 16px;
  color: #fff;
}

.drawer-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  font-weight: 500;
}

.drawer-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.search-panel {
  max-width: 600px;
  margin: 80px auto 0;
  padding: 24px;
  background: #131622;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 18px;
  color: #fff;
}

.search-panel-form {
  position: relative;
  display: flex;
  gap: 10px;
}

.search-panel-form input {
  flex: 1;
  height: 48px;
  padding: 0 16px 0 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
}

.search-panel-form svg {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 20px;
  height: 20px;
  color: var(--soft);
}

.quick-searches {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.quick-searches a {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  color: var(--ink);
}

/* Media Queries */
@media (max-width: 1280px) {
  .home-hot-grid,
  .poster-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .channel-layout {
    grid-template-columns: 1fr 300px;
  }
  .channel-feature {
    display: none;
  }
}

@media (max-width: 992px) {
  .home-spotlight-inner {
    grid-template-columns: 1fr;
  }
  .home-update-feed {
    display: none;
  }
  .channel-layout {
    grid-template-columns: 1fr;
  }
  .channel-ranking {
    display: none;
  }
  .channel-poster-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }
  .desktop-nav {
    display: none;
  }
}

@media (max-width: 700px) {
  .site-ad-mobile {
    display: block;
  }

  .mobile-code-ad {
    display: block;
  }

  .floating-tools {
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(var(--floating-ad-offset, 0px) + 12px + env(safe-area-inset-bottom));
    gap: 8px;
    transition: bottom 0.2s ease;
  }

  .floating-tool {
    width: 42px;
    height: 42px;
  }

  .floating-tool svg {
    width: 18px;
    height: 18px;
  }

  .floating-qr-panel {
    right: 52px;
    width: 164px;
    padding: 10px;
    transform: translate(8px, calc(-50% - 26px));
  }

  .floating-qr-wrap:hover .floating-qr-panel,
  .floating-qr-wrap:focus-within .floating-qr-panel,
  .floating-qr-wrap.is-open .floating-qr-panel {
    transform: translate(0, calc(-50% - 26px));
  }

  .floating-qr-panel canvas {
    width: 142px;
    height: 142px;
  }

  .floating-toast span {
    width: min(164px, calc(100vw - 40px));
    min-height: 76px;
    font-size: 14px;
  }
}

@media print {
  .floating-tools {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-tool,
  .floating-qr-panel,
  .floating-toast {
    transition: none;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 8px 14px 6px;
    gap: 8px 10px;
  }
  .brand {
    gap: 8px;
  }
  .brand-emblem svg {
    width: 32px;
    height: 32px;
  }
  .brand-text {
    font-size: 18px;
  }
  .header-search-bar {
    min-width: 0;
  }
  .header-search-bar input {
    min-width: 0;
    padding-left: 12px;
    font-size: 12px;
  }
  .header-actions .icon-button {
    width: 36px;
    height: 36px;
  }
  .header-nav-bar {
    padding-top: 2px;
  }
  .header-nav-inner {
    justify-content: flex-start;
    gap: 22px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
  }
  .header-nav-inner a {
    padding: 8px 0;
    font-size: 14px;
    scroll-snap-align: start;
  }
  .header-nav-inner .mobile-header-only {
    display: inline-flex !important;
  }
  .header-nav-inner .mobile-external-nav {
    color: #ff6680;
  }
  .header-nav-inner a[href="/gbook"] {
    display: none;
  }
  .home-hot-grid,
  .poster-grid,
  .channel-poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px 8px;
  }
  .spotlight-stage {
    height: 380px;
  }
  .spotlight-copy {
    left: 20px;
    right: 20px;
    bottom: 20px;
  }
  .spotlight-copy h1 {
    font-size: 22px;
  }
  .spotlight-description {
    display: none;
  }
  .site-footer {
    margin-top: 32px;
    padding-bottom: 20px;
  }
  .footer-inner {
    padding: 0 16px;
  }

  .footer-friends {
    padding: 22px 0 20px;
  }

  .footer-friends h2 {
    font-size: 16px;
  }

  .footer-friends h2 svg {
    width: 20px;
    height: 20px;
  }

  .footer-friend-list {
    gap: 8px 18px;
    margin-top: 15px;
  }

  .footer-friend-list a {
    font-size: 12px;
  }

  .footer-legal {
    padding-right: 50px;
    padding-top: 22px;
    text-align: left;
  }

  .footer-disclaimer,
  .footer-description {
    font-size: 11px;
    line-height: 1.75;
  }

  .footer-description {
    margin-top: 9px;
  }

  .footer-utility-nav {
    width: calc(100% + 50px);
    justify-content: center;
    margin-top: 14px;
    text-align: center;
  }

  .footer-utility-nav a {
    font-size: 11px;
  }

  .footer-utility-nav a + a::before {
    margin: 0 10px;
  }

  .footer-copyright {
    margin-top: 14px;
    font-size: 10px;
    text-align: center;
  }
}
