/*
 * Quark 2 custom.css — optimized version
 * 用法：建议直接用本文件替换原 custom.css，避免 betano/136win 多套样式互相覆盖。
 * 适用：Grav + gb-* SEO 页面布局；兼容 light / dark 切换。
 */

/* Top register button */
.top-register-btn {
  display: inline-block;
  margin-left: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #ffcc33;
  color: #111 !important;
  font-weight: 800;
  text-decoration: none !important;
}

.top-register-btn:hover {
  background: #fff;
  color: #000 !important;
}

/* Category/article reading sidebar */
.q2-category-reading-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
  max-width: 1180px;
  margin-inline: auto;
}

.q2-category-reading-main,
.q2-category-reading-main > .content-item {
  min-width: 0;
  max-width: none;
  margin: 0;
}

.q2-category-reading-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.q2-category-reading-box {
  padding: 1.1rem;
  border: 1px solid var(--q2-border-strong);
  border-radius: var(--q2-radius-lg);
  background: var(--q2-bg-elev);
  color: var(--q2-text);
  box-shadow: var(--q2-shadow-card);
}

.q2-category-reading-box h3 {
  margin: 0 0 1rem;
  color: var(--q2-text-strong);
  font-size: 1.05rem;
  line-height: 1.3;
}

.q2-category-reading-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.q2-category-reading-list li {
  margin: 0;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--q2-divider);
}

.q2-category-reading-list li:last-child {
  border-bottom: 0;
}

.q2-category-reading-list a {
  display: block;
  color: var(--q2-link, var(--q2-text-strong));
  font-weight: 650;
  line-height: 1.45;
  text-decoration: none;
}

.q2-category-reading-list a:hover {
  text-decoration: underline;
}

.q2-category-reading-list li.active a {
  color: var(--q2-text-strong);
  font-weight: 800;
}

/* Shared SEO page variables */
.gb-page,
.gb-article,
.gb-category,
.gb-home,
.betano-page,
.betano-article,
.betano-category,
.betano-home,
.galerabet-page,
.galerabet-article,
.galerabet-category,
.galerabet-home,
.jdb808-page,
.jdb808-article,
.jdb808-category,
.jdb808-home {
  --gb-gold: #ffd166;
  --gb-green: #28d17c;
  --gb-radius: 20px;
  --gb-text: #303544;
  --gb-heading: #171923;
  --gb-muted: #606879;
  --gb-line: rgba(17, 24, 39, .12);
  --gb-card: #fff;
  --gb-card-soft: rgba(255, 255, 255, .78);
  --gb-card-bg: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.92));
  --gb-shadow: 0 16px 40px rgba(15, 23, 42, .09);
  color: var(--gb-text);
  line-height: 1.75;
}

html[data-theme="dark"] .gb-page,
html[data-theme="dark"] .gb-article,
html[data-theme="dark"] .gb-category,
html[data-theme="dark"] .gb-home,
html[data-theme="dark"] .betano-page,
html[data-theme="dark"] .betano-article,
html[data-theme="dark"] .betano-category,
html[data-theme="dark"] .betano-home,
html[data-theme="dark"] .galerabet-page,
html[data-theme="dark"] .galerabet-article,
html[data-theme="dark"] .galerabet-category,
html[data-theme="dark"] .galerabet-home,
html[data-theme="dark"] .jdb808-page,
html[data-theme="dark"] .jdb808-article,
html[data-theme="dark"] .jdb808-category,
html[data-theme="dark"] .jdb808-home,
html.dark .gb-page,
html.dark .gb-article,
html.dark .gb-category,
html.dark .gb-home,
body.dark .gb-page,
body.dark .gb-article,
body.dark .gb-category,
body.dark .gb-home {
  --gb-text: #d9deea;
  --gb-heading: #fff;
  --gb-muted: #c7c9d8;
  --gb-line: rgba(255, 255, 255, .12);
  --gb-card: rgba(17, 20, 38, .96);
  --gb-card-soft: rgba(255, 255, 255, .045);
  --gb-card-bg: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  --gb-shadow: 0 16px 40px rgba(0, 0, 0, .18);
}

/* Shared containers */
.gb-hero,
.gb-section,
.gb-card-grid,
.gb-home-categories,
.gb-category-grid {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero */
.gb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 28px;
  align-items: center;
  margin-top: 24px;
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,209,102,.24), transparent 34%),
    radial-gradient(circle at 90% 15%, rgba(40,209,124,.18), transparent 32%),
    linear-gradient(135deg, #0b0d1d, #161930 62%, #0c1022);
  box-shadow: 0 26px 70px rgba(0,0,0,.28);
  color: #fff;
}

.gb-hero h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.gb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 7px 12px;
  border: 1px solid rgba(255,209,102,.35);
  border-radius: 999px;
  background: rgba(255,209,102,.08);
  color: var(--gb-gold);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gb-lead,
.gb-safe-note,
.gb-hero figcaption {
  color: #c7c9d8;
}

.gb-lead {
  margin: 0;
  max-width: 720px;
  font-size: clamp(1.05rem, 1.6vw, 1.26rem);
}

.gb-safe-note {
  font-size: .95rem;
}

.gb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

/* Hero: full-width title layout */
.gb-hero-wide-title {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px 40px;
  align-items: start;
}

.gb-hero-wide-title .gb-kicker,
.gb-hero-wide-title > h1 {
  grid-column: 1 / -1;
}

.gb-hero-wide-title > h1 {
  width: 100%;
  max-width: none;
  margin: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  line-height: 1.04;
}

.gb-hero-wide-title .gb-hero-copy {
  grid-column: 1;
  width: 100%;
  max-width: none;
}

.gb-hero-wide-title .gb-lead {
  width: 100%;
  max-width: none;
  margin-top: 0;
}

.gb-hero-wide-title .gb-figure {
  grid-column: 2;
  width: 100%;
  max-width: none;
  margin: 0;
}

/* Buttons */
.gb-btn,
a.gb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none !important;
}

.gb-btn-primary,
a.gb-btn-primary {
  border: 0 !important;
  background: linear-gradient(135deg, var(--gb-gold), #ffe7a3) !important;
  color: #111827 !important;
  box-shadow: 0 14px 32px rgba(255,209,102,.2);
  text-shadow: none !important;
}

.gb-btn-primary:hover,
a.gb-btn-primary:hover {
  background: linear-gradient(135deg, #ffe08a, #fff0be) !important;
  color: #000 !important;
}

.gb-btn-ghost,
a.gb-btn-ghost {
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.06);
  color: #fff !important;
}

/* Figures and image grids */
.gb-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.gb-banner-grid img,
.gb-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

.gb-banner-grid img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--gb-line);
}

.gb-figure {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--gb-line);
  border-radius: 22px;
  background: var(--gb-card-soft);
}

.gb-hero .gb-figure {
  align-self: stretch;
  background: rgba(255,255,255,.05);
}

.gb-figure figcaption {
  margin-top: 10px;
  color: var(--gb-muted);
  font-size: .95rem;
  line-height: 1.45;
}

.gb-hero .gb-figure figcaption {
  color: #c7c9d8;
}

.gb-article > .gb-figure,
.betano-article > .gb-figure,
.galerabet-article > .gb-figure,
.jdb808-article > .gb-figure {
  max-width: 980px;
  margin: 24px auto;
}

/* Content sections */
.gb-section,
.gb-intro-box {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-radius);
  background: var(--gb-card-bg);
  color: var(--gb-text);
}

.gb-section h2,
.gb-home-categories h2,
.gb-category h1,
.betano-category h1,
.galerabet-category h1,
.jdb808-category h1 {
  margin-top: 0;
  color: var(--gb-heading);
  letter-spacing: -.025em;
  text-shadow: none;
}

.gb-section p {
  margin: 0 0 1rem;
  color: var(--gb-text);
}

.gb-section p:last-child {
  margin-bottom: 0;
}

/* Cards */
.gb-card-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 24px;
}

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

.gb-info-card,
.gb-home-card,
.gb-category-card {
  border: 1px solid var(--gb-line);
  border-radius: var(--gb-radius);
  background: var(--gb-card-bg);
  color: var(--gb-text);
  box-shadow: var(--gb-shadow);
}

.gb-info-card {
  padding: 20px;
}

.gb-info-card strong,
.gb-home-card strong,
.gb-category-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--gb-heading);
  font-size: 1.08rem;
}

.gb-info-card span,
.gb-home-card span,
.gb-category-card em {
  color: var(--gb-muted);
  font-style: normal;
}

.gb-home-grid,
.gb-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
  margin-bottom: 28px;
}

.gb-home-card,
.gb-category-card {
  display: block;
  padding: 22px;
  text-decoration: none !important;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.gb-home-card:hover,
.gb-category-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,209,102,.4);
  background: linear-gradient(180deg, rgba(255,209,102,.12), rgba(255,255,255,.04));
}

.gb-category-hero {
  grid-template-columns: 1fr;
}

/* Check lists */
.gb-check-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding-left: 0;
  list-style: none;
}

.gb-check-list li {
  position: relative;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--gb-line);
  border-radius: 14px;
  background: var(--gb-card-soft);
  color: var(--gb-text);
}

.gb-check-list li::before {
  content: "✓";
  position: absolute;
  top: 11px;
  left: 14px;
  color: var(--gb-green);
  font-weight: 900;
}

/* Responsive */
@media (max-width: 900px) {
  .q2-category-reading-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .q2-category-reading-sidebar {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 860px) {
  .gb-hero,
  .gb-card-grid-3,
  .gb-home-grid,
  .gb-category-grid {
    grid-template-columns: 1fr;
  }

  .gb-hero {
    padding: 24px;
    border-radius: 22px;
  }

  .gb-banner-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .gb-hero-wide-title {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .gb-hero-wide-title .gb-kicker,
  .gb-hero-wide-title > h1,
  .gb-hero-wide-title .gb-hero-copy,
  .gb-hero-wide-title .gb-figure {
    grid-column: 1;
  }

  .gb-hero-wide-title > h1 {
    font-size: clamp(2.25rem, 11vw, 4rem);
    line-height: 1.06;
  }
}

@media (max-width: 520px) {
  .gb-banner-grid {
    grid-template-columns: 1fr;
  }

  .gb-hero-actions {
    align-items: stretch;
  }

  .gb-btn,
  a.gb-btn {
    width: 100%;
  }
}
