:root {
  --mb-obsidian: #05030a;
  --mb-violet-deep: #2e1065;
  --mb-violet: #8b5cf6;
  --mb-amethyst: #c4b5fd;
  --mb-moon-white: #f8f7ff;
  --mb-champagne: #d8bd78;
  --mb-coordinate: #7dd3fc;
}

.page-villa-network,
.page-maihar-origin {
  background-color: var(--mb-obsidian);
  color: var(--mb-moon-white);
}

.page-villa-network .globe-grid-aura {
  background:
    radial-gradient(circle at 50% 52%, rgba(216, 189, 120, 0.12), transparent 17%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.25), transparent 60%);
  filter: blur(46px);
}

.page-villa-network .globe-fog-overlay {
  background:
    radial-gradient(ellipse at 20% 42%, rgba(196, 181, 253, 0.1), transparent 28%),
    radial-gradient(ellipse at 78% 60%, rgba(76, 29, 149, 0.2), transparent 34%),
    radial-gradient(circle at center, transparent 38%, rgba(5, 3, 10, 0.64) 76%, rgba(5, 3, 10, 0.96) 100%);
  background-size: 130% 130%, 145% 145%, 100% 100%;
  animation: mb-fog-breathe 14s ease-in-out infinite alternate;
}

.page-villa-network .cosmic-prototype-surface {
  background-color: var(--mb-obsidian);
  background-image:
    radial-gradient(circle at 16% 28%, rgba(248, 247, 255, 0.85) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 18%, rgba(196, 181, 253, 0.8) 0 1px, transparent 1.7px),
    radial-gradient(circle at 42% 76%, rgba(248, 247, 255, 0.7) 0 1px, transparent 1.6px),
    radial-gradient(circle at 86% 66%, rgba(139, 92, 246, 0.65) 0 1px, transparent 1.8px);
  background-size: 193px 193px, 271px 271px, 157px 157px, 229px 229px;
  animation: mb-sparkle-drift 22s linear infinite;
}

.page-maihar-origin {
  --bg-dark: var(--mb-obsidian);
  --bg-card: rgba(15, 9, 31, 0.82);
  --color-gold: #b99a51;
  --color-gold-bright: var(--mb-champagne);
  --color-purple: var(--mb-violet);
  --color-cyan: var(--mb-coordinate);
  --color-text: var(--mb-moon-white);
  --color-muted: #c8c2d8;
  background-image:
    radial-gradient(circle at 18% 14%, rgba(139, 92, 246, 0.16), transparent 28%),
    radial-gradient(circle at 78% 32%, rgba(196, 181, 253, 0.08), transparent 25%);
}

.page-maihar-origin .maihar-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(216, 189, 120, 0.12), transparent 18%),
    radial-gradient(ellipse at 50% 48%, rgba(139, 92, 246, 0.24), transparent 48%),
    var(--mb-obsidian);
  border-bottom-color: rgba(196, 181, 253, 0.24);
}

.page-maihar-origin .maihar-hero::before,
.page-maihar-origin .maihar-hero::after {
  content: "";
  position: absolute;
  inset: -20%;
  pointer-events: none;
}

.page-maihar-origin .maihar-hero::before {
  background-image:
    radial-gradient(circle, rgba(248, 247, 255, 0.9) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(196, 181, 253, 0.75) 0 1px, transparent 1.8px);
  background-position: 0 0, 47px 31px;
  background-size: 127px 127px, 181px 181px;
  opacity: 0.6;
  animation: mb-sparkle-drift 20s linear infinite;
}

.page-maihar-origin .maihar-hero::after {
  background:
    radial-gradient(ellipse at 18% 56%, rgba(248, 247, 255, 0.1), transparent 26%),
    radial-gradient(ellipse at 82% 44%, rgba(139, 92, 246, 0.16), transparent 30%);
  filter: blur(26px);
  animation: mb-fog-breathe 12s ease-in-out infinite alternate;
}

.page-maihar-origin .maihar-hero-content {
  position: relative;
  z-index: 1;
}

.page-maihar-origin .maihar-title {
  background: linear-gradient(120deg, var(--mb-moon-white), var(--mb-amethyst) 55%, var(--mb-champagne));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(196, 181, 253, 0.26));
}

.page-maihar-origin :is(.geo-card, .lens-item, .history-box, .sources-registry-box) {
  border-color: rgba(196, 181, 253, 0.2);
  box-shadow: 0 12px 36px rgba(5, 3, 10, 0.34), inset 0 1px rgba(248, 247, 255, 0.04);
}

.page-maihar-origin .geo-card:hover {
  border-color: rgba(196, 181, 253, 0.68);
  box-shadow: 0 12px 38px rgba(76, 29, 149, 0.32), 0 0 22px rgba(196, 181, 253, 0.12);
}

.page-maihar-origin :is(.section-title, .geo-card h3, .source-item a) { color: var(--mb-amethyst); }
.page-maihar-origin .section-title { border-left-color: var(--mb-violet); }

.page-maihar-origin .timeline-wrapper { border-left-color: rgba(196, 181, 253, 0.34); }
.page-maihar-origin .timeline-dot {
  background: var(--mb-moon-white);
  box-shadow: 0 0 10px var(--mb-moon-white), 0 0 20px var(--mb-violet);
}
.page-maihar-origin :is(.timeline-date, .timeline-category) { color: var(--mb-amethyst); }

.mathbhoot-energy-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 40px;
  height: 40px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: opacity 160ms ease;
  will-change: transform;
}

.mathbhoot-energy-cursor.is-visible { opacity: 1; }

.mathbhoot-energy-cursor__lens,
.mathbhoot-energy-cursor__core {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.mathbhoot-energy-cursor__lens {
  width: 100%;
  height: 100%;
  border: 2px solid rgba(248, 247, 255, 0.88);
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.4), rgba(196, 181, 253, 0.12) 38%, rgba(76, 29, 149, 0.12) 72%);
  box-shadow: 0 0 10px rgba(248, 247, 255, 0.68), 0 0 24px rgba(139, 92, 246, 0.58), inset 0 0 12px rgba(248, 247, 255, 0.2);
  backdrop-filter: brightness(1.22) saturate(1.18);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.mathbhoot-energy-cursor__core {
  width: 5px;
  height: 5px;
  background: var(--mb-moon-white);
  box-shadow: 0 0 9px var(--mb-moon-white), 0 0 18px var(--mb-violet);
}

.mathbhoot-energy-cursor__handle {
  position: absolute;
  top: 31px;
  left: 31px;
  width: 20px;
  height: 7px;
  border: 1px solid rgba(248, 247, 255, 0.7);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mb-amethyst), var(--mb-violet-deep));
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.72);
  transform: rotate(45deg);
  transform-origin: left center;
}

.mathbhoot-energy-cursor__sparkles {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--mb-moon-white);
  box-shadow: 8px 7px 0 rgba(196, 181, 253, 0.9), -5px 10px 0 rgba(125, 211, 252, 0.85);
  animation: mb-cursor-twinkle 900ms ease-in-out infinite alternate;
}

.mathbhoot-energy-cursor.is-hovering .mathbhoot-energy-cursor__lens {
  border-color: var(--mb-champagne);
  transform: translate(-50%, -50%) scale(1.34);
  box-shadow: 0 0 12px rgba(248, 247, 255, 0.88), 0 0 30px rgba(139, 92, 246, 0.75), inset 0 0 14px rgba(216, 189, 120, 0.2);
}

@keyframes mb-cursor-twinkle {
  to { opacity: 0.35; transform: scale(0.65) rotate(35deg); }
}

@keyframes mb-sparkle-drift {
  to { background-position: 193px 96px, -135px 271px, 78px -157px, -114px 66px; }
}

@keyframes mb-fog-breathe {
  from { background-position: 0% 46%, 100% 54%, center; opacity: 0.78; }
  to { background-position: 10% 52%, 88% 45%, center; opacity: 1; }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .mathbhoot-energy-cursor { display: none; }
  .page-villa-network .cosmic-prototype-surface,
  .page-villa-network .globe-fog-overlay,
  .page-maihar-origin .maihar-hero::before,
  .page-maihar-origin .maihar-hero::after { animation: none; }
}

@media (forced-colors: active) {
  .mathbhoot-energy-cursor,
  .page-maihar-origin .maihar-hero::before,
  .page-maihar-origin .maihar-hero::after { display: none; }
}
