/* Icy ambient layer: brighter surfaces and calm, GPU-friendly meteor motion. */
:root {
  --nexus-canvas: #1c2535;
  --nexus-surface: #252f42;
  --nexus-surface-raised: #303c52;
  --bg: #1c2535;
  --bg-dark: #171f2d;
  --panel: #252f42;
  --panel-2: #303c52;
  --nexus-accent: #b8d7ff;
}

body {
  background-color: #1c2535;
  background-image:
    radial-gradient(circle at 11% 18%, rgba(176, 220, 255, .105), transparent 31rem),
    radial-gradient(circle at 88% 46%, rgba(213, 232, 255, .075), transparent 38rem),
    linear-gradient(145deg, #202a3c 0%, #1b2332 52%, #202b3d 100%);
  background-attachment: fixed;
}

body.nexus-pattern-enabled {
  background-image:
    linear-gradient(rgba(28, 37, 53, .87), rgba(27, 36, 51, .93)),
    radial-gradient(circle at 12% 12%, rgba(181, 220, 255, .13), transparent 32rem),
    url('/assets/nexus-pattern.svg') !important;
  background-size: auto, auto, 640px 480px !important;
}

#app { position: relative; z-index: 1; min-height: 100dvh; }
.page { position: relative; isolation: isolate; }

.ambient-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
}

.ambient-aurora {
  position: absolute;
  width: 56vw;
  height: 56vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .12;
  animation: ambient-aurora-drift 24s ease-in-out infinite alternate;
}
.ambient-aurora-one { left: -28vw; top: 4vh; background: #bde7ff; }
.ambient-aurora-two { right: -32vw; bottom: -18vw; background: #91bcff; animation-delay: -11s; }

.ambient-meteor {
  --meteor-size: 170px;
  --meteor-duration: 16s;
  --meteor-delay: 0s;
  position: absolute;
  left: -28vw;
  top: var(--meteor-y, 20%);
  width: var(--meteor-size);
  height: 1px;
  opacity: 0;
  transform: rotate(-17deg);
  transform-origin: right center;
  background: linear-gradient(90deg, transparent, rgba(189, 226, 255, .08) 24%, rgba(235, 247, 255, .78) 92%, #fff);
  box-shadow: 1px 0 9px rgba(201, 232, 255, .72);
  animation: ambient-meteor-flight var(--meteor-duration) linear var(--meteor-delay) infinite;
}
.ambient-meteor::after {
  content: '';
  position: absolute;
  right: -2px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f8fcff;
  box-shadow: 0 0 12px #cbe8ff, 0 0 24px rgba(143, 202, 255, .7);
}
.meteor-one { --meteor-y: 12%; --meteor-size: 210px; --meteor-duration: 19s; --meteor-delay: -2s; }
.meteor-two { --meteor-y: 31%; --meteor-size: 135px; --meteor-duration: 23s; --meteor-delay: -13s; }
.meteor-three { --meteor-y: 54%; --meteor-size: 185px; --meteor-duration: 27s; --meteor-delay: -7s; }
.meteor-four { --meteor-y: 73%; --meteor-size: 120px; --meteor-duration: 21s; --meteor-delay: -18s; }
.meteor-five { --meteor-y: 89%; --meteor-size: 230px; --meteor-duration: 31s; --meteor-delay: -25s; }
.meteor-six { --meteor-y: 42%; --meteor-size: 95px; --meteor-duration: 29s; --meteor-delay: -20s; }

.ambient-star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ecf8ff;
  box-shadow: 0 0 11px #a9d8ff;
  animation: ambient-star-pulse 5s ease-in-out infinite;
}
.star-one { left: 9%; top: 39%; }
.star-two { left: 42%; top: 16%; animation-delay: -2s; }
.star-three { right: 19%; top: 62%; animation-delay: -3.4s; }
.star-four { right: 8%; top: 23%; animation-delay: -1.1s; }

/* Lift frequently used surfaces without turning the dark identity into a light theme. */
.site-header { background: rgba(34, 44, 61, .96) !important; box-shadow: 0 14px 40px rgba(7, 14, 28, .18); }
.site-header .main-nav { background: rgba(29, 38, 54, .96) !important; }
.site-header .global-search { background: #303b50 !important; box-shadow: inset 0 1px rgba(255,255,255,.045) !important; }
.site-header .global-search:focus-within { background: #354258 !important; box-shadow: 0 0 0 1px rgba(181, 216, 255, .32), 0 10px 28px rgba(5, 15, 32, .2) !important; }
body :is(.security-panel,.account-content,.admin-content,.product-card,.message-workspace,.wheel-dialog) {
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}
.btn-primary, .site-header .sell-btn, .wheel-spin {
  background-image: linear-gradient(135deg, #c3dcff, #91b8ee) !important;
  color: #142239 !important;
}
.btn-primary:hover, .site-header .sell-btn:hover, .wheel-spin:hover:enabled {
  filter: brightness(1.06);
  box-shadow: 0 8px 24px rgba(137, 187, 244, .18) !important;
}

.two-factor-form-status {
  margin: 2px 0 0 !important;
  color: #bed2eb !important;
  font-size: 13px !important;
  line-height: 1.55;
}
.two-factor-action-form button[disabled] { cursor: wait; opacity: .72; }

@keyframes ambient-meteor-flight {
  0%, 7% { opacity: 0; translate: 0 0; }
  9% { opacity: .78; }
  24% { opacity: 0; translate: 145vw 42vh; }
  100% { opacity: 0; translate: 145vw 42vh; }
}
@keyframes ambient-aurora-drift { to { translate: 8vw 5vh; scale: 1.08; } }
@keyframes ambient-star-pulse { 0%,100% { opacity: .18; scale: .75; } 50% { opacity: .72; scale: 1.25; } }

@media (max-width: 700px) {
  .ambient-meteor { --meteor-size: 105px; }
  .ambient-aurora { opacity: .09; }
  .site-header { box-shadow: 0 10px 25px rgba(7, 14, 28, .15); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-meteor { display: none; }
  .ambient-aurora, .ambient-star { animation: none; }
}
