/* ==========================================
   AUXME-DEX-PRO Cyber-Fintech Custom CSS
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #07090E;
  --bg-card: rgba(14, 20, 31, 0.75);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  --accent-cyan: #00F0FF;
  --accent-emerald: #10B981;
  --accent-rose: #F43F5E;
  --accent-amber: #F59E0B;
  --accent-indigo: #6366F1;
}

html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-dark);
  color: #E2E8F0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism Containers (Executive Institutional Elevation) */
.glass-panel {
  background: linear-gradient(180deg, rgba(15, 22, 38, 0.82) 0%, rgba(9, 14, 25, 0.78) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 100%;
  min-width: 0;
}

.glass-panel-glow {
  background: linear-gradient(135deg, rgba(18, 26, 46, 0.88) 0%, rgba(10, 15, 28, 0.82) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.28);
  box-shadow: 0 16px 40px -12px rgba(79, 70, 229, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  max-width: 100%;
  min-width: 0;
}

.glass-header {
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0B0E14;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

/* Cyber Glow Buttons & Badges */
.btn-cyber-primary {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-cyber-primary:hover {
  background: linear-gradient(135deg, #4338CA 0%, #6D28D9 100%);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn-cyber-success {
  background: linear-gradient(135deg, #059669 0%, #10B981 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
}
.btn-cyber-success:hover {
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

.badge-verdict-pass {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-verdict-watch {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-verdict-avoid {
  background: rgba(244, 63, 94, 0.15);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Animations */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.03); }
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

/* Table Responsive & Mobile Utilities */
.table-responsive-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  width: 100%;
  max-width: 100%;
}

.table-responsive-container::-webkit-scrollbar {
  height: 4px;
}

.table-responsive-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

table th,
table td,
.table-responsive-container th,
.table-responsive-container td {
  vertical-align: middle;
  white-space: nowrap;
}

table td.whitespace-normal,
table th.whitespace-normal {
  white-space: normal;
}

/* Matured Institutional Dark Fintech Canvas (Layered Aurora + Micro-Dot + Precision Grid) */
.bg-cyber-grid,
.bg-radial-gradient,
.bg-cyber-grid.bg-radial-gradient {
  background-color: #050811;
  background-image:
    radial-gradient(ellipse 68% 45% at 18% -6%, rgba(79, 70, 229, 0.19) 0%, transparent 65%),
    radial-gradient(ellipse 55% 42% at 88% 8%, rgba(6, 182, 212, 0.13) 0%, transparent 62%),
    radial-gradient(ellipse 50% 45% at 12% 94%, rgba(16, 185, 129, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 48% 40% at 86% 92%, rgba(124, 58, 237, 0.10) 0%, transparent 62%),
    radial-gradient(rgba(148, 163, 184, 0.13) 1px, transparent 1px),
    linear-gradient(to right, rgba(148, 163, 184, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.032) 1px, transparent 1px);
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    28px 28px,
    56px 56px,
    56px 56px;
  background-attachment: fixed;
}

/* Pure Digital Circuit Data-Packet Animations (Zero Images) */
@keyframes dashDataFlow {
  0% { stroke-dashoffset: 1200; opacity: 0; }
  12% { opacity: 0.95; }
  85% { opacity: 0.95; }
  100% { stroke-dashoffset: -1200; opacity: 0; }
}

.dash-data-pulse {
  stroke-dasharray: 110 1100;
  animation: dashDataFlow 9s linear infinite;
}

.dash-data-pulse-delay {
  stroke-dasharray: 95 1150;
  animation: dashDataFlow 12s linear 3.5s infinite;
}

.dash-data-pulse-slow {
  stroke-dasharray: 80 1000;
  animation: dashDataFlow 14s linear 1.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .dash-data-pulse, .dash-data-pulse-delay, .dash-data-pulse-slow {
    animation: none;
    opacity: 0.2;
  }
}

/* Scrollbar utilities for mobile tabs */
.scrollbar-none::-webkit-scrollbar {
  display: none;
}
.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Mobile Touch & Native PWA Feel (keeps native pull-to-refresh enabled) */
html, body {
  -webkit-tap-highlight-color: transparent;
}

@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 640px) {
  input, select, textarea, button {
    font-size: 13px;
  }
}

/* ===================================================
   Cyber-Tech Radar, HUD & Digital Hologram Aesthetics
   =================================================== */

@keyframes radarSweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-radar-sweep {
  animation: radarSweep 2.5s linear infinite;
  transform-origin: center center;
}

@keyframes cyberScanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(900%); }
}

.cyber-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.8) 30%, rgba(0, 240, 255, 0.9) 50%, rgba(99, 102, 241, 0.8) 70%, transparent 100%);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.8);
  opacity: 0.65;
  animation: cyberScanline 3.5s linear infinite;
  pointer-events: none;
  z-index: 10;
}

/* Cyber HUD Corner Brackets */
.hud-box {
  position: relative;
}

.hud-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: #00F0FF;
  pointer-events: none;
  z-index: 20;
}

.hud-corner-tl { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.hud-corner-tr { top: -1px; right: -1px; border-top: 2px solid; border-right: 2px solid; }
.hud-corner-bl { bottom: -1px; left: -1px; border-bottom: 2px solid; border-left: 2px solid; }
.hud-corner-br { bottom: -1px; right: -1px; border-bottom: 2px solid; border-right: 2px solid; }

/* Neon Glows */
.neon-glow-cyan {
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.65);
}
.neon-glow-emerald {
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}
.neon-glow-rose {
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.65);
}
.neon-glow-amber {
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.65);
}

/* Terminal Cursor Blink */
@keyframes cyberCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 13px;
  background-color: #00F0FF;
  vertical-align: middle;
  animation: cyberCursor 0.75s infinite ease-in-out;
  margin-left: 3px;
}

/* Tactile Interactive Button Feedback */
button:not(:disabled), .btn:not(:disabled), a[role="button"], input[type="submit"] {
  transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1), filter 0.12s ease, box-shadow 0.15s ease;
  user-select: none;
}

button:not(:disabled):active, .btn:not(:disabled):active {
  transform: scale(0.95) !important;
  filter: brightness(1.2);
}

@keyframes buttonPulseWave {
  0% { transform: scale(1); }
  50% { transform: scale(0.94); filter: brightness(1.25); }
  100% { transform: scale(1); }
}

.button-clicked {
  animation: buttonPulseWave 0.22s ease-out;
}

/* Success Flash State for Copied Buttons */
.btn-success-flash {
  border-color: #10B981 !important;
  color: #34D399 !important;
  background-color: rgba(6, 78, 59, 0.7) !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45) !important;
}

/* AI Check Button Shimmer Sweep */
@keyframes aiBtnShimmer {
  0% { transform: translateX(-140%) skewX(-22deg); }
  55%, 100% { transform: translateX(260%) skewX(-22deg); }
}

.ai-shimmer-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 48%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(34, 211, 238, 0) 0%,
    rgba(34, 211, 238, 0.34) 50%,
    rgba(255, 255, 255, 0.45) 55%,
    rgba(34, 211, 238, 0) 100%
  );
  animation: aiBtnShimmer 2.8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
