/* CRITICAL ALIGNMENT FIX - Force proper centering */
* {
  box-sizing: border-box !important;
}

html {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  position: relative !important;
  scroll-behavior: smooth !important;
}

/* Enhanced style.css - Modern Trading Dashboard UI */
:root {
  /* Crystal Liquid Theme - Advanced Glassmorphism */
  --primary-color: #6366f1;
  /* Crystal indigo */
  --secondary-color: #8b5cf6;
  /* Amethyst purple */
  --accent-color: #06b6d4;
  /* Liquid cyan */
  --tertiary-color: #10b981;
  /* Emerald crystal */
  --quaternary-color: #f59e0b;
  /* Amber liquid */

  /* Crystal Feedback Colors */
  --success-color: #10b981;
  /* Crystal emerald */
  --danger-color: #ef4444;
  /* Ruby red */
  --warning-color: #f59e0b;
  /* Amber crystal */
  --info-color: #06b6d4;
  /* Liquid cyan */

  /* Liquid Background System */
  --dark-bg: #0f0f23;
  /* Deep space navy */
  --darker-bg: #0a0a1a;
  /* Void black */
  --sidebar-bg: rgba(15, 15, 35, 0.8);
  /* Translucent navy */
  --card-bg: rgba(255, 255, 255, 0.05);
  /* Ultra-transparent white */
  --card-header-bg: rgba(255, 255, 255, 0.08);
  /* Slightly more opaque */
  --glass-bg: rgba(255, 255, 255, 0.1);
  /* Glass effect */
  --crystal-bg: rgba(99, 102, 241, 0.1);
  /* Crystal tint */

  /* Liquid Text System */
  --text-color: #f8fafc;
  /* Pure crystal white */
  --text-muted: #cbd5e1;
  /* Liquid silver */
  --text-secondary: #e2e8f0;
  /* Soft white */
  --text-accent: #06b6d4;
  /* Liquid cyan text */

  /* Crystal Borders & Effects */
  --border-color: rgba(255, 255, 255, 0.1);
  /* Subtle crystal border */
  --highlight-border: rgba(99, 102, 241, 0.3);
  /* Crystal highlight */
  --shadow-color: rgba(0, 0, 0, 0.3);
  /* Soft shadows */
  --shadow-color-light: rgba(99, 102, 241, 0.1);
  /* Crystal glow */
  --crystal-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
  /* Crystal depth */

  /* Liquid Effects */
  --glass-effect: rgba(255, 255, 255, 0.1);
  /* Glass morphism */
  --liquid-gradient: linear-gradient(135deg,
      rgba(99, 102, 241, 0.1) 0%,
      rgba(139, 92, 246, 0.1) 25%,
      rgba(6, 182, 212, 0.1) 50%,
      rgba(16, 185, 129, 0.1) 75%,
      rgba(245, 158, 11, 0.1) 100%);
  --crystal-gradient: linear-gradient(135deg,
      #6366f1 0%,
      #8b5cf6 25%,
      #06b6d4 50%,
      #10b981 75%,
      #f59e0b 100%);
  --glow-color: rgba(99, 102, 241, 0.2);
  /* Crystal glow */
  --liquid-glow: rgba(6, 182, 212, 0.3);
  /* Liquid cyan glow */

  /* Advanced Timing & Shapes */
  --transition-speed: 0.3s;
  /* Smooth liquid flow */
  --transition-ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  /* Liquid easing */
  --border-radius: 20px;
  /* Rounded crystal edges */
  --border-radius-lg: 24px;
  /* Large crystal corners */
  --border-radius-sm: 12px;
  /* Small crystal corners */
  --border-radius-xl: 32px;
  /* Extra large for special elements */
  --grid-line-color: rgba(99, 102, 241, 0.05);
  /* Subtle crystal grid */

  /* Liquid Animation Variables */
  --liquid-flow: 4s;
  /* Liquid animation duration */
  --crystal-shimmer: 2s;
  /* Crystal shimmer speed */
  --float-animation: 6s;
  /* Floating animation */
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: var(--darker-bg);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-y: scroll !important;
  overflow-x: hidden;
  position: relative;
  height: auto !important;
  /* Performance optimizations */
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Liquid Background Animation */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(0, 201, 255, 0.06) 0%, transparent 50%);
  z-index: -3;
  /* animation: liquidFlow 15s infinite ease-in-out alternate; */
}

/* Floating Crystal Particles - DISABLED for performance */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 70% 60%, rgba(99, 102, 241, 0.02) 2px, transparent 2px);
  background-size: 80px 80px, 100px 100px;
  /* animation: floatParticles 20s infinite linear; */
  z-index: -2;
}

/* Liquid Flow Animation */
@keyframes liquidFlow {
  0% {
    transform: translateX(-10%) translateY(-5%) scale(1.1);
    filter: hue-rotate(0deg);
  }

  25% {
    transform: translateX(5%) translateY(-10%) scale(1.05);
    filter: hue-rotate(90deg);
  }

  50% {
    transform: translateX(10%) translateY(5%) scale(1.1);
    filter: hue-rotate(180deg);
  }

  75% {
    transform: translateX(-5%) translateY(10%) scale(1.05);
    filter: hue-rotate(270deg);
  }

  100% {
    transform: translateX(-10%) translateY(-5%) scale(1.1);
    filter: hue-rotate(360deg);
  }
}

/* Floating Particles Animation */
@keyframes floatParticles {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.1;
  }

  25% {
    transform: translateY(-20px) rotate(90deg);
    opacity: 0.2;
  }

  50% {
    transform: translateY(-10px) rotate(180deg);
    opacity: 0.15;
  }

  75% {
    transform: translateY(-30px) rotate(270deg);
    opacity: 0.25;
  }
}

/* Crystal Shimmer Effect */
@keyframes crystalShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

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

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 8px;
  opacity: 0.8;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
  opacity: 1;
}

/* Crystal Liquid Container */
.app-container {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--darker-bg);
  color: var(--text-color);
  padding-top: 20px;
  padding-bottom: 40px;
  width: 100%;
  margin: 0 !important;
  box-sizing: border-box;
  left: 0;
  right: 0;
}

/* Ensure content is properly centered */
.app-container>* {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Force proper centering for all content */
body,
html {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow-x: hidden !important;
  position: relative !important;
}

/* Ensure dashboard content is centered */
#mainContent {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Crystal Glass Effect */
.app-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-effect);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xl);
  z-index: -1;
}

/* Liquid Morphing Effect */
.app-container::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--crystal-gradient);
  opacity: 0.05;
  border-radius: 50%;
  animation: liquidMorph 8s ease-in-out infinite;
  z-index: -2;
}

@keyframes liquidMorph {

  0%,
  100% {
    transform: translate(-20%, -20%) scale(1) rotate(0deg);
    border-radius: 50%;
  }

  25% {
    transform: translate(20%, -30%) scale(1.1) rotate(90deg);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }

  50% {
    transform: translate(30%, 20%) scale(0.9) rotate(180deg);
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
  }

  75% {
    transform: translate(-30%, 30%) scale(1.05) rotate(270deg);
    border-radius: 40% 60% 60% 40% / 60% 40% 40% 60%;
  }
}

.openPositionsButton:hover {
  background: linear-gradient(to right, #324bd9, #5d71ff);
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 8px 15px rgba(99, 102, 241, 0.3),
    0 0 0 1px rgba(99, 102, 241, 0.1),
    0 0 12px rgba(99, 102, 241, 0.15);
}

.openPositionsButton:active {
  transform: translateY(-2px) scale(1.01);
}

/* Navigation Bar Styling with improved visual appeal */
.navigation {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 18px 22px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  transition: all 0.3s var(--transition-ease);
  position: relative;
  overflow: hidden;
}

.subscription-alert:hover {
  background: rgba(15, 23, 42, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-color);
}

.subscription-alert::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.subscription-alert:hover::before {
  opacity: 1;
}

.subscription-alert p {
  color: var(--text-color);
  font-weight: 600;
  margin: 0;
  font-size: 15px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.subscription-alert .subscribe-btn {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-speed) var(--transition-ease);
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.25);
}

.subscription-alert .subscribe-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-25deg);
  transition: all 0.7s var(--transition-ease);
}

.subscription-alert .subscribe-btn:hover {
  background: linear-gradient(to right, var(--accent-color), var(--primary-color));
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.subscription-alert .subscribe-btn:hover::before {
  left: 100%;
}

.subscription-alert .subscribe-btn i {
  font-size: 15px;
  transition: transform 0.3s var(--transition-ease);
}

.subscription-alert .subscribe-btn:hover i {
  transform: translateY(-2px);
}

/* Add animation for content sections */
.content-section {
  animation: fadeUpIn 0.6s var(--transition-ease) both;
  will-change: transform, opacity;
}

@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sequential animation delay for content sections */
.content-section:nth-child(1) {
  animation-delay: 0.1s;
}

.content-section:nth-child(2) {
  animation-delay: 0.2s;
}

.content-section:nth-child(3) {
  animation-delay: 0.3s;
}

.content-section:nth-child(4) {
  animation-delay: 0.4s;
}

.content-section:nth-child(5) {
  animation-delay: 0.5s;
}

/* Chart and Performance Section Enhancement */
#chart-container {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.85) 0%, rgba(13, 20, 37, 0.85) 100%);
  padding: 24px;
  border-radius: var(--border-radius-sm);
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--transition-ease);
}

#chart-container:hover {
  background: linear-gradient(180deg, rgba(17, 25, 45, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1);
}

#chart-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 201, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#chart-container:hover::before {
  opacity: 1;
}

canvas {
  position: relative;
  z-index: 2;
  transition: transform 0.5s var(--transition-ease);
}

#chart-container:hover canvas {
  transform: scale(1.02);
}

/* Performance stats enhancements */
#monthlyProfit,
#dailyAverage,
#totalTrades {
  transition: all 0.3s var(--transition-ease);
  position: relative;
}

#monthlyProfit:hover,
#dailyAverage:hover,
#totalTrades:hover {
  transform: translateY(-3px);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Interactive Form Elements */
.form-group {
  transition: transform 0.3s var(--transition-ease);
}

.form-group:focus-within {
  transform: translateY(-3px);
}

/* Progress bar animation - for loaders */
@keyframes progress {
  0% {
    width: 0%;
    background: var(--primary-color);
  }

  100% {
    width: 100%;
    background: var(--success-color);
  }
}

/* Loading indicator glow animation */
@keyframes loadingGlow {

  0%,
  100% {
    box-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
  }

  50% {
    box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--primary-color);
  }
}

/* Add subtle hover effects to all interactive elements */
button,
a,
input,
select,
.clickable,
[role="button"] {
  transition: all 0.3s var(--transition-ease);
}

/* Enhanced focus states for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
.clickable:focus,
[role="button"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Improve button press effects */
button:active,
.btn:active,
[role="button"]:active,
.clickable:active {
  transform: scale(0.97);
  transition-duration: 0.1s;
}

/* Heartbeat animation for important elements */
@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  14% {
    transform: scale(1.1);
  }

  28% {
    transform: scale(1);
  }

  42% {
    transform: scale(1.1);
  }

  70% {
    transform: scale(1);
  }
}

/* Use for important alerts, new notifications or attention needed items */
.heartbeat {
  animation: heartbeat 2s ease-in-out infinite both;
}

/* Subtle background shimmer effect for premium elements */
.premium-feature {
  position: relative;
  overflow: hidden;
}

.premium-feature::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.03) 25%,
      rgba(255, 255, 255, 0.05) 50%,
      rgba(255, 255, 255, 0.03) 75%,
      rgba(255, 255, 255, 0) 100%);
  transform: rotate(30deg);
  animation: shimmer 8s infinite linear;
}

@keyframes shimmer {
  0% {
    transform: rotate(30deg) translate(-30%, -30%);
  }

  100% {
    transform: rotate(30deg) translate(30%, 30%);
  }
}

/* Add this to improve dark mode experience */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Print styles for reports and exports */
@media print {

  .app-container,
  .dashboard,
  .card {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  .navigation,
  .btn,
  .actions,
  .form-actions,
  #logDisplay {
    display: none !important;
  }

  .dashboard-content {
    gap: 15px !important;
  }

  .card {
    break-inside: avoid;
    margin-bottom: 15px !important;
    border: 1px solid #eee !important;
  }
}

/* Scroll reveal animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--transition-ease), transform 0.6s var(--transition-ease);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced form validation visual feedback */
input:valid {
  border-color: rgba(10, 219, 141, 0.3);
}

input:invalid:not(:placeholder-shown) {
  border-color: rgba(244, 91, 105, 0.3);
}

input:invalid:not(:placeholder-shown):focus {
  box-shadow: 0 0 0 3px rgba(244, 91, 105, 0.2);
}

/* Custom selection styling */
::selection {
  background-color: rgba(99, 102, 241, 0.3);
  color: var(--text-color);
}

/* Enhanced disabled state */
.btn:disabled,
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(30%);
  box-shadow: none !important;
  transform: none !important;
}

/* Add these specific psychological enhancements */

/* Trust indicators */
.verified-badge {
  background: rgba(10, 219, 141, 0.1);
  color: var(--success-color);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.verified-badge i {
  font-size: 12px;
}

/* Encourage action with subtle animation */
.cta-primary {
  animation: subtle-bounce 5s ease-in-out infinite;
}

@keyframes subtle-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  85% {
    transform: translateY(0);
  }

  90% {
    transform: translateY(-5px);
  }

  95% {
    transform: translateY(-3px);
  }
}

/* Success states that feel rewarding */
.success-animation {
  animation: success-pulse 1.5s ease-out;
}

@keyframes success-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(10, 219, 141, 0.5);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(10, 219, 141, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(10, 219, 141, 0);
  }
}

/* Add microtransactions to create a more responsive feel */
.micro-transition {
  transition-duration: 0.1s !important;
}

/* Visual hierarchy enhancement */
.primary-item {
  z-index: 3;
  position: relative;
}

.secondary-item {
  z-index: 2;
  position: relative;
}

.tertiary-item {
  z-index: 1;
  position: relative;
}

/* Emphasize important data */
.emphasize {
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Create sense of urgency */
.limited-time {
  position: relative;
  overflow: hidden;
}

.limited-time::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--warning-color);
  animation: countdown 30s linear forwards;
}

@keyframes countdown {
  from {
    height: 100%;
  }

  to {
    height: 0%;
  }
}

/* Value perception */
.premium-label {
  background: linear-gradient(to right, #FFD700, #FFA500);
  color: #000;
  padding: 4px 10px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
}

/* Add emotional design touches */
.info-card {
  border-left: 4px solid var(--primary-color);
}

.warning-card {
  border-left: 4px solid var(--warning-color);
}

.danger-card {
  border-left: 4px solid var(--danger-color);
}

.success-card {
  border-left: 4px solid var(--success-color);
}

/* Social proof enhancement */
.social-proof {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 13px;
}

.social-proof i {
  color: var(--primary-color);
  font-size: 14px;
}

/* Interactive statistic counters */
.counter-animation {
  transition: color 0.3s ease;
  position: relative;
}

.counter-animation::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.counter-animation:hover {
  color: var(--tertiary-color);
}

.counter-animation:hover::after {
  transform: scaleX(1);
}

/* Add 3D depth effects to buttons on hover */
.btn:hover {
  transform: translateY(-5px) translateZ(10px);
}

/* Enhanced focus for improved user guidance */
.highlight-focus {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

.highlight-focus:focus,
.highlight-focus.active {
  box-shadow:
    0 0 0 3px var(--primary-color),
    0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px) scale(1.02);
}

/* Chart tooltip enhancements */
.chart-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius-sm) !important;
  padding: 12px !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
  transform: translateY(0) !important;
}

.chart-tooltip:hover {
  transform: translateY(-2px) !important;
}

/* Enhanced typography with dynamic scaling */
@media (min-width: 768px) {
  h1 {
    font-size: calc(1.5rem + 0.5vw);
  }

  h2 {
    font-size: calc(1.3rem + 0.3vw);
  }

  .balance-info #balanceAmount {
    font-size: calc(1.6rem + 0.4vw);
  }
}

/* Dark mode optimized shadows */
.optimized-shadow {
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.12),
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Conditional visual feedback */
.conditionally-negative {
  transition: all 0.3s ease;
}

.conditionally-negative.negative {
  color: var(--danger-color);
  background: rgba(244, 91, 105, 0.1);
}

.conditionally-positive {
  transition: all 0.3s ease;
}

.conditionally-positive.positive {
  color: var(--success-color);
  background: rgba(10, 219, 141, 0.1);
}

/* Data visualization enhancements */
.data-point {
  position: relative;
  cursor: pointer;
  z-index: 1;
}

.data-point::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 24px;
  height: 24px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: all 0.3s ease;
}

.data-point:hover::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Global theme transition */
body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

/* Improved accessibility focus states */
:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Enhanced mobile experience */
@media (max-width: 480px) {

  .card,
  .auth-container {
    padding: 20px;
  }

  .form-grid {
    gap: 18px;
  }

  .navigation button {
    padding: 10px 14px;
    font-size: 13px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  .dashboard-header {
    margin-bottom: 25px;
  }
}

/* Psychological reassurance styles */
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.5);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.security-badge i {
  color: var(--success-color);
}

/* Card hover lift effect - psychological impact of dimensionality */
.card-lift {
  transition: all 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-10px);
  box-shadow:
    0 20px 30px rgba(0, 0, 0, 0.2),
    0 0 0 1px var(--highlight-border);
}

/* Make important numbers more visually prominent */
.stat-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Improved color contrast for accessibility */
.high-contrast-text {
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Add subtle texture to backgrounds for visual interest */
.textured-bg {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232d3748' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-position: center center;
}

/* Emphasize new features */
.new-feature {
  position: relative;
}

.new-feature::after {
  content: 'NEW';
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-color);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 10px;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
}

/* Navigation hover effects */
.navigation:hover {
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.2),
    0 0 0 1px var(--highlight-border),
    0 0 20px rgba(0, 30, 60, 0.15);
  transform: translateY(-3px);
}

.navigation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.07) 0%, transparent 35%),
    radial-gradient(circle at 90% 80%, rgba(0, 201, 255, 0.07) 0%, transparent 35%);
  z-index: 0;
  transition: opacity 0.3s ease;
}

.navigation:hover::before {
  opacity: 1.5;
}

.navigation::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary-color), var(--tertiary-color), transparent 90%);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.navigation:hover::after {
  opacity: 1;
}

.navigation button {
  position: relative;
  padding: 13px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) var(--transition-ease);
  z-index: 1;
}

.navigation button i {
  margin-right: 10px;
  font-size: 16px;
  transition: transform 0.3s var(--transition-ease);
}

.navigation button:hover i {
  transform: translateY(-3px);
}

.navigation .btn-secondary {
  background: rgba(30, 41, 59, 0.5);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(4px);
}

.navigation .btn-secondary:hover {
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 15px rgba(0, 30, 60, 0.15);
}

.navigation .btn-warning:hover,
.navigation .btn-danger:hover {
  transform: translateY(-5px);
}

/* Decorative floating elements with enhanced animations */
.dashboard::before {
  content: '';
  position: fixed;
  top: 15%;
  left: 7%;
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 35px 10px var(--primary-color);
  opacity: 0.5;
  animation: float1 12s infinite ease-in-out;
  z-index: -1;
}

@keyframes float1 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }

  50% {
    transform: translate(25px, 25px) scale(1.1);
    opacity: 0.6;
  }

  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
}

.dashboard::after {
  content: '';
  position: fixed;
  bottom: 20%;
  right: 10%;
  width: 14px;
  height: 14px;
  background: var(--tertiary-color);
  border-radius: 50%;
  box-shadow: 0 0 45px 12px var(--tertiary-color);
  opacity: 0.4;
  animation: float2 15s infinite ease-in-out;
  z-index: -1;
}

@keyframes float2 {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }

  50% {
    transform: translate(-35px, -25px) scale(1.15);
    opacity: 0.5;
  }

  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
}

/* Improved animation effects */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    backdrop-filter: blur(0px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    backdrop-filter: blur(10px);
  }
}

/* Additional global glows - DISABLED for performance */
.app-container::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 80vw;
  height: 80vh;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
  z-index: -2;
  pointer-events: none;
  /* animation: slowPulse 20s infinite alternate ease-in-out; */
}

@keyframes slowPulse {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }

  100% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* RESPONSIVE DESIGN with improved transitions */
@media (max-width: 768px) {
  .dashboard {
    padding: 90px 15px 15px 15px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-logo {
    margin-bottom: 18px;
  }

  .balance-card {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .generator-controls {
    flex-direction: column;
    align-items: stretch;
  }

  #generator-status-container {
    width: 100%;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
  }

  .navigation {
    flex-wrap: wrap;
    justify-content: center;
  }

  .navigation button {
    flex: 1 1 auto;
    min-width: 160px;
  }
}

/* Enhanced notification system */
#notification-container {
  position: fixed;
  top: 25px;
  right: 25px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 350px;
}

.notification {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius-sm);
  padding: 18px 22px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.25),
    0 0 0 1px var(--border-color);
  color: var(--text-color);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  animation: notificationFadeIn 0.4s var(--transition-ease);
  border-left: 5px solid var(--primary-color);
  transform: translateX(0);
  transition: transform 0.3s var(--transition-ease);
}

.notification:hover {
  transform: translateX(-5px);
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.3),
    0 0 0 1px var(--highlight-border);
}

.notification.success {
  border-left-color: var(--success-color);
}

.notification.error {
  border-left-color: var(--danger-color);
}

.notification.warning {
  border-left-color: var(--warning-color);
}

.notification-icon {
  font-size: 20px;
  color: var(--primary-color);
}

.notification.success .notification-icon {
  color: var(--success-color);
}

.notification.error .notification-icon {
  color: var(--danger-color);
}

.notification.warning .notification-icon {
  color: var(--warning-color);
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-weight: 600;
  margin-bottom: 7px;
  font-size: 16px;
}

.notification-message {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.notification-close {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s var(--transition-ease);
  height: 24px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.notification-close:hover {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.1);
}

@keyframes notificationFadeIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notificationFadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(40px);
  }
}

/* Enhanced warning/danger/success buttons */
.btn-warning {
  background: linear-gradient(to right, var(--warning-color), #ffa53e);
  color: #212b40;
  font-weight: 600;
  box-shadow:
    0 5px 12px rgba(255, 190, 11, 0.25),
    0 0 0 1px rgba(255, 190, 11, 0.1);
}

.btn-warning:hover {
  background: linear-gradient(to right, #ffb529, #ff9a3e);
  transform: translateY(-5px);
  box-shadow:
    0 10px 20px rgba(255, 190, 11, 0.3),
    0 0 0 1px rgba(255, 190, 11, 0.2),
    0 0 15px rgba(255, 190, 11, 0.15);
}

.btn-danger {
  background: linear-gradient(to right, var(--danger-color), #ff6b81);
  color: white;
  box-shadow:
    0 5px 12px rgba(244, 91, 105, 0.25),
    0 0 0 1px rgba(244, 91, 105, 0.1);
}

.btn-danger:hover {
  background: linear-gradient(to right, #f23747, #ff5e75);
  transform: translateY(-5px);
  box-shadow:
    0 10px 20px rgba(244, 91, 105, 0.3),
    0 0 0 1px rgba(244, 91, 105, 0.2),
    0 0 15px rgba(244, 91, 105, 0.15);
}

.btn-success {
  background: linear-gradient(to right, var(--success-color), #14f5b2);
  color: #081c12;
  font-weight: 600;
  box-shadow:
    0 5px 12px rgba(10, 219, 141, 0.25),
    0 0 0 1px rgba(10, 219, 141, 0.1);
}

.btn-success:hover {
  background: linear-gradient(to right, #09c680, #10e7a6);
  transform: translateY(-5px);
  box-shadow:
    0 10px 20px rgba(10, 219, 141, 0.3),
    0 0 0 1px rgba(10, 219, 141, 0.2),
    0 0 15px rgba(10, 219, 141, 0.15);
}

.btn-info {
  background: linear-gradient(to right, var(--secondary-color), #42a5f5);
  color: #ffffff;
  font-weight: 600;
  box-shadow:
    0 5px 12px rgba(30, 136, 229, 0.25),
    0 0 0 1px rgba(30, 136, 229, 0.1);
}

.btn-info:hover {
  background: linear-gradient(to right, #1976d2, #42a5f5);
  transform: translateY(-5px);
  box-shadow:
    0 10px 20px rgba(30, 136, 229, 0.3),
    0 0 0 1px rgba(30, 136, 229, 0.2),
    0 0 15px rgba(30, 136, 229, 0.15);
}

/* Enhanced generator status with animations */
.generator-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
}

#generator-status-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  transition: all 0.3s var(--transition-ease);
  position: relative;
  overflow: hidden;
}

#generator-status-container:hover {
  background: rgba(15, 23, 42, 0.8);
  transform: translateY(-3px);
  border-color: var(--highlight-border);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

#generator-status-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

#generator-status-container:hover::before {
  opacity: 1;
}

.status-icon i {
  font-size: 22px;
  color: var(--text-muted);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

#generator-status-container:hover .status-icon i {
  color: var(--primary-color);
  transform: rotate(15deg);
}

.status-text {
  font-size: 15px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

#generator-status.text-success {
  color: var(--success-color);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(10, 219, 141, 0.4);
}

#generator-status.text-danger {
  color: var(--danger-color);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(244, 91, 105, 0.4);
}

/* Enhanced alert box */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--border-radius-sm);
  border-left: 5px solid var(--warning-color);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s var(--transition-ease);
  position: relative;
  overflow: hidden;
}

.alert:hover {
  background: rgba(15, 23, 42, 0.7);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.alert::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5px;
  /* Width of the border */
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 15% 15%, rgba(255, 190, 11, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.alert:hover::before {
  opacity: 1;
}

.alert i {
  color: var(--warning-color);
  font-size: 20px;
  margin-top: 2px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.alert:hover i {
  transform: scale(1.1);
}

.alert span {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* ENHANCED BOTS LIST */
#botsList {
  overflow: auto;
  transition: all 0.3s var(--transition-ease);
  min-height: 320px;
}

.placeholder-message {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
  transition: all 0.3s var(--transition-ease);
}

.placeholder-message:hover {
  transform: translateY(-5px);
}

.placeholder-message i {
  font-size: 68px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.05);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: all 0.5s var(--transition-ease);
}

.placeholder-message:hover i {
  color: rgba(255, 255, 255, 0.08);
  filter: drop-shadow(0 5px 12px rgba(99, 102, 241, 0.15));
  transform: scale(1.05) rotate(5deg);
}

.placeholder-message p {
  font-size: 16px;
  max-width: 350px;
  margin: 0 auto;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.placeholder-message:hover p {
  color: var(--text-secondary);
}

/* ENHANCED LOG DISPLAY */
.log-container {
  max-height: 320px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  font-size: 13px;
  color: var(--text-muted);
  padding: 22px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: var(--border-radius-sm);
  white-space: pre-wrap;
  line-height: 1.7;
  border: 1px solid rgba(30, 41, 59, 0.2);
  transition: all 0.3s var(--transition-ease);
}

.log-container:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow:
    inset 0 0 15px rgba(0, 0, 0, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ENHANCED MODAL STYLING */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(7, 10, 24, 0.85);
  backdrop-filter: blur(6px);
  transition: backdrop-filter 0.4s var(--transition-ease);
}

.modal-content {
  background: var(--card-bg);
  margin: 5% auto;
  width: 90%;
  max-width: 750px;
  border-radius: var(--border-radius-lg);
  box-shadow:
    0 25px 50px var(--shadow-color),
    0 0 0 1px var(--border-color),
    0 0 25px rgba(99, 102, 241, 0.2);
  overflow: hidden;
  animation: modalFadeIn 0.4s var(--transition-ease);
  position: relative;
  transform: translateY(0);
  transition: transform 0.3s var(--transition-ease), box-shadow 0.3s var(--transition-ease);
}

.modal-content:hover {
  transform: translateY(-5px);
  box-shadow:
    0 30px 60px var(--shadow-color),
    0 0 0 1px var(--highlight-border),
    0 0 30px rgba(99, 102, 241, 0.25);
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 90% 90%, rgba(0, 201, 255, 0.06) 0%, transparent 35%);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 0.3s var(--transition-ease);
}

.modal-content:hover::before {
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 30px;
  background: var(--card-header-bg);
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, var(--primary-color), transparent);
  transition: opacity 0.3s ease;
}

.modal-content:hover .modal-header::after {
  opacity: 1;
  background: linear-gradient(to right, var(--accent-color), transparent);
}

.modal-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
}

.modal-header h2 i {
  margin-right: 16px;
  color: var(--primary-color);
  font-size: 22px;
  transition: transform 0.3s var(--transition-ease), color 0.3s var(--transition-ease);
}

.modal-content:hover .modal-header h2 i {
  transform: translateY(-2px) rotate(5deg);
  color: var(--accent-color);
}

.close-button {
  color: var(--text-muted);
  font-size: 28px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--transition-ease);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
}

.close-button:hover {
  color: var(--danger-color);
  background: rgba(244, 91, 105, 0.15);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
  max-height: 70vh;
  overflow-y: auto;
}

/* ENHANCED POSITION CARDS */
.position-card {
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--border-radius);
  padding: 26px;
  margin-bottom: 22px;
  border-left: 5px solid var(--primary-color);
  transition: all 0.3s var(--transition-ease);
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--border-color);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

.position-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.15),
    0 0 0 1px var(--highlight-border);
  background: rgba(15, 23, 42, 0.7);
}

.position-card.LONG {
  border-left-color: var(--success-color);
}

.position-card.SHORT {
  border-left-color: var(--danger-color);
}

.position-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 5px;
  /* Width of the border */
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--transition-ease);
}

.position-card.LONG::before {
  background: radial-gradient(circle at 15% 15%, rgba(10, 219, 141, 0.05) 0%, transparent 50%);
}

.position-card.SHORT::before {
  background: radial-gradient(circle at 15% 15%, rgba(244, 91, 105, 0.05) 0%, transparent 50%);
}

.position-card:hover::before {
  opacity: 1;
}

.position-info {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 22px;
}

.position-info-item {
  font-size: 15px;
  transition: transform 0.3s var(--transition-ease);
}

.position-card:hover .position-info-item {
  transform: translateY(-2px);
}

.position-info-item span {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.position-pnl {
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  display: inline-block;
  font-size: 15px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
  transition: all 0.3s var(--transition-ease);
}

.position-card:hover .position-pnl {
  transform: scale(1.05);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

/* Enhanced subscription alert */
.subscription-alert {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 18px to right, var(--warning-color), #ffa53e;
  color: #212b40;
}

.deleteBotButton:hover {
  background: linear-gradient(to right, #ffb529, #ff9a3e);
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 8px 15px rgba(255, 190, 11, 0.3),
    0 0 0 1px rgba(255, 190, 11, 0.1),
    0 0 12px rgba(255, 190, 11, 0.15);
}

.deleteBotButton:active {
  transform: translateY(-2px) scale(1.01);
}

.openPositionsButton {
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
}

.backdrop-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 10% 20%, rgba(0, 0, 0, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(246, 247, 248, 0.06) 0%, transparent 50%),
    var(--darker-bg);
  background-size: cover;
  opacity: 1;
  z-index: -1;
}

/* Enhanced grid pattern overlay */
.app-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-color) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
}

/* Enhanced glow effects - DISABLED for performance */
.app-container::after {
  content: '';
  position: fixed;
  top: 20%;
  right: -5%;
  width: 55vw;
  height: 55vh;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  /* animation: pulseGlow 10s infinite alternate ease-in-out; */
}

@keyframes pulseGlow {
  0% {
    opacity: 0.4;
    transform: scale(1);
  }

  100% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* AUTH CONTAINERS - More polished */
.auth-container {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  width: 90%;
  max-width: 450px;
  box-shadow:
    0 15px 35px var(--shadow-color),
    0 0 0 1px var(--border-color),
    0 0 20px var(--glow-color);
  transition: all var(--transition-speed) var(--transition-ease);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

.auth-container:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 40px var(--shadow-color),
    0 0 0 1px var(--highlight-border),
    0 0 30px var(--glow-color);
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary-color), var(--tertiary-color));
  opacity: 0.9;
}

.auth-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, var(--glow-color), transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 38px;
}

.auth-logo i {
  font-size: 58px;
  background: linear-gradient(to right, var(--primary-color), var(--tertiary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.5));
  transform: translateY(0);
  transition: transform 0.5s var(--transition-ease);
}

.auth-container:hover .auth-logo i {
  transform: translateY(-3px);
}

.auth-logo span {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: 0.5px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

/* DASHBOARD - Crystal Liquid Aligned */
.dashboard {
  width: 100%;
  max-width: 1300px;
  min-height: 100vh;
  padding: 100px 20px 20px 20px;
  display: flex;
  flex-direction: column;
  margin: 0 auto !important;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  align-self: center;
  left: 0;
  right: 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 38px;
  flex-wrap: wrap;
  gap: 25px;
  position: relative;
}

.dashboard-logo {
  display: flex;
  align-items: center;
}

.dashboard-logo i {
  font-size: 40px;
  background: linear-gradient(to right, var(--primary-color), var(--tertiary-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-right: 16px;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.5));
}

.dashboard-logo h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
  position: relative;
}

.dashboard-logo h1::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(to right, var(--primary-color), var(--tertiary-color));
  border-radius: 3px;
  transition: width 0.3s var(--transition-ease);
}

.dashboard-logo:hover h1::after {
  width: 60px;
}

/* Crystal Liquid Balance Card */
.balance-card {
  background: var(--crystal-gradient);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius-lg);
  padding: 25px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow:
    var(--crystal-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-speed) var(--transition-ease);
}

.balance-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 25px 50px rgba(99, 102, 241, 0.3),
    0 10px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border-color: var(--highlight-border);
}

.balance-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  z-index: 0;
}

.balance-info {
  position: relative;
  z-index: 1;
}

.balance-info h2 {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.balance-info #balanceAmount {
  font-size: 32px;
  color: white;
  font-weight: 700;
  margin-top: 8px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.balance-icon {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s var(--transition-ease);
}

.balance-card:hover .balance-icon {
  transform: rotate(15deg);
  background: rgba(255, 255, 255, 0.25);
}

.balance-icon i {
  font-size: 26px;
  color: white;
}

.dashboard-content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.content-section {
  width: 100%;
  animation: fadeIn 0.5s var(--transition-ease);
}

.section-header {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
}

.section-header h2 i {
  margin-right: 15px;
  color: var(--primary-color);
  font-size: 22px;
  transition: transform 0.3s var(--transition-ease);
}

.section-header:hover h2 i {
  transform: translateY(-2px);
  color: var(--accent-color);
}

.section-actions {
  display: flex;
  gap: 12px;
}

/* Crystal Glassmorphism Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow:
    var(--crystal-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 1px var(--border-color);
  position: relative;
  transition: all var(--transition-speed) var(--transition-ease);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transform: translateY(0);
}

/* Crystal Shimmer Effect on Cards */
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  transition: left 0.5s;
  z-index: 1;
}

.card:hover::before {
  left: 100%;
}

/* Liquid Hover Effect */
.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(99, 102, 241, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: var(--highlight-border);
}

.card:hover {
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.25),
    0 0 0 1px var(--highlight-border),
    0 0 20px rgba(0, 30, 60, 0.15);
  transform: translateY(-5px);
}

/* Enhanced card glow effect */
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--glow-color), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-speed) var(--transition-ease);
  pointer-events: none;
  z-index: -1;
}

.card:hover::before {
  opacity: 0.2;
}

/* Enhanced card top accent */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--tertiary-color), transparent 90%);
  opacity: 0.8;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  transition: opacity 0.3s var(--transition-ease);
}

.card:hover::after {
  opacity: 1;
}

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s var(--transition-ease);
}

.form-group:focus-within label {
  color: var(--accent-color);
}

.form-group label i {
  margin-right: 10px;
  font-size: 16px;
  width: 16px;
  text-align: center;
  color: var(--primary-color);
  transition: transform 0.3s var(--transition-ease), color 0.3s var(--transition-ease);
}

.form-group:focus-within label i {
  color: var(--accent-color);
  transform: translateY(-2px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.form-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
}

/* Enhanced input styles */
input {
  width: 100%;
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: rgba(15, 23, 42, 0.5);
  color: var(--text-color);
  font-size: 15px;
  transition: all var(--transition-speed) var(--transition-ease);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.1),
    0 0 0 3px rgba(99, 102, 241, 0.2);
  background-color: rgba(15, 23, 42, 0.7);
}

input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Crystal Liquid Buttons */
.btn {
  padding: 14px 24px;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) var(--transition-ease);
  position: relative;
  overflow: hidden;
  background: var(--crystal-gradient);
  color: white;
  box-shadow:
    var(--crystal-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Liquid Button Effect */
.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow:
    0 15px 30px rgba(99, 102, 241, 0.4),
    0 5px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn i {
  margin-right: 10px;
  transition: transform 0.3s var(--transition-ease);
}

.btn:hover i {
  transform: translateY(-2px);
}

/* Primary button with shimmer effect */
.btn-primary {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-25deg);
  transition: all 0.7s var(--transition-ease);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(-2px);
}

/* Secondary button with improved hover */
.btn-secondary {
  background: rgba(30, 41, 59, 0.5);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 0.7);
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 15px rgba(0, 30, 60, 0.15);
}

.btn-secondary:active {
  transform: translateY(-2px);
}

/* Enhanced success/danger indicators */
.pnl-positive {
  background-color: rgba(10, 219, 141, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(10, 219, 141, 0.2);
  border-radius: var(--border-radius-sm);
}

.pnl-negative {
  background-color: rgba(244, 91, 105, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(244, 91, 105, 0.2);
  border-radius: var(--border-radius-sm);
}

.position-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

/* Enhanced close position button */
.closePositionButton {
  background: linear-gradient(to right, var(--danger-color), #ff6b81);
  color: white;
  padding: 12px 20px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  border: none;
  display: flex;
  align-items: center;
  transition: all var(--transition-speed) var(--transition-ease);
  box-shadow:
    0 4px 10px rgba(244, 91, 105, 0.25),
    0 0 0 1px rgba(244, 91, 105, 0.1);
}

.closePositionButton:hover {
  background: linear-gradient(to right, #f23747, #ff5e75);
  transform: translateY(-5px);
  box-shadow:
    0 10px 20px rgba(244, 91, 105, 0.3),
    0 0 0 1px rgba(244, 91, 105, 0.2),
    0 0 15px rgba(244, 91, 105, 0.15);
}

.closePositionButton:active {
  transform: translateY(-2px);
}

.closePositionButton i {
  margin-right: 10px;
  transition: transform 0.3s var(--transition-ease);
}

.closePositionButton:hover i {
  transform: translateY(-2px);
}

/* Enhanced loading indicators */
.loading-positions {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.loading-positions i {
  font-size: 40px;
  margin-bottom: 20px;
  color: var(--primary-color);
  filter: drop-shadow(0 0 12px rgba(99, 102, 241, 0.4));
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
    transform: scale(0.95);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }

  100% {
    opacity: 0.5;
    transform: scale(0.95);
  }
}

.no-positions {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* Enhanced table styles */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

th,
td {
  padding: 18px 22px;
  text-align: left;
}

th {
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border-color);
}

td {
  border-bottom: 1px solid rgba(30, 41, 59, 0.15);
  color: var(--text-color);
  transition: background-color 0.2s var(--transition-ease);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr {
  background: rgba(15, 23, 42, 0.3);
  transition: all 0.25s var(--transition-ease);
}

tbody tr:hover {
  background: rgba(30, 41, 59, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Enhanced zebra striping */
tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.45);
}

tbody tr:nth-child(even):hover {
  background: rgba(30, 41, 59, 0.6);
}

/* BOT CONTROL BUTTONS with enhanced feedback */
.bot-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.startBotButton,
.stopBotButton,
.deleteBotButton,
.openPositionsButton {
  padding: 10px 16px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) var(--transition-ease);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border: none;
}

.startBotButton {
  background: linear-gradient(to right, var(--success-color), #14f5b2);
  color: #081c12;
}

.startBotButton:hover {
  background: linear-gradient(to right, #09c680, #10e7a6);
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 8px 15px rgba(10, 219, 141, 0.3),
    0 0 0 1px rgba(10, 219, 141, 0.1),
    0 0 12px rgba(10, 219, 141, 0.15);
}

.startBotButton:active {
  transform: translateY(-2px) scale(1.01);
}

.stopBotButton {
  background: linear-gradient(to right, var(--danger-color), #ff6b81);
  color: white;
}

.stopBotButton:hover {
  background: linear-gradient(to right, #f23747, #ff5e75);
  transform: translateY(-4px) scale(1.03);
  box-shadow:
    0 8px 15px rgba(244, 91, 105, 0.3),
    0 0 0 1px rgba(244, 91, 105, 0.1),
    0 0 12px rgba(244, 91, 105, 0.15);
}

.stopBotButton:active {
  transform: translateY(-2px) scale(1.01);
}




/* Add these styles to your existing style.css */

/* Trading mode toggle and badges */
.trading-mode-toggle {
  margin: 0 10px;
}

.trading-mode-badge {
  background: linear-gradient(to right, var(--primary-color), var(--accent-color));
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.strategy-badge {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(99, 102, 241, 0.3);
  transition: all 0.3s ease;
}

.strategy-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
}

.strategy-badge i {
  font-size: 12px;
}

.position-type.spot {
  background: linear-gradient(to right, #4CAF50, #45a049);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Bot card enhancements */
.bot-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 22px;
  margin-bottom: 18px;
  border-left: 4px solid var(--primary-color);
  box-shadow:
    0 5px 15px var(--shadow-color),
    0 0 0 1px var(--border-color);
  transition: all var(--transition-speed) var(--transition-ease);
  position: relative;
  overflow: hidden;
}

.bot-card .bot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bot-card .bot-header .bot-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.bot-card .bot-header .bot-controls .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 8px 12px;
  white-space: nowrap;
  border-radius: 10px;
}

.bot-card .bot-header .bot-controls .btn i {
  margin: 0;
  font-size: 14px;
}

/* Bot actions as a dedicated grid under header */
.bot-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 10px;
  margin: 10px 0 6px 0;
}

.bot-actions-grid .btn {
  width: 100%;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
}

@media (max-width: 520px) {
  .bot-actions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .bot-card .bot-header {
    align-items: flex-start;
    gap: 10px;
  }

  .bot-card .bot-header .bot-controls {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.bot-card .bot-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.bot-card .bot-meta .meta-item span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bot-card .bot-meta .meta-item strong {
  font-size: 14px;
  color: var(--text-color);
}

.bot-card .bot-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.bot-card .stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-secondary);
}

.bot-card .stat-pill i {
  color: var(--primary-color);
}

.bot-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 10px 25px var(--shadow-color),
    0 0 0 1px var(--highlight-border),
    0 0 20px var(--glow-color);
}

.bot-card[data-mode="spot"] {
  border-left-color: #4CAF50;
}

.bot-card[data-mode="spot"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 10%, rgba(76, 175, 80, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

/* Trading mode toggle button animation */
#toggleTradingMode {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

#toggleTradingMode::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease;
}

#toggleTradingMode:hover::before {
  transform: translate(-50%, -50%) scale(2);
}

/* Status indicators */
.status-active {
  color: var(--success-color);
  font-weight: 600;
}

.status-inactive {
  color: var(--text-muted);
  font-weight: 500;
}

/* Hide leverage field animation */
#leverageGroup {
  transition: all 0.3s ease;
  transform-origin: top;
}

#leverageGroup.hidden {
  opacity: 0;
  transform: scaleY(0);
  height: 0;
  margin: 0;
  padding: 0;
  visibility: hidden;
}

/* Position card spot indicator */
.position-card.spot {
  border-left-color: #4CAF50;
}

.position-card.spot::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  background: #4CAF50;
  color: white;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-bottom-left-radius: 8px;
  text-transform: uppercase;
  content: 'SPOT';
}

/* Mobile responsiveness for trading mode toggle */
@media (max-width: 768px) {
  .navigation {
    flex-direction: column;
    gap: 10px;
  }

  .trading-mode-toggle {
    width: 100%;
    margin: 10px 0;
  }

  #toggleTradingMode {
    width: 100%;
  }

  .trading-mode-badge {
    display: block;
    text-align: center;
    margin: 10px 0 0 0;
  }
}

/* Password visibility toggle button */
.toggle-password-visibility {
  position: absolute;
  right: 16px;
  top: 44px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  z-index: 2;
  padding: 0;
  transition: color 0.2s;
}

.toggle-password-visibility:hover,
.toggle-password-visibility:focus {
  color: var(--accent-color);
}

/* Notification Toasts */
#notification-container {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 350px;
}

.notification {
  background: rgba(15, 23, 42, 0.97);
  color: var(--text-color);
  border-radius: var(--border-radius-sm);
  padding: 16px 22px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.18), 0 0 0 1px var(--border-color);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  border-left: 5px solid var(--primary-color);
  opacity: 0.98;
  animation: notificationFadeIn 0.4s var(--transition-ease);
}

.notification.success {
  border-left-color: var(--success-color);
}

.notification.error {
  border-left-color: var(--danger-color);
}

@keyframes notificationFadeIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Improved alert styling for login page */
.alert {
  background: rgba(244, 91, 105, 0.08);
  color: var(--danger-color);
  border-radius: var(--border-radius-sm);
  padding: 12px 18px;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 500;
  border-left: 4px solid var(--danger-color);
  box-shadow: 0 2px 8px rgba(244, 91, 105, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: rgba(10, 219, 141, 0.08);
  color: var(--success-color);
  border-left-color: var(--success-color);
}

/* Auth logo and container polish for login page */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 38px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.5));
}

.auth-logo i {
  font-size: 64px;
  margin-bottom: 12px;
  color: var(--primary-color);
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-logo span {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-color);
  background: none;
}

.auth-container {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 15px 35px var(--shadow-color), 0 0 0 1px var(--border-color), 0 0 20px var(--glow-color);
  transition: all var(--transition-speed) var(--transition-ease);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  margin: 0 auto;
}

.auth-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow-color), 0 0 0 1px var(--highlight-border), 0 0 30px var(--glow-color);
}

/* Subtle hover/focus for buttons and inputs */
.btn,
button,
input {
  transition: all 0.2s var(--transition-ease);
}

.btn:focus,
button:focus,
input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-color);
}

.btn:hover,
button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px) scale(1.01);
}

input:hover {
  background: rgba(15, 23, 42, 0.7);
}

/* Responsive adjustments for mobile */
@media (max-width: 600px) {
  .auth-container {
    padding: 18px;
    max-width: 98vw;
  }

  .auth-logo span {
    font-size: 22px;
  }

  .auth-logo i {
    font-size: 40px;
  }
}

/* User avatar and dropdown menu */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

#userAvatarBtn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
  transition: box-shadow 0.2s, filter 0.2s;
}

#userAvatarBtn:hover,
#userAvatarBtn:focus {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.18);
}

#userInitials {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#userDropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 48px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.18), 0 2px 8px rgba(0, 0, 0, 0.25);
  min-width: 180px;
  min-height: 80px;
  z-index: 3000;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#userDropdown button {
  width: 100%;
  border-radius: 0;
  background: none;
  color: #fff;
  border: none;
  text-align: left;
  padding: 16px 22px;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  letter-spacing: 0.5px;
}

#userDropdown button:hover,
#userDropdown button:focus {
  background: var(--accent-color);
  color: #fff;
}

#userDropdown .btn-danger {
  color: var(--danger-color);
}

#userDropdown .btn-danger:hover {
  background: var(--danger-color);
  color: #fff;
}

/* Dashboard logo polish */
.dashboard-logo {
  display: flex;
  align-items: center;
  gap: 18px;
  background: none;
}

.dashboard-logo i {
  font-size: 32px;
  background: var(--crystal-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
  animation: crystalShimmer var(--crystal-shimmer) ease-in-out infinite;
}

.dashboard-logo span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-color);
}

/* Navigation polish */
.navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 22px;
  background: none;
  border-radius: var(--border-radius-lg);
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.navigation button,
.navigation .btn {
  transition: all 0.2s var(--transition-ease);
}

.navigation button:hover,
.navigation .btn:hover,
.navigation button:focus,
.navigation .btn:focus {
  filter: brightness(1.08);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.10);
}

/* Responsive adjustments for navigation and user menu */
@media (max-width: 700px) {
  .navigation {
    flex-direction: column;
    gap: 10px;
    padding: 10px 6px;
  }

  .dashboard-logo span {
    font-size: 16px;
  }

  #userAvatarBtn {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }

  #userDropdown {
    min-width: 120px;
    top: 38px;
  }
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

/* Crystal Stat Cards */
.stat-card {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--border-radius);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow:
    var(--crystal-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  transition: all var(--transition-speed) var(--transition-ease);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(99, 102, 241, 0.2),
    0 8px 16px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: var(--highlight-border);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-content {
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.stat-value.profit {
  color: var(--success-color);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--transition-ease);
  position: relative;
  z-index: 1;
}

.stat-card:hover .stat-icon {
  background: rgba(99, 102, 241, 0.15);
  transform: scale(1.1);
}

.stat-icon i {
  font-size: 22px;
  color: var(--primary-color);
  transition: all 0.3s var(--transition-ease);
}

.stat-card:hover .stat-icon i {
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* Performance Card */
.performance-card {
  padding: 0;
  overflow: hidden;
}

#chart-container {
  background: linear-gradient(180deg, rgba(16, 32, 56, 0.8) 0%, rgba(9, 19, 35, 0.8) 100%);
  padding: 20px;
  height: 300px;
  position: relative;
}

#performance-chart {
  height: 100%;
  width: 100%;
}

.performance-stats {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  gap: 20px;
}

.performance-stat {
  flex: 1;
  text-align: center;
}

.performance-stat .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.performance-stat .stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}

.performance-stat .stat-value.profit {
  color: var(--success-color);
}

.export-btn {
  width: 100%;
  margin: 0 20px 20px 20px;
}

/* Enhanced Section Actions */
.section-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.section-actions .text-muted {
  font-size: 14px;
  margin-right: 10px;
}

/* Enhanced Form Actions */
.form-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Enhanced Button States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn:disabled:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Loading Spinner Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.fa-spin {
  animation: spin 1s linear infinite;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }

  .stat-card {
    padding: 18px;
  }

  .stat-value {
    font-size: 24px;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
  }

  .stat-icon i {
    font-size: 18px;
  }

  .performance-stats {
    flex-direction: column;
    gap: 15px;
  }

  .performance-stat {
    text-align: left;
  }

  .section-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section-actions .text-muted {
    margin-right: 0;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 12px;
  }

  #chart-container {
    height: 250px;
    padding: 15px;
  }

  .performance-stats {
    padding: 15px;
  }

  .performance-stat .stat-value {
    font-size: 18px;
  }
}

/* Enhanced Focus States for Accessibility */
.stat-card:focus-within {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.performance-card:focus-within {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Smooth Transitions for All Interactive Elements */
.stat-card,
.performance-card,
.btn,
.form-group input,
.section-actions button {
  transition: all var(--transition-speed) var(--transition-ease);
}

/* Enhanced Hover Effects */
.stat-card:hover .stat-content {
  transform: translateX(5px);
}

.performance-stat:hover .stat-value {
  color: var(--accent-color);
}

/* Loading State Styles */
.loading-state {
  opacity: 0.7;
  pointer-events: none;
}

.loading-state::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-color);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Enhanced Card Shadows */
.stat-card,
.performance-card {
  box-shadow:
    0 5px 15px rgba(0, 0, 0, 0.1),
    0 0 0 1px var(--border-color);
}

.stat-card:hover,
.performance-card:hover {
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.15),
    0 0 0 1px var(--highlight-border);
}

/* Navigation Controls */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Desktop: Make navigation more compact */
@media (min-width: 769px) {
  .nav-controls {
    gap: 8px;
  }

  .nav-controls .btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .navigation {
    padding: 15px 20px;
    margin-bottom: 15px;
  }
}

/* Dashboard Logo */
.dashboard-logo {
  display: flex;
  align-items: center;
  gap: 18px;
}

.dashboard-logo i {
  font-size: 32px;
  background: var(--crystal-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 15px rgba(99, 102, 241, 0.4));
  animation: crystalShimmer var(--crystal-shimmer) ease-in-out infinite;
}

.dashboard-logo span {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-color);
}

/* Balance Card - Crystal Liquid Aligned */
#balanceDisplay {
  margin: 20px 0 30px 0;
  max-width: 400px;
  width: 100%;
  align-self: flex-start;
}

/* Desktop: Compact and left-aligned */
@media (min-width: 769px) {
  #balanceDisplay {
    max-width: 280px;
    margin: 18px 0;
    padding: 16px 20px;
  }

  #balanceDisplay .balance-info h2 {
    font-size: 12px;
  }

  #balanceDisplay .balance-info #balanceAmount {
    font-size: 24px;
  }

  #balanceDisplay .balance-icon {
    width: 42px;
    height: 42px;
  }

  #balanceDisplay .balance-icon i {
    font-size: 19px;
  }
}

/* Mobile: Full width with proper spacing */
@media (max-width: 768px) {
  #balanceDisplay {
    max-width: 100%;
    margin: 15px 0;
  }
}

/* User Menu */
.user-menu {
  position: relative;
  display: flex;
  align-items: center;
}

#userAvatarBtn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
  transition: box-shadow 0.2s, filter 0.2s;
}

#userAvatarBtn:hover,
#userAvatarBtn:focus {
  filter: brightness(1.08);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.18);
}

#userInitials {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#userDropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 48px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(8px);
  border-radius: var(--border-radius-sm);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.18), 0 2px 8px rgba(0, 0, 0, 0.25);
  min-width: 180px;
  min-height: 80px;
  z-index: 3000;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#userDropdown button {
  width: 100%;
  border-radius: 0;
  background: none;
  color: #fff;
  border: none;
  text-align: left;
  padding: 16px 22px;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
  letter-spacing: 0.5px;
}

#userDropdown button:hover,
#userDropdown button:focus {
  background: var(--accent-color);
  color: #fff;
}

#userDropdown .btn-danger {
  color: var(--danger-color);
}

#userDropdown .btn-danger:hover {
  background: var(--danger-color);
  color: #fff;
}

/* Trading Mode Toggle */
.trading-mode-toggle {
  margin: 0 10px;
}

#toggleTradingMode {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

#toggleTradingMode::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.5s ease;
}

#toggleTradingMode:hover::before {
  transform: translate(-50%, -50%) scale(2);
}

/* Enhanced Mobile Responsiveness for Navigation */
@media (max-width: 1024px) {
  .nav-controls {
    gap: 8px;
  }

  .navigation .balance-card {
    min-width: 180px;
    padding: 12px 16px;
  }

  .navigation .balance-info #balanceAmount {
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .navigation {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .nav-controls {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .navigation .balance-card {
    width: 100%;
    max-width: none;
    min-width: auto;
  }

  .dashboard-logo span {
    font-size: 18px;
  }

  .dashboard-logo i {
    font-size: 28px;
  }

  .trading-mode-toggle {
    width: 100%;
    margin: 0;
  }

  #toggleTradingMode {
    width: 100%;
  }

  .user-menu {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .navigation {
    padding: 10px;
  }

  .nav-controls {
    gap: 8px;
  }

  .navigation .balance-card {
    padding: 10px 15px;
  }

  .navigation .balance-info h2 {
    font-size: 11px;
  }

  .navigation .balance-info #balanceAmount {
    font-size: 16px;
  }

  .dashboard-logo {
    gap: 12px;
  }

  .dashboard-logo span {
    font-size: 16px;
  }

  .dashboard-logo i {
    font-size: 24px;
  }
}

/* Mobile Menubar (Bottom Navigation) - REMOVED */
/* This was the old bottom navigation, now replaced with top menubar */

/* Mobile Menu Button (Hamburger) */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  padding: 8px;
  border-radius: var(--border-radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
}

.mobile-menu-btn:hover,
.mobile-menu-btn:focus {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-color);
}

/* Mobile Menubar (Top Navigation) */
.mobile-menubar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow-y: auto;
}

.mobile-menubar.active {
  opacity: 1;
  visibility: visible;
  display: block;
}

.menubar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 20px;
  background: rgba(30, 58, 138, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.menubar-header span {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}

.close-menu-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 20px;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  cursor: pointer;
}

.close-menu-btn:hover,
.close-menu-btn:focus {
  background: rgba(244, 91, 105, 0.1);
  color: var(--danger-color);
}

.menubar-content {
  padding: 25px 20px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  backdrop-filter: blur(8px);
}

.menubar-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: all 0.3s ease;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.menubar-item:hover,
.menubar-item:focus {
  background: rgba(99, 102, 241, 0.3);
  color: #fff;
  border-color: var(--accent-color);
  transform: translateX(8px);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.menubar-item i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.menubar-item span {
  font-size: 16px;
  font-weight: 500;
}

/* Body class for menu open state */
body.menu-open {
  /* Allow scrolling even when menu is open */
  overflow-y: scroll !important;
  overflow-x: hidden;
}

/* Show mobile menu button only on mobile */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-controls {
    display: none;
  }

  .navigation {
    justify-content: space-between;
  }

  /* Ensure balance is visible on mobile */
  #balanceDisplay {
    display: block !important;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none !important;
  }

  .nav-controls {
    display: flex !important;
  }

  .mobile-menubar {
    display: none !important;
  }
}

/* Optimistic UI Styles for Fast Bot Operations */
.bot-card.creating {
  opacity: 0.8;
  border: 2px dashed var(--accent-color);
  animation: pulse-creating 2s infinite;
  transform: translateY(0);
  transition: all 0.3s ease;
}

@keyframes pulse-creating {
  0% {
    opacity: 0.8;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.8;
  }
}

.status-creating {
  color: var(--accent-color);
  font-weight: 600;
  animation: pulse-text 1.5s infinite;
}

@keyframes pulse-text {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.7;
  }
}

/* Instant UI update animations */
.bot-card {
  transition: all 0.2s ease;
}

.bot-card .bot-controls button {
  transition: all 0.2s ease;
}

.status-active,
.status-inactive {
  transition: color 0.2s ease;
}

/* Fast loading states */
.btn.loading {
  position: relative;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Optimistic status indicators */
.status-active {
  color: var(--success-color);
  font-weight: 600;
}

.status-inactive {
  color: var(--text-secondary-color);
  font-weight: 500;
}

.bot-action-btn {
  transition: all 0.2s ease;
}

.bot-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Performance notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
  max-width: 350px;
}

.notification.show {
  transform: translateX(0);
}

.notification-success {
  border-left: 4px solid var(--success-color);
}

.notification-error {
  border-left: 4px solid var(--danger-color);
}

.notification-info {
  border-left: 4px solid var(--accent-color);
}

/* Enhanced Dock Navigation Bar Styles */
.dock-navbar {
  position: fixed !important;
  top: 20px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 40px) !important;
  max-width: 1200px !important;
  margin: 0 !important;
  border-radius: 30px;
  z-index: 1000;
  background: var(--glass-bg);
  box-shadow:
    var(--crystal-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 80px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: visible;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Crystal Dock Shimmer Effect */
.dock-navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.1),
      transparent);
  animation: crystalShimmer var(--crystal-shimmer) ease-in-out infinite;
}

/* Dynamic scroll behavior - hide when scrolling down */
.dock-navbar.scrolled-down {
  transform: translateX(-50%) translateY(-100px);
  opacity: 0;
}

/* Show when scrolling up */
.dock-navbar.scrolled-up {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Mobile responsive scroll behavior */
@media (max-width: 900px) {
  .dock-navbar.scrolled-down {
    transform: translateX(-50%) translateY(-80px);
  }
}

@media (max-width: 768px) {
  .dock-navbar.scrolled-down {
    transform: translateX(-50%) translateY(-70px);
  }
}

.dock-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 1;
}

.logo-text {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1.2px;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
  max-width: none;
  display: block;
  line-height: 1.1;
}

.dock-links {
  display: flex;
  gap: 14px;
  align-items: center;
}

.dock-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 1.3rem;
  padding: 10px;
  border-radius: var(--border-radius-xl);
  min-width: 44px;
  max-width: 44px;
  height: 44px;
  box-sizing: border-box;
  overflow: hidden;
  transition: all var(--transition-speed) var(--transition-ease);
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 4px 15px rgba(99, 102, 241, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Crystal Button Shimmer */
.dock-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s;
}

.dock-btn:hover::before {
  left: 100%;
}

.dock-btn i {
  font-size: 1.3rem;
  margin: 0;
}

.dock-btn .btn-label {
  display: none;
}

.dock-btn:hover,
.dock-btn:focus {
  transform: translateY(-2px) scale(1.1);
  box-shadow:
    0 8px 25px rgba(99, 102, 241, 0.3),
    0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: var(--highlight-border);
}

@media (max-width: 900px) {
  .dock-navbar {
    height: 70px;
    width: calc(100% - 30px);
    padding: 0 15px;
    border-radius: 16px;
    top: 15px;
    width: 100%;
  }

  .logo-text {
    font-size: 1.2rem;
    max-width: none;
  }

  .dock-logo i {
    font-size: 1.4rem;
  }

  .dock-links {
    gap: 8px;
  }

  .dock-btn {
    font-size: 1rem;
    padding: 8px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
  }

  .dock-btn i {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .dock-navbar {
    height: 60px;
    width: calc(100% - 30px);
    padding: 0 15px;
    border-radius: 16px;
    top: 15px;
    width: 100%;
  }

  .logo-text {
    font-size: 1.1rem;
    max-width: none;
  }

  .dock-logo i {
    font-size: 1.3rem;
  }

  .dock-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
  }

  .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
  }
}

/* Reverse Signal Controls Styles */
.reverse-signal-controls {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  backdrop-filter: blur(10px);
}

.reverse-signal-controls .control-group {
  margin-bottom: 1.5rem;
}

.reverse-signal-controls .control-group:last-child {
  margin-bottom: 0;
}

.reverse-signal-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.9rem;
}

.reverse-signal-controls label i {
  color: var(--accent-color);
  width: 16px;
}

.reverse-signal-controls .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all var(--transition-speed) var(--transition-ease);
}

.reverse-signal-controls .form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--glow-color);
}

.reverse-signal-controls select.form-control {
  cursor: pointer;
}

.reverse-signal-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 3px;
  outline: none;
  margin: 0.5rem 0;
}

.reverse-signal-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-speed) var(--transition-ease);
}

.reverse-signal-controls input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.reverse-signal-controls input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent-color);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-speed) var(--transition-ease);
}

.reverse-signal-controls input[type="range"]::-moz-range-thumb:hover {
  background: var(--primary-color);
  transform: scale(1.1);
}

.threshold-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.threshold-display span {
  font-weight: 600;
  color: var(--accent-color);
  font-size: 1rem;
}

.threshold-display small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.reverse-signal-controls .btn {
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
}

.reverse-signal-controls .btn:last-child {
  margin-right: 0;
}

.alert.reverse-info {
  margin-top: 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--text-color);
}

.alert.reverse-info i {
  color: var(--accent-color);
}

/* Mode-specific styling */
.reverse-signal-controls[data-mode="off"] {
  border-color: var(--border-color);
}

.reverse-signal-controls[data-mode="manual"] {
  border-color: var(--warning-color);
  background: rgba(255, 190, 11, 0.05);
}

.reverse-signal-controls[data-mode="auto"] {
  border-color: var(--accent-color);
  background: rgba(99, 102, 241, 0.05);
}

/* Strategy Selector Styles */
.strategy-selector {
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.3);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.strategy-selector .form-group {
  margin-bottom: 1.5rem;
}

.strategy-selector label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
}

.strategy-selector label i {
  color: var(--accent-color);
  width: 16px;
}

.strategy-selector .form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: all var(--transition-speed) var(--transition-ease);
}

.strategy-selector .form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--glow-color);
}

.strategy-selector select.form-control {
  cursor: pointer;
}

.strategy-info {
  margin: 1rem 0;
}

.strategy-info .alert {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.strategy-info .alert-info {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--text-color);
}

.strategy-info .alert i {
  color: var(--info-color);
  font-size: 1.1rem;
}

.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Mobile responsive for reverse controls */
@media (max-width: 768px) {
  .reverse-signal-controls {
    padding: 1rem;
  }

  .reverse-signal-controls .btn {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.75rem;
  }
}