:root {
  --bg: #101218;
  --bg-alt: #181b24;
  --text: #e5e5e5;
  --muted: #9a9a9a;
  --border: #333745;
  --border-soft: #404454;
  --link: #3aa2ff;
  --link-hover: #66b7ff;
  --title-gold: #ffd54a;
}

body.theme-light {
  --bg: #f5f5f7;
  --bg-alt: #ffffff;
  --text: #111111;
  --muted: #606060;
  --border: #d0d0d0;
  --border-soft: #e0e0e0;
  --link: #0057d8;
  --link-hover: #336ff0;
  --title-gold: #c69200;
}

/* ============================= */
/* Affiliate Sidebar – SchematicsHub */
/* ============================= */

.affiliate-sidebar .affiliate-card {
  background: rgba(15, 18, 35, 0.96);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
  overflow: hidden;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s;
}

.affiliate-sidebar .affiliate-card a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  text-decoration: none;
  color: #4db8ff;
  /* основной голубой для ссылок */
}

.affiliate-sidebar .affiliate-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, #4db8ff, #0b1220);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(77, 184, 255, 0.35);
}

.affiliate-sidebar .affiliate-icon img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  display: block;
}

/* Текстовая часть */
.affiliate-sidebar .affiliate-text {
  flex: 1 1 auto;
  min-width: 0;
}

.affiliate-sidebar .affiliate-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 3px;
  color: #4db8ff;
}

.affiliate-sidebar .affiliate-desc {
  font-size: 11px;
  line-height: 1.45;
  margin: 0;
  color: #cfd8ff;
}

/* Hover-эффект всей карточки */
.affiliate-sidebar .affiliate-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.75);
  border-color: rgba(77, 184, 255, 0.6);
}

/* Hover-эффект текста/ссылки */
.affiliate-sidebar .affiliate-card:hover a {
  color: #7fd0ff;
}

/* Чтобы в узком сайдбаре всё не разваливалось */
@media (max-width: 768px) {
  .affiliate-sidebar .affiliate-card a {
    padding: 8px 8px;
  }

  .affiliate-sidebar .affiliate-title {
    font-size: 12px;
  }

  .affiliate-sidebar .affiliate-desc {
    font-size: 10px;
  }
}

/* ============================= */
/* Affiliate Strip – bottom bar  */
/* ============================= */

.affiliate-strip {
  margin: 24px auto 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at top, rgba(20, 28, 60, 0.85), rgba(6, 10, 24, 0.96));
}

.affiliate-strip-inner {
  max-width: 1150px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.affiliate-strip-item {
  flex: 0 1 210px;
  background: rgba(8, 12, 28, 0.95);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s;
}

.affiliate-strip-item a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  text-decoration: none;
  color: #4db8ff;
  /* голубые кликабельные ссылки */
}

/* Иконка – переиспользуем концепт, как в сайдбаре */
.affiliate-strip .affiliate-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, #4db8ff, #050716);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(77, 184, 255, 0.4);
}

.affiliate-strip .affiliate-icon img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  display: block;
}

.affiliate-strip .affiliate-text {
  flex: 1 1 auto;
  min-width: 0;
}

.affiliate-strip .affiliate-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 2px;
  color: #4db8ff;
}

.affiliate-strip .affiliate-desc {
  font-size: 10px;
  line-height: 1.4;
  margin: 0;
  color: #cfd8ff;
}

/* Hover эффекты */
.affiliate-strip-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8);
  border-color: rgba(77, 184, 255, 0.7);
}

.affiliate-strip-item:hover a {
  color: #7fd0ff;
}

/* Адаптив под узкие экраны */
@media (max-width: 768px) {
  .affiliate-strip-inner {
    gap: 8px;
  }

  .affiliate-strip-item {
    flex: 0 1 47%;
  }

  .affiliate-strip .affiliate-title {
    font-size: 11px;
  }

  .affiliate-strip .affiliate-desc {
    font-size: 9px;
  }
}