/* ============================================
   Per-page color themes
   Homepage = rainbow; each inner page is unique
   ============================================ */

@keyframes rainbow-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

html[class*="theme-"] .clean-e707 {
  position: relative;
}

html[class*="theme-"] .clean-e707::before {
  content: "";
  display: block;
  height: 4px;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--color-primary-light),
    var(--color-primary),
    var(--color-primary-dark)
  );
}

/* ---------- Homepage: rainbow ---------- */
html.theme-rainbow {
  --color-primary: #7c3aed;
  --color-primary-dark: #5b21b6;
  --color-primary-light: #8b5cf6;
  --color-primary-soft: #f5f3ff;
  --color-primary-rgb: 124, 58, 237;
  --rainbow: linear-gradient(
    90deg,
    #ef4444 0%,
    #f97316 16%,
    #eab308 32%,
    #22c55e 48%,
    #06b6d4 64%,
    #3b82f6 80%,
    #a855f7 100%
  );
}

html.theme-rainbow .clean-e707::before {
  height: 5px;
  background: var(--rainbow);
  background-size: 200% 100%;
  animation: rainbow-shift 8s linear infinite;
}

html.theme-rainbow .notice-f9fe {
  background:
    radial-gradient(ellipse 70% 55% at 8% 18%, rgba(239, 68, 68, 0.22), transparent 55%),
    radial-gradient(ellipse 55% 50% at 92% 8%, rgba(59, 130, 246, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 45% at 78% 88%, rgba(168, 85, 247, 0.2), transparent 55%),
    radial-gradient(ellipse 45% 40% at 18% 92%, rgba(34, 197, 94, 0.16), transparent 55%),
    radial-gradient(ellipse 40% 35% at 50% 40%, rgba(234, 179, 8, 0.12), transparent 50%),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #f0f9ff 100%);
}

html.theme-rainbow .prev-8640 {
  background: linear-gradient(
    90deg,
    #b91c1c 0%,
    #c2410c 18%,
    #a16207 36%,
    #15803d 54%,
    #1d4ed8 72%,
    #6d28d9 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

html.theme-rainbow .soft_3666.fn-active-d805 {
  background: var(--rainbow);
  color: #fff;
}

html.theme-rainbow .active_7e5c,
html.theme-rainbow .plasma_455c {
  background: linear-gradient(
    135deg,
    #ef4444 0%,
    #f97316 22%,
    #eab308 44%,
    #22c55e 66%,
    #3b82f6 88%,
    #a855f7 100%
  );
  background-size: 220% 220%;
  animation: rainbow-shift 7s ease infinite;
  color: #fff;
  border: none;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.28);
}

html.theme-rainbow .active_7e5c:hover,
html.theme-rainbow .plasma_455c:hover {
  filter: brightness(1.05);
  color: #fff;
}

html.theme-rainbow .breadcrumb-5713 {
  border-image: var(--rainbow) 1;
  color: #6d28d9;
}

html.theme-rainbow .search-fresh-e573:nth-child(1) .component_steel_d0e9 {
  background: #ef4444;
}
html.theme-rainbow .search-fresh-e573:nth-child(2) .component_steel_d0e9 {
  background: #eab308;
}
html.theme-rainbow .search-fresh-e573:nth-child(3) .component_steel_d0e9 {
  background: #22c55e;
}

html.theme-rainbow .title_82a2 .advanced-49c3 {
  border-top: 4px solid #e2e8f0;
  overflow: hidden;
}

html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(1) {
  border-top-color: #ef4444;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(1) .caption_4091 {
  color: #ef4444;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(2) {
  border-top-color: #f97316;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(2) .caption_4091 {
  color: #ea580c;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(3) {
  border-top-color: #eab308;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(3) .caption_4091 {
  color: #ca8a04;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(4) {
  border-top-color: #22c55e;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(4) .caption_4091 {
  color: #16a34a;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(5) {
  border-top-color: #3b82f6;
}
html.theme-rainbow .title_82a2 .advanced-49c3:nth-child(5) .caption_4091 {
  color: #2563eb;
}

html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 1) a:before { background: #ef4444; }
html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 2) a:before { background: #f97316; }
html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 3) a:before { background: #eab308; }
html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 4) a:before { background: #22c55e; }
html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 5) a:before { background: #06b6d4; }
html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 6) a:before { background: #3b82f6; }
html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 7) a:before { background: #8b5cf6; }
html.theme-rainbow .hero_bottom_501a li:nth-child(8n + 8) a:before { background: #ec4899; }

html.theme-rainbow .aside_west_ab28 {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

html.theme-rainbow .video-white-5e3a {
  background: linear-gradient(135deg, #f43f5e 0%, #fb923c 100%);
}

html.theme-rainbow .menu_1baa {
  background: linear-gradient(160deg, #1e1b4b 0%, #4c1d95 55%, #6b21a8 100%);
  position: relative;
  overflow: hidden;
}

html.theme-rainbow .menu_1baa::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--rainbow);
  background-size: 200% 100%;
  animation: rainbow-shift 8s linear infinite;
}

html.theme-rainbow .component-light-7a28 {
  border-top: 5px solid transparent;
  border-image: var(--rainbow) 1;
}

html.theme-rainbow .dirty_5c35 {
  background: var(--rainbow);
  color: #fff;
}

/* ---------- Inner pages ---------- */
html.theme-coral {
  --color-primary: #ea580c;
  --color-primary-dark: #c2410c;
  --color-primary-light: #f97316;
  --color-primary-soft: #ffedd5;
  --color-primary-rgb: 234, 88, 12;
}

html.theme-teal {
  --color-primary: #0d9488;
  --color-primary-dark: #0f766e;
  --color-primary-light: #14b8a6;
  --color-primary-soft: #ccfbf1;
  --color-primary-rgb: 13, 148, 136;
}

html.theme-magenta {
  --color-primary: #c026d3;
  --color-primary-dark: #a21caf;
  --color-primary-light: #e879f9;
  --color-primary-soft: #fae8ff;
  --color-primary-rgb: 192, 38, 211;
}

html.theme-emerald {
  --color-primary: #059669;
  --color-primary-dark: #047857;
  --color-primary-light: #34d399;
  --color-primary-soft: #d1fae5;
  --color-primary-rgb: 5, 150, 105;
}

html.theme-forest {
  --color-primary: #16a34a;
  --color-primary-dark: #15803d;
  --color-primary-light: #4ade80;
  --color-primary-soft: #dcfce7;
  --color-primary-rgb: 22, 163, 74;
}

html.theme-violet {
  --color-primary: #7c3aed;
  --color-primary-dark: #6d28d9;
  --color-primary-light: #a78bfa;
  --color-primary-soft: #ede9fe;
  --color-primary-rgb: 124, 58, 237;
}

html.theme-amber {
  --color-primary: #d97706;
  --color-primary-dark: #b45309;
  --color-primary-light: #fbbf24;
  --color-primary-soft: #fef3c7;
  --color-primary-rgb: 217, 119, 6;
}

html.theme-cyan {
  --color-primary: #0891b2;
  --color-primary-dark: #0e7490;
  --color-primary-light: #22d3ee;
  --color-primary-soft: #cffafe;
  --color-primary-rgb: 8, 145, 178;
}

html.theme-navy {
  --color-primary: #1d4ed8;
  --color-primary-dark: #1e3a8a;
  --color-primary-light: #60a5fa;
  --color-primary-soft: #dbeafe;
  --color-primary-rgb: 29, 78, 216;
}

html.theme-rose {
  --color-primary: #e11d48;
  --color-primary-dark: #be123c;
  --color-primary-light: #fb7185;
  --color-primary-soft: #ffe4e6;
  --color-primary-rgb: 225, 29, 72;
}

/* Inner heroes: richer two-tone wash */
html.theme-coral .notice-f9fe[style*="linear-gradient"],
html.theme-teal .notice-f9fe[style*="linear-gradient"],
html.theme-magenta .notice-f9fe[style*="linear-gradient"],
html.theme-emerald .notice-f9fe[style*="linear-gradient"],
html.theme-forest .notice-f9fe[style*="linear-gradient"],
html.theme-violet .notice-f9fe[style*="linear-gradient"],
html.theme-amber .notice-f9fe[style*="linear-gradient"],
html.theme-cyan .notice-f9fe[style*="linear-gradient"],
html.theme-navy .notice-f9fe[style*="linear-gradient"],
html.theme-rose .notice-f9fe[style*="linear-gradient"] {
  background: linear-gradient(
    135deg,
    var(--color-primary-light) 0%,
    var(--color-primary) 48%,
    var(--color-primary-dark) 100%
  ) !important;
}

html.theme-emerald .silver_a32d,
html.theme-cyan .bottom_3dd3 {
  background: linear-gradient(
    135deg,
    var(--color-primary-light) 0%,
    var(--color-primary) 48%,
    var(--color-primary-dark) 100%
  );
}

html[class*="theme-"]:not(.theme-rainbow) .menu_1baa,
html[class*="theme-"]:not(.theme-rainbow) section[style*="linear-gradient"][style*="text-align: center"] {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  ) !important;
}

@media (prefers-reduced-motion: reduce) {
  html.theme-rainbow .clean-e707::before,
  html.theme-rainbow .active_7e5c,
  html.theme-rainbow .plasma_455c,
  html.theme-rainbow .menu_1baa::before {
    animation: none;
  }
}
