/* ============================================================
   app.css — Doller Investment Platform (Pocketswap UI/UX Fix)
   ============================================================ */


/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  background-color: #050C0C;
  color: #f8fafc;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Radial Emerald Glow (Hero Background Aura) ────────────── */
.hero-glow-aura {
  position: absolute;
  top: -100px;
  right: -50px;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(19, 146, 38, 0.32) 0%, rgba(52, 172, 76, 0.15) 45%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.hero-glow-left {
  position: absolute;
  top: 200px;
  left: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(52, 172, 76, 0.15) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.bg-grid-pattern {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Typography & Gradients ───────────────────────────────── */
.font-display {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

.gradient-text-hero {
  background: linear-gradient(135deg, #ffffff 0%, #d1fae5 40%, #34AC4C 85%, #139226 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-green {
  background: linear-gradient(135deg, #34AC4C 0%, #6EE7B7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glassmorphism Cards ──────────────────────────────────── */
.glass-card {
  background: linear-gradient(180deg, rgba(14, 26, 26, 0.8) 0%, rgba(8, 16, 16, 0.9) 100%);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.glass-card-hover {
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 172, 76, 0.45);
  box-shadow: 0 25px 50px -10px rgba(19, 146, 38, 0.35);
}

.glass-card-emerald {
  background: linear-gradient(135deg, #139226 0%, #34AC4C 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 20px 45px rgba(19, 146, 38, 0.4);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.96);
  color: #050C0C;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ── Buttons (High Contrast Fixes) ────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: linear-gradient(135deg, #139226 0%, #34AC4C 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 25px rgba(19, 146, 38, 0.45);
  text-decoration: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #34AC4C 0%, #40c057 100%);
  box-shadow: 0 8px 35px rgba(52, 172, 76, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(12px);
  text-decoration: none;
}
.btn-secondary:hover {
  background: rgba(52, 172, 76, 0.15);
  border-color: #34AC4C;
  color: #34AC4C !important;
  transform: translateY(-2px);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(239, 68, 68, 0.3);
  cursor: pointer;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: max-content;
  overflow-wrap: normal;
  word-break: normal;
}
.badge-green  { background: rgba(52, 172, 76, 0.15); color: #34AC4C; border: 1px solid rgba(52, 172, 76, 0.35); }
.badge-red    { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.badge-blue   { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.35); }
.badge-yellow { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.35); }

/* ── Animations & Keyframe Effects ────────────────────────── */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(0.4deg);
  }
}

@keyframes floatReverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(-0.4deg);
  }
}

@keyframes floatDelayed {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulseHalo {
  0%, 100% {
    opacity: 0.35;
    transform: scale(0.96);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.06);
  }
}

@keyframes drawChartCurve {
  0% {
    stroke-dashoffset: 400;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes buttonGleam {
  0% {
    transform: translateX(-150%) skewX(-20deg);
  }
  30%, 100% {
    transform: translateX(250%) skewX(-20deg);
  }
}

@keyframes radarWave {
  0% {
    transform: scale(0.8);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes livePulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

.animate-float {
  animation: floatSlow 6s ease-in-out infinite;
  will-change: transform;
}

.animate-float-reverse {
  animation: floatReverse 7s ease-in-out infinite;
  animation-delay: 0.8s;
  will-change: transform;
}

.animate-float-delayed {
  animation: floatDelayed 5.5s ease-in-out infinite;
  animation-delay: 2s;
  will-change: transform;
}

.animate-pulse-halo {
  animation: pulseHalo 4s ease-in-out infinite;
}

.animate-live-dot {
  animation: livePulseDot 2s ease-in-out infinite;
}

.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.26) 50%,
    transparent 100%
  );
  transform: translateX(-120%) skewX(-20deg);
  animation: buttonGleam 4.5s infinite ease-in-out;
}

.chart-animated-path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  animation: drawChartCurve 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.radar-ping-ring {
  position: relative;
}

.radar-ping-ring::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  border: 2px solid #34AC4C;
  animation: radarWave 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

/* ── Phone Device (Executive FinTech Chassis) ─────────────── */
.phone-device-container {
  position: relative;
  width: 325px;
  max-width: 100%;
  padding: 10px;
  background: linear-gradient(180deg, #243b3b 0%, #112020 40%, #091313 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 46px;
  box-shadow: 
    0 30px 80px -10px rgba(0, 0, 0, 0.95),
    0 0 70px rgba(19, 146, 38, 0.28),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.phone-inner {
  background: radial-gradient(circle at top, #0d1a1a 0%, #060d0d 100%);
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.phone-inner::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 45%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0%, transparent 60%);
  pointer-events: none;
}

.phone-notch {
  width: 105px;
  height: 22px;
  background: #152222;
  margin: 0 auto;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
}

.phone-notch-speaker {
  width: 38px;
  height: 3.5px;
  background: #091313;
  border-radius: 4px;
}

.phone-notch-camera {
  width: 6.5px;
  height: 6.5px;
  background: #050c0c;
  border-radius: 50%;
  border: 1px solid rgba(52, 172, 76, 0.4);
}

.hero-phone-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  height: 480px;
  max-width: 90vw;
  background: radial-gradient(circle, rgba(19, 146, 38, 0.35) 0%, rgba(52, 172, 76, 0.12) 50%, transparent 70%);
  filter: blur(65px);
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 640px) {
  .phone-device-container {
    width: 290px;
    padding: 8px;
    border-radius: 40px;
  }
  .phone-inner {
    border-radius: 32px;
  }
  .hero-phone-glow {
    width: 300px;
    height: 300px;
    filter: blur(45px);
  }
}


/* ── Preset Chips ─────────────────────────────────────────── */
.preset-chip {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.preset-chip:hover, .preset-chip.active {
  background: rgba(52, 172, 76, 0.18);
  border-color: #34AC4C;
  color: #34AC4C;
}

/* ── Custom Range Input ───────────────────────────────────── */
input[type=range] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #34AC4C;
  border: 3px solid #ffffff;
  box-shadow: 0 0 15px rgba(52, 172, 76, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.18); }

/* ── Form Inputs ──────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  background: rgba(15, 26, 26, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  color: #ffffff;
  font-size: 0.9375rem;
  outline: none;
  transition: all 0.25s ease;
}
.form-input:focus {
  border-color: #34AC4C;
  box-shadow: 0 0 0 4px rgba(52, 172, 76, 0.18);
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

/* ── Data Tables ──────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  padding: 1rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: rgba(15, 26, 26, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.data-table td {
  padding: 1.125rem 1.5rem;
  font-size: 0.875rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ── Toast Container ──────────────────────────────────────── */
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(10, 21, 21, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.875rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.show { transform: translateX(0); }
.toast-success { border-color: rgba(52, 172, 76, 0.5); }
.toast-error   { border-color: rgba(239, 68, 68, 0.5); }

/* ── Premium Animated Brand Logo (FinTech Luxury) ─────────── */
.brand-logo-container {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  user-select: none;
}

.brand-icon-box {
  position: relative;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #0d281e 0%, #061912 100%);
  border: 1px solid rgba(52, 172, 76, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(52, 172, 76, 0.2);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  isolation: isolate;
}

/* Outer pulsing breathing ring around the logo */
.brand-icon-box::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(from var(--logo-angle, 0deg), #34ac4c, #10b981, #059669, #022c22, #10b981, #34ac4c);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: logoSpinOrbit 6s linear infinite;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

@property --logo-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes logoSpinOrbit {
  to {
    --logo-angle: 360deg;
  }
}

/* Shimmer beam across the logo emblem */
.brand-icon-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: rotate(25deg);
  animation: logoShimmerBeam 4.5s ease-in-out infinite;
}

@keyframes logoShimmerBeam {
  0%, 65% {
    transform: translateX(-120%) rotate(25deg);
    opacity: 0;
  }
  75% {
    opacity: 1;
  }
  90%, 100% {
    transform: translateX(350%) rotate(25deg);
    opacity: 0;
  }
}

/* Logo SVG emblem and animation */
.brand-svg-mark {
  position: relative;
  z-index: 2;
  width: 1.35rem;
  height: 1.35rem;
  color: #34ac4c;
  filter: drop-shadow(0 0 8px rgba(52, 172, 76, 0.6));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover dynamic interaction */
.brand-logo-container:hover .brand-icon-box {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 30px rgba(52, 172, 76, 0.4), 0 0 25px rgba(52, 172, 76, 0.35);
  border-color: rgba(52, 172, 76, 0.8);
}

.brand-logo-container:hover .brand-icon-box::before {
  opacity: 1;
  animation-duration: 2.5s;
}

.brand-logo-container:hover .brand-svg-mark {
  transform: scale(1.12) rotate(4deg);
  color: #4ade80;
  filter: drop-shadow(0 0 12px rgba(74, 222, 128, 0.9));
}

/* Brand Text Styling */
.brand-text-wrapper {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-family: var(--font-display, inherit);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #a7f3d0 75%, #34ac4c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(52, 172, 76, 0.25);
  transition: filter 0.3s ease;
}

.brand-subtitle {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #34ac4c;
  opacity: 0.9;
}

.brand-logo-container:hover .brand-title {
  filter: drop-shadow(0 0 8px rgba(52, 172, 76, 0.4));
}

/* Small size variant for footers / compact headers */
.brand-icon-box.sm {
  width: 2rem;
  height: 2rem;
  border-radius: 0.6rem;
}
.brand-icon-box.sm .brand-svg-mark {
  width: 1.05rem;
  height: 1.05rem;
}
