/**
 * KH Core V4.6 — Premium polish (sidebar, reading bottom, category banners, hover).
 */

/* ─── Sidebar CTA (top, neon glow) ─── */
.kh-sb-v45__cta--top {
  margin: 0 0 14px;
}

.kh-sb-v45 .kh-btn--submit.kh-btn--glow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb 0%, #00d4ff 100%);
  color: #fff;
  border: none;
  box-shadow:
    0 4px 24px rgba(0, 212, 255, 0.35),
    0 0 0 1px rgba(59, 130, 246, 0.4);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.kh-sb-v45 .kh-btn--submit.kh-btn--glow:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 32px rgba(0, 212, 255, 0.5),
    0 0 20px rgba(59, 130, 246, 0.45);
}

.kh-sb-v45__quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.kh-sb-v45__quick-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text, #f8fafc);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.kh-sb-v45__quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.kh-sb-v45__quick-link--trend:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}

.kh-sb-v45__quick-link--popular:hover {
  box-shadow: 0 6px 20px rgba(234, 179, 8, 0.2);
}

/* Mini sidebar cards */
.kh-sb-v45__list--mini .kh-sb-v45__item--mini {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.kh-sb-v45__list--mini .kh-sb-v45__item--mini:hover {
  transform: translateY(-2px);
  background: rgba(59, 130, 246, 0.08);
}

.kh-sb-v45__thumb {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.kh-sb-v45__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kh-sb-v45__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Header discover chips */
.kh-nav__link--trend,
.kh-nav__link--popular {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.kh-nav__item--discover .kh-nav__link:hover {
  transform: translateY(-1px);
}

/* Category banner strips (homepage) */
.kh-cat-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: linear-gradient(105deg, rgba(30, 41, 59, 0.95) 0%, rgba(37, 99, 235, 0.22) 55%, rgba(0, 212, 255, 0.12) 100%);
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.kh-cat-banner__icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.4));
}

.kh-cat-banner__title {
  margin: 0;
  font-size: 1.35rem;
}

.kh-cat-banner__title a {
  color: inherit;
  text-decoration: none;
}

.kh-cat-banner__title a:hover {
  color: var(--accent, #00d4ff);
}

.kh-cat-banner__desc {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--muted, #94a3b8);
}

/* Bottom reading bar */
.kh-reading-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(10, 15, 28, 0.92);
  border-top: 1px solid rgba(59, 130, 246, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.kh-reading-bottom__track {
  height: 3px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.kh-reading-bottom__fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3b82f6, #00d4ff);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
  transition: width 0.08s linear;
}

.kh-reading-bottom__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #94a3b8);
  letter-spacing: 0.04em;
}

.kh-reading-bottom__pct {
  color: var(--accent, #00d4ff);
  min-width: 3ch;
}

.kh-reading-bottom__sep {
  opacity: 0.4;
}

body.kh-has-reading-bottom {
  padding-bottom: 52px;
}

body.kh-has-reading-bottom .kh-reading-v45,
body.kh-single-elite .kh-reading-v45 {
  display: none !important;
}

/* Chapter nav — primary next */
.kh-chapter-nav__link--primary {
  border-color: rgba(0, 212, 255, 0.45);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(0, 212, 255, 0.12));
}

.kh-chapter-nav__link--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 212, 255, 0.25);
}

/* Global hover lift (cards, links in KH shell) */
.kh-card,
.kh-tube-card,
.kh-sb-v45__card,
.kh-article-footer .kh-reaction {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.kh-card:hover,
.kh-tube-card:hover {
  transform: translateY(-4px);
}

.kh-btn:not(:disabled):hover {
  transform: translateY(-2px);
}
