:root,
html[data-gh-theme="dark"] {
  --gh-bg: #0e1419;
  --gh-bg-elev: #162028;
  --gh-bg-card: #1a2730;
  --gh-bg-header: rgba(14, 20, 25, 0.86);
  --gh-bg-sidebar: rgba(14, 20, 25, 0.4);
  --gh-bg-sidebar-mobile: #121a20;
  --gh-bg-cover: #11181f;
  --gh-bg-placeholder: linear-gradient(145deg, #1c2a33 0%, #132028 100%);
  --gh-bg-play: rgba(14, 20, 25, 0.82);
  --gh-line: rgba(255, 255, 255, 0.08);
  --gh-text: #e8eef2;
  --gh-muted: #8a9aa6;
  --gh-accent: #3ecf8e;
  --gh-accent-soft: rgba(62, 207, 142, 0.12);
  --gh-accent-border: rgba(62, 207, 142, 0.35);
  --gh-accent-2: #f0a35e;
  --gh-chip-active-text: #0e1419;
  --gh-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --gh-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.45);
  --gh-empty-bg: rgba(255, 255, 255, 0.02);
  --gh-overlay: rgba(0, 0, 0, 0.5);
  --gh-gradient:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(62, 207, 142, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(240, 163, 94, 0.12), transparent 50%),
    linear-gradient(180deg, #101820 0%, #0e1419 40%, #0b1014 100%);
  --gh-radius: 14px;
  --gh-font-display: "Bricolage Grotesque", "Noto Sans SC", sans-serif;
  --gh-font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --gh-ratio: 56.25%;
  --gh-sidebar: 220px;
  --gh-header: 64px;
  color-scheme: dark;
}

html[data-gh-theme="light"] {
  --gh-bg: #f3f6f4;
  --gh-bg-elev: #ffffff;
  --gh-bg-card: #ffffff;
  --gh-bg-header: rgba(255, 255, 255, 0.9);
  --gh-bg-sidebar: rgba(255, 255, 255, 0.72);
  --gh-bg-sidebar-mobile: #ffffff;
  --gh-bg-cover: #e7eee9;
  --gh-bg-placeholder: linear-gradient(145deg, #e4efe8 0%, #d5e4db 100%);
  --gh-bg-play: rgba(255, 255, 255, 0.92);
  --gh-line: rgba(18, 42, 32, 0.1);
  --gh-text: #1a2b24;
  --gh-muted: #5f7268;
  --gh-accent: #1f9d63;
  --gh-accent-soft: rgba(31, 157, 99, 0.12);
  --gh-accent-border: rgba(31, 157, 99, 0.35);
  --gh-accent-2: #c47a2c;
  --gh-chip-active-text: #ffffff;
  --gh-shadow: 0 10px 28px rgba(26, 43, 36, 0.08);
  --gh-shadow-hover: 0 14px 36px rgba(26, 43, 36, 0.12);
  --gh-empty-bg: rgba(26, 43, 36, 0.03);
  --gh-overlay: rgba(20, 30, 26, 0.35);
  --gh-gradient:
    radial-gradient(ellipse 80% 50% at 8% -8%, rgba(31, 157, 99, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 92% 0%, rgba(196, 122, 44, 0.1), transparent 50%),
    linear-gradient(180deg, #f7faf8 0%, #f3f6f4 45%, #eef3f0 100%);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.gh-body {
  margin: 0;
  min-height: 100vh;
  color: var(--gh-text);
  font-family: var(--gh-font-body);
  background: var(--gh-bg);
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

.gh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--gh-gradient);
}

.gh-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: var(--gh-bg-header);
  border-bottom: 1px solid var(--gh-line);
}

.gh-header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  min-height: var(--gh-header);
}

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

.gh-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gh-accent), #2bb673);
  color: #062214;
  font-size: 14px;
  box-shadow: 0 0 0 1px var(--gh-accent-border);
}

.gh-brand__text {
  font-family: var(--gh-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.gh-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 42px;
  border-radius: 999px;
  background: var(--gh-bg-elev);
  border: 1px solid var(--gh-line);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.gh-search:focus-within {
  border-color: var(--gh-accent-border);
  box-shadow: 0 0 0 3px var(--gh-accent-soft);
}

.gh-search i {
  color: var(--gh-muted);
}

.gh-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--gh-text);
  font-size: 14px;
  font-family: inherit;
}

.gh-search input::placeholder {
  color: var(--gh-muted);
}

.gh-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.gh-nav-toggle,
.gh-theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--gh-line);
  background: var(--gh-bg-elev);
  color: var(--gh-text);
  cursor: pointer;
}

.gh-theme-toggle .gh-theme-icon-light {
  display: none;
}

html[data-gh-theme="light"] .gh-theme-toggle .gh-theme-icon-dark {
  display: none;
}

html[data-gh-theme="light"] .gh-theme-toggle .gh-theme-icon-light {
  display: inline-block;
}

.gh-nav-toggle {
  display: none;
}

.gh-chips {
  display: none;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}

.gh-chips::-webkit-scrollbar {
  display: none;
}

.gh-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--gh-bg-elev);
  border: 1px solid var(--gh-line);
  font-size: 13px;
  color: var(--gh-muted);
  white-space: nowrap;
}

.gh-chip:hover,
.gh-chip.is-active {
  color: var(--gh-chip-active-text);
  background: var(--gh-accent);
  border-color: transparent;
}

.gh-layout {
  display: grid;
  grid-template-columns: var(--gh-sidebar) 1fr;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
}

.gh-sidebar {
  position: sticky;
  top: calc(var(--gh-header) + 1px);
  align-self: start;
  height: calc(100vh - var(--gh-header) - 2px);
  overflow-y: auto;
  padding: 20px 12px 32px 16px;
  border-right: 1px solid var(--gh-line);
  background: var(--gh-bg-sidebar);
}

.gh-sidebar__head {
  font-family: var(--gh-font-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gh-muted);
  padding: 0 10px 12px;
}

.gh-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-sidebar__list > li {
  margin-bottom: 4px;
}

.gh-sidebar__list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--gh-muted);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.gh-sidebar__list a:hover,
.gh-sidebar__list a.is-active {
  background: var(--gh-accent-soft);
  color: var(--gh-accent);
}

.gh-sidebar__list i {
  width: 18px;
  text-align: center;
}

.gh-sidebar__sub {
  list-style: none;
  margin: 0 0 6px;
  padding: 0 0 0 28px;
}

.gh-sidebar__sub a {
  padding: 7px 10px;
  font-size: 13px;
}

.gh-main {
  padding: 24px 24px 48px;
}

.gh-section {
  margin-bottom: 36px;
  scroll-margin-top: 88px;
}

.gh-section--sub {
  margin-top: -12px;
  margin-bottom: 28px;
}

.gh-section__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.gh-section__head h2 {
  margin: 0;
  font-family: var(--gh-font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.gh-section__head h2 i {
  color: var(--gh-accent);
  margin-right: 6px;
}

.gh-section__hint {
  color: var(--gh-muted);
  font-size: 13px;
}

.gh-section__empty {
  color: var(--gh-muted);
  padding: 24px;
  border: 1px dashed var(--gh-line);
  border-radius: var(--gh-radius);
  text-align: center;
}

.gh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.gh-card {
  display: flex;
  flex-direction: column;
  background: var(--gh-bg-card);
  border: 1px solid var(--gh-line);
  border-radius: var(--gh-radius);
  overflow: hidden;
  box-shadow: var(--gh-shadow);
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}

.gh-card:hover {
  transform: translateY(-4px);
  border-color: var(--gh-accent-border);
  box-shadow: var(--gh-shadow-hover);
}

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

.gh-card__cover {
  position: relative;
  width: 100%;
  padding-top: var(--gh-ratio);
  background: var(--gh-bg-cover);
  overflow: hidden;
}

.gh-card__cover img,
.gh-card__placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gh-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gh-bg-placeholder);
}

.gh-card__placeholder span {
  font-family: var(--gh-font-display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gh-accent);
  opacity: 0.55;
}

.gh-card__play {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--gh-bg-play);
  color: var(--gh-accent);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.gh-card:hover .gh-card__play {
  opacity: 1;
  transform: translateY(0);
}

.gh-card__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
}

.gh-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-card__desc {
  margin: 0;
  font-size: 12px;
  color: var(--gh-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-card__meta {
  font-size: 11px;
  color: var(--gh-accent-2);
}

.gh-empty {
  margin-bottom: 20px;
  padding: 28px;
  text-align: center;
  color: var(--gh-muted);
  border: 1px dashed var(--gh-line);
  border-radius: var(--gh-radius);
  background: var(--gh-empty-bg);
}

.gh-section.is-empty-hide {
  display: none;
}

.gh-footer {
  border-top: 1px solid var(--gh-line);
  padding: 24px 20px 40px;
  text-align: center;
  color: var(--gh-muted);
  font-size: 13px;
}

.gh-footer p {
  margin: 0;
}

.gh-overlay {
  position: fixed;
  inset: 0;
  background: var(--gh-overlay);
  z-index: 45;
}

@media (max-width: 960px) {
  .gh-nav-toggle {
    display: inline-flex;
  }

  .gh-chips {
    display: flex;
  }

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

  .gh-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 82vw);
    height: 100vh;
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    background: var(--gh-bg-sidebar-mobile);
    border-right: 1px solid var(--gh-line);
    padding-top: 24px;
  }

  .gh-sidebar.is-open {
    transform: translateX(0);
  }

  .gh-main {
    padding: 16px 14px 40px;
  }

  .gh-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .gh-search {
    max-width: none;
  }

  .gh-brand__text {
    font-size: 1.05rem;
  }
}

@media (max-width: 520px) {
  .gh-header__inner {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .gh-search {
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  .gh-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
