/*
 * Alvey Quantum DEX theme layer.
 * Sits on top of the compiled app: background art, particle grid,
 * glow accents and the Alvey footer. No app logic lives here.
 */
:root {
  --alvey-blue: #00cfff;
  --alvey-green: #66ff00;
  --alvey-text: #e2e8f0;
  --glow-blue: 0 0 20px rgba(0, 207, 255, 0.45);
  --glow-combined: 0 0 20px rgba(0, 207, 255, 0.35), 0 0 40px rgba(102, 255, 0, 0.2);
}

html { background: #000 !important; }
body { background: transparent !important; }
body { color: var(--alvey-text); }
* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* ---------- background layers (behind the app) ---------- */
.alvey-bg,
.alvey-bg-shade,
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.alvey-bg {
  z-index: -3;
  background: #000 url('/images/alvey-quantum-bg.jpg') center 30% / cover no-repeat;
}
/* keep the art colourful but calm enough for reading numbers */
.alvey-bg-shade {
  z-index: -2;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.62) 60%, rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.55) 100%);
}
#particles-canvas { z-index: -1; display: block; width: 100%; height: 100%; }

@media (max-width: 768px) {
  .alvey-bg { background-image: url('/images/alvey-quantum-bg-mobile.jpg'); background-position: 30% center; }
}

/* the old swap-page artwork is replaced by the Alvey background */
.extrabackground { background-image: none !important; background-color: transparent !important; }

/* ---------- app surfaces ---------- */
#root { position: relative; z-index: 1; }

/* top navigation: same glass + glow as alveychain.com */
#root nav {
  background: rgba(0, 0, 0, 0.85) !important;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(0, 207, 255, 0.4) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), var(--glow-combined);
}

/* glass cards (swap, liquidity, settings) */
#root [class*="Card"], .alvey-glass {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

/* primary buttons get the Alvey glow */
#root button[class*="Button"]:not(:disabled):hover { box-shadow: var(--glow-combined); }

/* modals (wallet, token select, settings): dark backdrop + glowing glass panel */
div[role="presentation"] {
  background-color: rgba(0, 0, 0, 0.72) !important;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
div[role="presentation"] ~ div {
  border: 1px solid rgba(0, 207, 255, 0.45) !important;
  box-shadow: var(--glow-combined), 0 12px 40px rgba(0, 0, 0, 0.7) !important;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* keyboard focus stays visible on the dark background */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--alvey-blue);
  outline-offset: 2px;
}

/* ---------- Alvey footer ---------- */
.alvey-footer {
  position: relative;
  z-index: 2;
  width: 100%;
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 207, 255, 0.25);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  color: var(--alvey-text);
}
.alvey-footer .footer-container { max-width: 1400px; margin: 0 auto; padding: 3rem 2rem 2rem; }
.alvey-footer .footer-content {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  align-items: start;
}
.alvey-footer .footer-brand img { width: 150px; height: auto; display: block; }
.alvey-footer .footer-brand p {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.65);
  max-width: 240px;
}
.alvey-footer .footer-title {
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 207, 255, 0.2);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--alvey-blue), var(--alvey-green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.alvey-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.alvey-footer li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.25rem 0;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.alvey-footer li a:hover { color: var(--alvey-blue); padding-left: 0.5rem; }
.alvey-footer .link-logo { width: 16px; height: 16px; border-radius: 50%; object-fit: contain; flex-shrink: 0; }
.alvey-footer .link-logo-cmc { width: 11px; height: 11px; border-radius: 22%; margin: 0 2.5px; }
.alvey-footer .social-icon { width: 18px; height: 18px; object-fit: contain; }
.alvey-footer .social-icon.invert { filter: brightness(0) invert(1); }
.alvey-footer .footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 207, 255, 0.12);
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.55);
}

@media (max-width: 852px) {
  .alvey-footer .footer-container { padding: 2rem 1.25rem 1.5rem; }
  .alvey-footer .footer-content { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.25rem; }
  .alvey-footer .footer-brand { grid-column: 1 / -1; }
  /* leave room for the DEX's fixed bottom menu on phones */
  .alvey-footer { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .alvey-footer li a { transition: none; }
}

/* ---------- home hero ---------- */
/* Galadriel in the background is the hero now; the old VR character is hidden */
#root img[alt="Elves realm"] { display: none; }
#root h1, #root h2 { text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75); }

/* phone bottom menu (Trade / More): same dark glass as the top bar */
#root .sc-EZqKI {
  background: rgba(0, 0, 0, 0.98) !important;
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-top: 1px solid rgba(0, 207, 255, 0.4);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5), var(--glow-combined);
}
