/* TradeClick — Shared theme styles */

:root {
  --bg-deep: #050810;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-strong: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --text-primary: #E5E9F0;
  --text-secondary: rgba(229, 233, 240, 0.6);
  --text-tertiary: rgba(229, 233, 240, 0.4);
  
  --green: #1D9E75;
  --green-bright: #5DCAA5;
  --green-light: #9FE1CB;
  --green-dark: #0F6E56;
  --green-glow: rgba(29, 158, 117, 0.4);
  
  --red: #E24B4A;
  --red-bright: #F09595;
  --red-dark: #A32D2D;
  
  --amber: #FAC775;
  --amber-bright: #F0997B;
  
  --blue: #85B7EB;
  --blue-dark: #185FA5;
  
  --purple: #AFA9EC;
  --purple-dark: #534AB7;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
}

button:hover {
  filter: brightness(1.15);
}

button:active {
  transform: scale(0.99);
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

input {
  font-family: inherit;
  outline: none;
  border: none;
  background: transparent;
  color: inherit;
}

input::placeholder {
  color: rgba(229, 233, 240, 0.25);
}

/* Layout */
.page {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 440px;
  margin: 0 auto;
  padding: 20px;
}

.container-wide {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
}

/* Animated background grid */
.algo-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.algo-grid svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
}

/* Ambient glows */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
}

.glow-green-tr {
  top: -100px;
  right: -100px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(29, 158, 117, 0.18) 0%, transparent 70%);
}

.glow-green-bl {
  bottom: -120px;
  left: -100px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(29, 158, 117, 0.1) 0%, transparent 70%);
}

.glow-purple {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(127, 119, 221, 0.08) 0%, transparent 70%);
}

/* Animations */
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 8px currentColor; opacity: 1; transform: scale(1); }
  50% { box-shadow: 0 0 14px currentColor; opacity: 0.6; transform: scale(1.2); }
}

@keyframes pulse-status {
  0%, 100% { box-shadow: 0 0 10px var(--green-bright); opacity: 1; }
  50% { box-shadow: 0 0 18px var(--green-bright); opacity: 0.7; }
}

@keyframes shimmer {
  0% { opacity: 0; transform: translateX(-100%); }
  15% { opacity: 1; }
  50% { opacity: 1; }
  85% { opacity: 0; }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes aurora-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes grid-scroll {
  from { transform: translate(0, 0); }
  to { transform: translate(0, 40px); }
}

@keyframes flame-flicker {
  0%, 100% { transform: scale(1) rotate(-2deg); filter: brightness(1); }
  50% { transform: scale(1.15) rotate(3deg); filter: brightness(1.3); }
}

@keyframes count-up-pop {
  0% { transform: scale(1); }
  30% { transform: scale(1.06); text-shadow: 0 0 60px rgba(93, 202, 165, 0.9), 0 2px 4px rgba(0, 0, 0, 0.3); }
  100% { transform: scale(1); }
}

.pulse-dot {
  animation: pulse-dot 1.6s ease-in-out infinite;
}

.shimmer-line {
  animation: shimmer 5s ease-in-out infinite;
}

.aurora {
  animation: aurora-rotate 80s linear infinite;
}

.glow-anim {
  animation: glow-pulse 6s ease-in-out infinite;
}

/* Utility cards */
.card {
  background: var(--bg-card);
  border: 0.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 14px 16px;
}

.card-strong {
  background: var(--bg-card-strong);
  border: 0.5px solid var(--border-medium);
}

.card-green {
  background: rgba(29, 158, 117, 0.06);
  border: 0.5px solid rgba(29, 158, 117, 0.3);
}

/* Top edge accent */
.top-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent);
  opacity: 0.5;
}

/* Corner brackets - premium UI */
.corner-tl, .corner-tr, .corner-bl, .corner-br {
  position: absolute;
  width: 14px;
  height: 14px;
}

.corner-tl { top: 12px; left: 12px; border-top: 1px solid rgba(93, 202, 165, 0.5); border-left: 1px solid rgba(93, 202, 165, 0.5); }
.corner-tr { top: 12px; right: 12px; border-top: 1px solid rgba(93, 202, 165, 0.5); border-right: 1px solid rgba(93, 202, 165, 0.5); }
.corner-bl { bottom: 12px; left: 12px; border-bottom: 1px solid rgba(93, 202, 165, 0.5); border-left: 1px solid rgba(93, 202, 165, 0.5); }
.corner-br { bottom: 12px; right: 12px; border-bottom: 1px solid rgba(93, 202, 165, 0.5); border-right: 1px solid rgba(93, 202, 165, 0.5); }

/* Buttons */
.btn-primary {
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 24px var(--green-glow);
  transition: filter 0.2s ease, transform 0.1s ease;
}

.btn-secondary {
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 0.5px solid var(--border-medium);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: filter 0.2s ease, transform 0.1s ease;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pills/Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.badge-green {
  background: rgba(29, 158, 117, 0.2);
  color: var(--green-bright);
  border: 0.5px solid rgba(29, 158, 117, 0.4);
}

.badge-amber {
  background: rgba(250, 199, 117, 0.15);
  color: var(--amber);
  border: 0.5px solid rgba(250, 199, 117, 0.3);
}

.badge-blue {
  background: rgba(133, 183, 235, 0.15);
  color: var(--blue);
  border: 0.5px solid rgba(133, 183, 235, 0.3);
}

.badge-purple {
  background: rgba(127, 119, 221, 0.15);
  color: var(--purple);
  border: 0.5px solid rgba(127, 119, 221, 0.4);
}

/* Pair pills (mono font) */
.pair-pill {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Typography */
.eyebrow {
  font-size: 10px;
  color: var(--green-bright);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.label {
  font-size: 10px;
  color: rgba(229, 233, 240, 0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 500;
}

h1, h2, h3 {
  font-weight: 500;
  color: white;
  letter-spacing: -1px;
}

.text-mono {
  font-family: var(--font-mono);
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Hover effects */
[onclick] {
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

[onclick]:hover {
  filter: brightness(1.1);
}

[onclick]:active {
  transform: scale(0.99);
}

/* Range input styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(29, 158, 117, 0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(29, 158, 117, 0.5);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Mobile responsive container */
@media (min-width: 768px) {
  .container {
    max-width: 480px;
  }
}

/* sr-only for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
