/* ==========================================================================
   Koinpark Web3 Enhanced Application Stylesheet
   ========================================================================== */

:root {
  --primary-blue: #045cff;
  --primary-hover: #0046c7;
  --success-green: #00c076;
  --danger-red: #ff4d4f;
  --dark-bg: #0a0b0e;
  --dark-card: #12141a;
  --dark-border: rgba(255, 255, 255, 0.08);
  --dark-subtle: rgba(255, 255, 255, 0.04);
}

body.dark_theme {
  background-color: var(--dark-bg) !important;
  color: #f1f5f9 !important;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

body.light_theme {
  background-color: #f8fafc !important;
  color: #0f172a !important;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Navbar Enhancements */
.mynavbar {
  background: rgba(10, 11, 14, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--dark-border);
  transition: all 0.3s ease;
}

body.light_theme .mynavbar {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid #e2e8f0;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: #94a3b8 !important;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff !important;
}

body.light_theme .nav-link:hover, body.light_theme .nav-link.active {
  color: #045cff !important;
}

/* Rounded Buttons & Badges */
.btn-primary {
  background-color: var(--primary-blue) !important;
  border-color: var(--primary-blue) !important;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-1px);
}

.network-badge-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dark-border);
  transition: all 0.2s ease;
}

.network-badge-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dark-border);
  transition: all 0.2s ease;
}

.btn-icon-round:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.05);
}

/* Glassmorphism Cards */
.bg-card-dark {
  background: var(--dark-card) !important;
  border: 1px solid var(--dark-border) !important;
}

body.light_theme .bg-card-dark {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

.byjcard {
  background: linear-gradient(180deg, #13161f, #0c0d12) !important;
  border: 1px solid var(--dark-border) !important;
  border-radius: 20px !important;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.byjcard:hover {
  border-color: rgba(4, 92, 255, 0.4) !important;
  transform: translateY(-2px);
}

body.light_theme .byjcard {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

/* Wallet Option Selection in Connect Modal */
.wallet-option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dark-border);
  transition: all 0.2s ease;
}

.wallet-option-btn:hover {
  background: rgba(4, 92, 255, 0.1);
  border-color: var(--primary-blue);
  transform: translateX(4px);
}

.network-select-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--dark-border);
  transition: all 0.2s ease;
}

.network-select-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Custom Hamburger Icon Animation */
.custom-nav-menu .line {
  stroke: #ffffff;
}

body.light_theme .custom-nav-menu .line {
  stroke: #0f172a;
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  background: #0f1118;
  border-right: 1px solid var(--dark-border);
  z-index: 1050;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
}

.mobile-drawer.show {
  transform: translateX(0);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7);
}

.mobile-nav-link {
  color: #94a3b8;
  text-decoration: none;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover, .mobile-nav-link.active {
  background: rgba(4, 92, 255, 0.15);
  color: #045cff;
  font-weight: 600;
}

/* Orderbook styles */
.orderbook-table-container {
  max-height: 160px;
  overflow-y: auto;
}

.orderbook-table-container::-webkit-scrollbar {
  width: 4px;
}

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

/* Toast Container Floating Styles */
.toast-container .toast {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: toastSlideIn 0.3s ease-out;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Tables styling */
.table-dark {
  --bs-table-bg: transparent !important;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
}

body.light_theme .table-dark {
  --bs-table-color: #0f172a !important;
  --bs-table-bg: transparent !important;
}

/* Tooltip & Canvas Crosshair */
.pointer-events-none {
  pointer-events: none;
}

/* Transitions */
* {
  box-sizing: border-box;
}

/* PC Download Card and Badge Styles */
.hover-lift {
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.card-download-pc {
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.95) 0%, rgba(10, 12, 20, 0.98) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  border-radius: 20px;
}

body.light_theme .card-download-pc {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.btn-download-pc {
  cursor: pointer;
  user-select: none;
}

/* Ensure subtitles and text in dark theme are clearly visible and light */
body.dark_theme .text-muted,
.dark_theme .text-muted,
.dark_theme .byjcard .text-muted,
.card-download-pc .text-muted,
.enter-card-section-dwn span,
.enter-card-section-dwn .text-muted,
.enter-card-section p.text-muted,
.enter-card-2 p.text-muted {
  color: #cbd5e1 !important;
}

body.light_theme .enter-card-section-dwn span {
  color: #64748b !important;
}


