/* Robinhood dark mode
 * --primary  → main UI text (nav, headings) = white
 * --money    → brand lime for $ amounts & key metrics
 * --accent   → lime for CTAs / interactive emphasis
 */
@theme {
  --color-primary: #ccff00;
  --color-accent: #7f971a;
  --color-background: #000000;
  --color-text: #191918;
  --color-neutral: #d4d0c9;
  --color-brand: #ccff00;
}

html:not(.robinpay-ready) body {
  visibility: hidden !important;
}

/* Never paint the UsePaid mark in the nav. */
header svg[viewBox="0 0 2048 2048"],
[data-sidenav-panel] svg[viewBox="0 0 2048 2048"] {
  opacity: 0 !important;
}

/* Preloader: letters rise into view, bar fills, then the screen fades. */
#robinpay-loader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  opacity: 1;
  transition: opacity 0.55s ease;
}

html.robinpay-ready #robinpay-loader {
  opacity: 0;
  pointer-events: none;
}

#robinpay-loader .rp-logo {
  display: flex;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 56px;
  font-weight: 650;
  letter-spacing: -0.05em;
  line-height: 1.15;
}

#robinpay-loader .rp-logo span {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  animation: rp-letter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#robinpay-loader .rp-bar {
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 18%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

#robinpay-loader .rp-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: #ccff00;
  transform: scaleX(0);
  transform-origin: left center;
  animation: rp-bar 1.5s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes rp-letter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rp-bar {
  to {
    transform: scaleX(1);
  }
}

.dark,
html.dark {
  --background: 0 0% 0%;
  --background-hover: 60 2% 10%;
  --foreground: 40 11% 81%;
  --foreground-hover: 0 0% 100%;
  /* primary = white (sidebar links, headings, text-primary) */
  --primary: 0 0% 100%;
  --primary-hover: 72 100% 50%;
  --accent: 72 100% 50%;
  --accent-hover: 72 100% 58%;
  --secondary: 40 8% 55%;
  --secondary-hover: 40 11% 70%;
  --card: 60 2% 10%;
  --border: 72 15% 18%;
  --input: 40 8% 50%;
  --field: 60 2% 7%;
  --error: 0 72% 65%;
  --success: 72 100% 50%;
  --money: 72 100% 50%;
  --warning: 45 93% 58%;
  --scroll-thumb-color: 60 2% 12%;
  --scroll-track-color: 0 0% 4%;
  --palette-jet: 0 0% 0%;
  --palette-charcoal: 60 2% 10%;
  --palette-codeblock: 0 0% 5%;
  --palette-umbra: 72 15% 16%;
  --palette-ink: 60 2% 12%;
  --palette-ash: 60 2% 8%;
  --palette-steel: 72 12% 22%;
}

html.dark,
html.dark body {
  background-color: #000000;
  color: #d4d0c9;
}

/* Brand lime: dollar amounts & financial figures */
html.dark .text-money,
html.dark .money-figure,
html.dark main .font-display.tabular-nums,
html.dark main p.font-display.text-3xl {
  color: #ccff00;
}

html.dark main .bg-primary\/25,
html.dark main .bg-primary\/40 {
  background-color: rgba(204, 255, 0, 0.45);
}

/* Robinhood-style filled CTAs (Connect wallet, Launch, etc.) */
html.dark button.bg-primary,
html.dark a.bg-primary.text-background,
html.dark a.bg-primary[class*="rounded-full"] {
  background-color: #ccff00 !important;
  color: #191918 !important;
  font-weight: 800 !important;
}

html.dark button.bg-primary:hover,
html.dark a.bg-primary.text-background:hover,
html.dark a.bg-primary[class*="rounded-full"]:hover {
  background-color: #d4ff33 !important;
}

footer a[href*="t.me"],
footer a[href*="discord.gg"],
a[aria-label*="Telegram"],
a[aria-label*="Discord"] {
  display: none !important;
}

/* Inline / hash-style links → lime (Robinhood explorer pattern) */
html.dark a.text-primary:hover,
html.dark button.text-primary:hover:not([role="tab"]) {
  color: #ccff00;
}

/* Active tab underline stays white; selected tab label bold white */
/* Robinhood username search dropdown (portal — not Tailwind) */
.robinpay-recipient-host,
#robinpay-recipient-host {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

[aria-label="Launch mode"],
fieldset:has(input[name="launch-currency"]) {
  display: none !important;
}

.robinpay-recipient {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.robinpay-recipient button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.robinpay-recipient button[aria-pressed="true"] {
  background: #ccff00;
  color: #111;
}

.robinpay-recipient-field {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.robinpay-recipient-field input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
  font-size: 15px;
}

.robinpay-recipient-field input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.robinpay-mobile-x {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
}

@media (min-width: 64rem) {
  .robinpay-mobile-x {
    display: none;
  }
}

.robinpay-mobile-x img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #141414;
  padding: 3px;
}

.robinpay-mobile-x span {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.robinpay-mobile-x strong {
  font-size: 12px;
  font-weight: 700;
}

.robinpay-mobile-x em {
  font-style: normal;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

.robinpay-mobile-x svg {
  width: 11px;
  height: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.relay-search-dropdown {
  position: fixed;
  z-index: 100000;
  max-height: 320px;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #191918;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.relay-search-dropdown[hidden] {
  display: none !important;
}

.relay-search-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 308px;
  overflow-y: auto;
}

.relay-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.relay-search-item:hover,
.relay-search-item:focus {
  background: rgba(255, 255, 255, 0.06);
}

.relay-search-empty {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
}

.relay-search-avatar {
  width: 32px;
  height: 32px;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
}

.relay-search-meta {
  min-width: 0;
  flex: 1;
}

.relay-search-name {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relay-search-handle {
  color: #d4d0c9;
  opacity: 0.72;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.relay-selected-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(204, 255, 0, 0.25);
  background: rgba(204, 255, 0, 0.06);
}

.relay-selected-clear {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #d4d0c9;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.relay-selected-clear:hover {
  color: #ffffff;
}

html.robinpay-flow-wait #main {
  visibility: hidden;
}

.robinpay-rh-route h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.robinpay-rh-route p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.5;
}

.robinpay-rh-steps {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.robinpay-rh-steps li {
  flex: 1;
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(204, 255, 0, 0.28);
  background: rgba(204, 255, 0, 0.06);
  padding: 14px 12px;
}

.robinpay-rh-steps li+li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: #ccff00;
  box-shadow: 0 0 10px #ccff00;
  animation: robinpay-pulse 1.4s ease-in-out infinite;
}

.robinpay-rh-steps span {
  display: block;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.robinpay-rh-steps small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

@keyframes robinpay-pulse {
  50% {
    transform: scale(1.45);
    opacity: 0.45;
  }
}

@media (max-width: 640px) {
  .robinpay-rh-steps {
    flex-direction: column;
  }
}

/* Capital flow: fomo-style single path (hide 20% burn branch) */
html.dark svg [data-burn-branch="1"],
html.dark svg .capital-flow-burn-branch {
  display: none !important;
}

html.dark [role="tab"][aria-selected="true"]:not(.bg-primary) .text-primary,
html.dark [role="tab"][aria-selected="true"]:not(.bg-primary) {
  color: #ffffff;
}

.robinpay-powered {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 16px auto 0;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  cursor: default;
}

.robinpay-powered img {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}

p.robinpay-lead {
  max-width: 38rem;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

.robinpay-hero-extra {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 28px auto 0;
  width: min(100%, 640px);
}

.robinpay-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.robinpay-steps li {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
}

.robinpay-steps li+li::before {
  content: "";
  width: 28px;
  height: 1px;
  margin: 0 14px;
  background: rgba(204, 255, 0, 0.55);
  flex: 0 0 auto;
}

.robinpay-ca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 999px;
  padding: 8px 8px 8px 14px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}

.robinpay-ca code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
}

.robinpay-ca-action {
  border-radius: 999px;
  background: #ccff00;
  color: #111;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 650;
}

@media (max-width: 640px) {
  .robinpay-hero-extra {
    width: 100%;
    padding: 0 8px;
  }

  .robinpay-steps {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .robinpay-steps li {
    flex-direction: column;
    font-size: 14px;
  }

  .robinpay-steps li+li::before {
    width: 1px;
    height: 14px;
    margin: 0;
  }
}

#robinpay-wallet {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

#robinpay-wallet[hidden] {
  display: none;
}

.robinpay-wallet-card {
  position: relative;
  width: min(360px, 100%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0c0c0c;
  color: #fff;
  padding: 22px;
}

.robinpay-wallet-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.robinpay-wallet-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.robinpay-wallet-card button[data-wallet],
.robinpay-wallet-ghost {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  height: 52px;
  margin-top: 8px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161616;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.robinpay-wallet-card button[data-wallet] svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.robinpay-wallet-card button[data-wallet] em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.45);
}

.robinpay-wallet-card button[data-installed="1"] em {
  color: #ccff00;
}

.robinpay-wallet-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.robinpay-wallet-ghost {
  justify-content: center;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.robinpay-wallet-ghost[hidden],
.robinpay-wallet-note[hidden] {
  display: none;
}

.robinpay-wallet-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}