/* QX HACK — premium gold glass theme */

:root {
  --neon: oklch(82% .16 85);
  --neon-soft: oklch(74% .14 78);
  --gradient-neon: linear-gradient(135deg, oklch(86% .14 92), oklch(62% .16 65));
  --gradient-bg: radial-gradient(ellipse at top, oklch(16% .05 75) 0%, oklch(6% .02 70) 55%, #050403 100%);
  --glow-neon: 0 0 22px oklch(80% .15 85 / .5), 0 0 56px oklch(80% .15 85 / .2);
  --glow-soft: 0 0 36px oklch(80% .15 85 / .12);
  --shadow-card: 0 10px 28px oklch(0% 0 0 / .45), inset 0 1px 0 oklch(90% .08 90 / .18);
  --primary: oklch(80% .15 85);
  --background: oklch(8% .02 70);
}

* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html, body {
  background: #07060a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
}

.page-bg {
  background:
    radial-gradient(900px 420px at 50% -8%, oklch(42% .1 85 / .28), transparent 58%),
    radial-gradient(520px 280px at 100% 100%, oklch(38% .08 55 / .16), transparent 50%),
    radial-gradient(460px 240px at 0% 70%, oklch(32% .07 250 / .12), transparent 55%),
    var(--gradient-bg) !important;
}

.page-bg::before {
  background-image:
    linear-gradient(oklch(82% .12 85 / .05) 1px, transparent 1px),
    linear-gradient(90deg, oklch(82% .12 85 / .05) 1px, transparent 1px) !important;
  opacity: .55;
}

/* Glass Card */
.glass-card {
  -webkit-backdrop-filter: blur(12px) !important;
  backdrop-filter: blur(12px) !important;
  background: linear-gradient(
    165deg,
    oklch(92% .08 90 / .1),
    oklch(16% .03 70 / .58) 46%,
    oklch(11% .02 70 / .7)
  ) !important;
  border: 1px solid oklch(84% .12 85 / .3) !important;
  box-shadow:
    var(--shadow-card),
    0 0 0 1px oklch(84% .1 85 / .06),
    0 8px 28px oklch(70% .14 85 / .08) !important;
  isolation: isolate;
  pointer-events: auto !important;
}

.btn-neon {
  color: #1a1206 !important;
  background: linear-gradient(135deg, #ffe7a3 0%, #e0b44a 42%, #b8862a 100%) !important;
  box-shadow:
    0 8px 22px oklch(70% .16 80 / .35),
    inset 0 1px 0 oklch(100% 0 0 / .45) !important;
  text-shadow: 0 1px 0 oklch(100% 0 0 / .25);
  position: relative;
  overflow: hidden;
  transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

.btn-neon:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 12px 28px oklch(72% .16 80 / .45),
    0 0 40px oklch(80% .15 85 / .28) !important;
}

.btn-neon:active {
  transform: translateY(0) scale(.99) !important;
}

.neon-text {
  color: var(--neon) !important;
  text-shadow: 0 0 14px oklch(80% .15 85 / .55) !important;
}

button, a, select {
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), box-shadow .22s ease, background-color .22s ease, color .18s ease, border-color .22s ease, opacity .22s ease;
  touch-action: manipulation !important;
}

nav a, nav button {
  transition: background .22s ease, color .18s ease, filter .22s ease, opacity .22s ease !important;
}

.page-bg > .relative,
.page-bg > .mx-auto {
  animation: xo-fade .3s ease both;
}

/* Disable heavy blur animations on mobile for instant rendering */
.blur-[110px],
.blur-[120px],
.blur-3xl,
.blur-2xl {
  animation: none !important;
  will-change: auto !important;
}

header img {
  filter: drop-shadow(0 0 18px oklch(80% .15 85 / .45));
  transition: filter .35s ease;
}

header img:hover {
  filter: drop-shadow(0 0 26px oklch(80% .15 85 / .7));
}

input:focus, select:focus {
  outline: none;
}

@keyframes xo-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Telegram brand blue */
.btn-telegram {
  background-image: linear-gradient(to right, #0088cc, #2aabee, #0088cc) !important;
  box-shadow:
    0 0 28px rgba(42, 171, 238, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.35) !important;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease !important;
  touch-action: manipulation !important;
}

.btn-telegram:hover {
  transform: translateY(-2px) !important;
  box-shadow:
    0 0 36px rgba(42, 171, 238, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.btn-telegram:active {
  transform: scale(0.98) !important;
}

/* iOS Safari Input Keyboard Activation Guarantee */
#qx-trader-input,
.qx-native-input {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  font-size: 16px !important; /* Critical: 16px prevents iOS zoom & delay */
  line-height: 1.5 !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  -webkit-touch-callout: default !important;
  touch-action: manipulation !important;
  cursor: text !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: block !important;
  width: 100% !important;
  padding: 4px 0 !important;
  margin: 0 !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 50 !important;
}

.qx-input-container {
  position: relative !important;
  z-index: 30 !important;
  pointer-events: auto !important;
  cursor: text !important;
  touch-action: manipulation !important;
}

/* Hide Netlify Badge */
.nl-wrap, #nl-card, #nl-badge, .nl-badge, .nl-card, .nl-hide, [class*="nl-"] {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  max-width: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  z-index: -9999 !important;
}
