/* AstroLife overlay — no full-screen layer (Chrome WebGPU compositor) */
#astrolife-ui {
  position: static;
  pointer-events: none;
  font-family: Cousine, "SF Mono", Menlo, monospace;
}

#astrolife-ui a,
#astrolife-ui button {
  pointer-events: auto;
}

.al-btn {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10000;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(8, 8, 10, 0.72);
  color: #ececee;
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  text-decoration: none;
  padding: 0;
  margin: 0;
  line-height: 0;
  appearance: none;
  -webkit-appearance: none;
}

button.al-btn {
  font: inherit;
}

.al-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(14, 14, 18, 0.85);
}

.al-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
  flex-shrink: 0;
}

/* buttons — bottom right: dex · github · twitter · info */
#al-btn-info {
  right: max(16px, env(safe-area-inset-right));
}

#al-btn-twitter {
  right: max(72px, calc(env(safe-area-inset-right) + 56px));
}

#al-btn-github {
  right: max(128px, calc(env(safe-area-inset-right) + 112px));
}

#al-btn-dex {
  right: max(184px, calc(env(safe-area-inset-right) + 168px));
}

.al-dex-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

#al-ticker {
  position: fixed;
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 10000;
  pointer-events: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  -webkit-font-smoothing: antialiased;
}

#al-info-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  pointer-events: none;
  z-index: 10001;
}

#al-info-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

#al-info-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(440px, calc(100vw - 40px));
  max-height: min(88vh, 640px);
  overflow: hidden;
  padding: 24px 24px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 10, 0.22);
  color: #e4e4e8;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translate(-50%, calc(-50% + 12px)) scale(0.98);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  pointer-events: none;
  z-index: 10002;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#al-info-panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

#al-info-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

html.al-info-open,
html.al-info-open body {
  overflow: hidden !important;
}

#al-info-panel h2 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.32em;
  color: #fff;
  font-weight: 700;
}

#al-info-panel .tag {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #8fdf9a;
  text-transform: uppercase;
}

#al-info-panel p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(224, 224, 232, 0.92);
}

#al-info-panel ul {
  margin: 0 0 12px;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(196, 196, 202, 0.9);
}

#al-info-panel .section-title {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0f0f2;
  font-weight: 600;
}

#al-info-panel .token-line {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: none;
}

#al-info-twitter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #ececee;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#al-info-github {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #ececee;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

#al-info-twitter:hover,
#al-info-github:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.22);
}

#al-info-twitter svg,
#al-info-github svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

#al-info-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #bbb;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

#al-info-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

div[style*='zIndex:9999'][style*='background:"#000"'],
div[style*="zIndex:9999"][style*='background:#000'],
div[style*='zIndex:9999'][style*='rgba(0,0,0'] {
  background: rgba(0, 0, 0, 0.5) !important;
}

html.al-chrome .al-btn,
html.al-chrome #al-info-panel,
html.al-chrome #al-info-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html.al-chrome .al-btn {
  background: rgba(8, 8, 10, 0.92);
}

html.al-chrome #al-info-panel {
  background: rgba(8, 8, 10, 0.3);
}

#al-boot-hint {
  position: fixed;
  top: 62%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9998;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

#al-boot-hint.error {
  top: 50%;
  color: #e8b4b4;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: none;
  text-align: center;
  max-width: 300px;
  line-height: 1.6;
}
