/* =========================
   LOADING SCREEN STYLES
   ========================= */

/* Loading Container */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Ensure main app is visible when loading is hidden */
#app.loaded {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

#app {
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 10;
}

/* Ensure iframe is visible */
#app iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}





/* Connect Wallet Button - White Text */
.connect-wallet,
.wallet-button,
button[aria-label="Connect Wallet"] {
    color: #ffffff !important;
    --colors-t-onColor: 255 255 255 !important;
}

/* Alternative selectors for Connect Wallet button */
button .text-t-onColor,
button .text-body2,
.order-form-connect-button,
.bg-primary-gradient {
    color: #ffffff !important;
}

/* Menu Icon Color Changes */
svg.w-6.h-6 {
    fill: #00B567 !important;
    color: #00B567 !important;
}

/* Alternative selector for menu icon if needed */
svg[class*="w-6"][class*="h-6"] {
    fill: #00B567 !important;
    color: #00B567 !important;
}

.loading-container.hidden {
    opacity: 0 !important;
    pointer-events: none;
}

/* Logo Container */
.logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 32px;
}

/* Main Logo */
.main-logo {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    animation: logoFloat 2s ease-in-out infinite;
    z-index: 10;
}

/* Shine Effect */
.shine-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: shine 3s infinite;
    z-index: 5;
}

/* Glow Effect */
.c-shape-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.5);
    animation: pulseGlow 2s ease-in-out infinite alternate;
    z-index: 1;
}

/* Particles */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(66, 153, 225, 0.7);
    border-radius: 50%;
    animation: floatParticle 3s infinite ease-in-out;
}

/* Particle Positions */
.particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; animation-duration: 2s; }
.particle:nth-child(2) { top: 70%; left: 80%; animation-delay: 0.5s; animation-duration: 2.5s; }
.particle:nth-child(3) { top: 40%; left: 60%; animation-delay: 1s; animation-duration: 3s; }
.particle:nth-child(4) { top: 80%; left: 20%; animation-delay: 1.5s; animation-duration: 2.2s; }
.particle:nth-child(5) { top: 30%; left: 90%; animation-delay: 2s; animation-duration: 2.7s; }
.particle:nth-child(6) { top: 60%; left: 30%; animation-delay: 2.5s; animation-duration: 3.5s; }

/* Loading Text */
.loading-text {
    color: #4a5568;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 24px;
    text-align: center;
    z-index: 10;
}

/* Progress Bar */
.progress-bar {
    width: 300px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    z-index: 10;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #01246A, #31ce6d);
    border-radius: 3px;
    animation: progressPremium 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes shine {
    0% { transform: rotate(45deg) translate(-100%, -100%); }
    100% { transform: rotate(45deg) translate(100%, 100%); }
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 20px rgba(66, 153, 225, 0.3); }
    to { box-shadow: 0 0 40px rgba(66, 153, 225, 0.7); }
}

@keyframes floatParticle {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(5px, 10px); }
    50% { transform: translate(10px, 5px); }
    75% { transform: translate(5px, -5px); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

@keyframes progressPremium {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
    .logo-container {
        width: 100px;
        height: 100px;
    }

    .loading-text {
        font-size: 1.2rem;
    }

    .progress-bar {
        width: 240px;
    }
}

html.light {
  /* font colors */
  --colors-t-primary: 23 24 34;
  --colors-t-secondary: 68 71 95;
  --colors-t-third: 114 118 143;
  --colors-t-disabled: 105 107 130;
  --colors-t-placeholder: 181 183 193;
  --colors-t-onColor: 255 255 255;
  --colors-t-consistent: 255 255 255;
  --colors-t-inverse: 11 12 18;
  --colors-t-error: 255 22 149;
  --colors-t-buy: 1 193 110;
  --colors-t-yellow: 126 154 255;
  --colors-t-sell: 255 90 181;
  --colors-t-link: 126 154 255;
  --colors-t-linkHover: 152 161 248;
  --colors-t-white: 255 255 255;
  --colors-t-emphasize: 255 211 126;
  /* border */
  --colors-border-line: 216 218 227;
  --colors-border-lineSubtle: 235 235 239;
  --colors-border-lineStrong: 199 201 208;
  /* background */
  --colors-background-bg1: 253 253 253;
  --colors-background-bg2: 255 255 255;
  --colors-background-bg1Accent01: 201 215 241;
  --colors-background-bg1Accent02: 201 215 241;

  /* interactive */
  --colors-interactive-disabled: 223 223 224;
	--colors-interactive-primary: 1 193 110;
	--colors-interactive-primaryHover: 0 170 95;
	--colors-interactive-primaryActive: 0 150 85;
	
  --colors-interactive-primaryGradient: linear-gradient(93.96deg, #e05fbb 0.76%, #4250f4 100.57%);
  --colors-interactive-primaryAccent01: 76 80 122;
  --colors-interactive-primaryAccent02: 49 53 83;
  --colors-interactive-buy: 1 193 110;
  --colors-interactive-buyHover: 60 198 190;
  --colors-interactive-buyActive: 94 206 194;
  --colors-interactive-buyGradient: linear-gradient(90deg, #1DB1A8 0%, #09978F 100%);
  --colors-interactive-buyAccent01: 46 65 69;
  --colors-interactive-sell: 239 62 158;
  --colors-interactive-sellHover: 253 92 183;
  --colors-interactive-sellActive: 244 110 185;
  --colors-interactive-sellGradient: linear-gradient(90deg, #EF3E9E 0%, #D12683 100%);
  --colors-interactive-sellAccent01: 74 42 60;
  --colors-interactive-interactiveBg: 253 253 253;
  --colors-interactive-interactiveBgHover: 242 242 246;
  --colors-interactive-interactiveBgActive: 242 242 246;
  --colors-interactive-interactiveBgSelected: 242 242 246;
  --colors-interactive-interactive01: 235 235 239;
  --colors-interactive-interactive01Hover: 229 229 233;
  --colors-interactive-interactive01Active: 229 229 233;
  --colors-interactive-interactive01Selected: 229 229 233;
  --colors-interactive-interactive02: 215 215 223;
  --colors-interactive-interactive02Hover: 205 205 213;
  --colors-interactive-interactive02Active: 205 205 213;
  --colors-interactive-interactive02Selected: 205 205 213;
  --colors-interactive-interactivePopup: 255 255 255;
  /* support */
  --colors-support-success: 29 177 168;
  --colors-support-error: 255 22 149;
  --colors-support-warning: 255 193 34;
  --colors-support-info: 24 31 51;
  /* others */
  --colors-highLight: 249 176 34;
  --colors-overlay: rgba(0, 0, 0, 0.5);
}

:root,
html.dark {
  /* font colors */
  --colors-t-primary: 240 240 245;
  --colors-t-secondary: 178 180 198;
  --colors-t-third: 114 118 143;
  --colors-t-disabled: 105 107 130;
  --colors-t-placeholder: 68 71 95;
  --colors-t-onColor: 255 255 255;
  --colors-t-consistent: 255 255 255;
  --colors-t-inverse: 11 12 18;
  --colors-t-error: 255 22 149;
  --colors-t-buy: 1 193 110;
  --colors-t-yellow: 126 154 255;
  --colors-t-sell: 255 90 181;
  --colors-t-link: 126 154 255;
  --colors-t-linkHover: 152 161 248;
  --colors-t-white: 255 255 255;
  --colors-t-emphasize: 255 211 126;
  /* border */
  --colors-border-line: 59 61 89;
  --colors-border-lineSubtle: 48 50 74;
  --colors-border-lineStrong: 69 71 103;
  /* background */
  --colors-background-bg1: 23 24 34;
  --colors-background-bg2: 11 12 18;
  --colors-background-bg1Accent01: 36 37 52;
  --colors-background-bg1Accent02: 42 44 60;
  /* interactive */
  --colors-interactive-disabled: 63 65 93;
	--colors-interactive-primary: 1 193 110;
	--colors-interactive-primaryHover: 0 170 95;
	--colors-interactive-primaryActive: 0 150 85;
  --colors-interactive-primaryGradient: linear-gradient(90deg, #e05fbb 0%, #4250f4 100%);
  --colors-interactive-primaryAccent01: 76 80 122;
  --colors-interactive-primaryAccent02: 49 53 83;
  --colors-interactive-buy: 29 177 168;
  --colors-interactive-buyHover: 60 198 190;
  --colors-interactive-buyActive: 94 206 194;
  --colors-interactive-buyGradient: linear-gradient(90deg, #1DB1A8 0%, #09978F 100%);
  --colors-interactive-buyAccent01: 46 65 69;
  --colors-interactive-sell: 239 62 158;
  --colors-interactive-sellHover: 253 92 183;
  --colors-interactive-sellActive: 244 110 185;
  --colors-interactive-sellGradient: linear-gradient(90deg, #ef3e9e 0%, #d12683 100%);
  --colors-interactive-sellAccent01: 74 42 60;
  --colors-interactive-interactiveBg: 30 31 49;
  --colors-interactive-interactiveBgHover: 38 39 61;
  --colors-interactive-interactiveBgActive: 54 54 85;
  --colors-interactive-interactiveBgSelected: 46 47 73;
  --colors-interactive-interactive01: 44 45 67;
  --colors-interactive-interactive01Hover: 55 56 82;
  --colors-interactive-interactive01Active: 77 79 110;
  --colors-interactive-interactive01Selected: 66 67 97;
  --colors-interactive-interactive02: 59 61 89;
  --colors-interactive-interactive02Hover: 71 73 107;
  --colors-interactive-interactive02Active: 98 101 141;
  --colors-interactive-interactive02Selected: 85 87 124;
  --colors-interactive-interactivePopup: 90 92 116;
  /* support */
  --colors-support-success: 29 177 168;
  --colors-support-error: 255 22 149;
  --colors-support-warning: 248 199 72;
  --colors-support-info: 24 31 51;
  /* others */
  --colors-highLight: 255 211 126;
  --colors-overlay: rgba(0, 0, 0, 0.5);
}

:root,
html.dark .text-t-third {color: rgb(197 198 205) !important;}
:root,
html.dark .order-form-connect-button{color: #fff !important;}
:root, html.dark .text-body2{color: #fff;}

:root {
  --font-site-main: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  --header-logo-height: 44px;      /* logo height */
  --header-logo-max-width: 700px;  /* width limit */
  --header-min-height: 82px; 

  /* Elevation and radii */
  --elevation-1: 0 4px 14px rgba(0,0,0,0.08);
  --elevation-2: 0 8px 24px rgba(0,0,0,0.14);
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

/* customize scroll bar */
::-webkit-scrollbar {
  width: 6px;
  height: 5px;
}

::-webkit-scrollbar-thumb {
  background: var(--colors-border-line);
  border-radius: 4px;
  width: 4px;
}

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

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* buttons */
.button,
.button-primary,
button {
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: transform .06s ease, box-shadow .12s ease, background-color .12s ease, opacity .12s ease;
}
.button:hover,
.button-primary:hover,
button:hover {
  transform: translateY(-1px);
}
.button:active,
.button-primary:active,
button:active {
  transform: translateY(0);
}

/* sheets, cards and panels */
.sheet-content,
.order-form-card,
.dialog-content,
.panel,
.card {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--elevation-1);
  border: 1px solid rgb(var(--colors-border-lineSubtle));
  background: rgb(var(--colors-background-bg2));
}

/* inputs */
.input-text-field,
.input-base-input,
.currency-input input,
input[type="text"],
input[type="number"],
select, textarea {
  border-radius: var(--radius-sm) !important;
  background: rgb(var(--colors-interactive-interactiveBg));
  border: 1px solid rgb(var(--colors-border-line));
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.input-text-field:hover,
.input-base-input:hover,
.currency-input input:hover,
input[type="text"]:hover,
input[type="number"]:hover,
select:hover, textarea:hover {
  border-color: rgb(var(--colors-interactive-primary));
}
.input-text-field:focus,
.input-base-input:focus,
.currency-input input:focus,
input[type="text"]:focus,
input[type="number"]:focus,
select:focus, textarea:focus {
  border-color: rgb(var(--colors-interactive-primary));
  box-shadow: 0 0 0 3px rgba(var(--colors-interactive-primary), .2);
}

/* dialog */
.dialog-content {
  padding: 16px;
}

/* chips, radio & toggles */
.radio-option,
.direction-switch-long,
.direction-switch-short {
  border-radius: var(--radius-xs) !important;
}

/* emphasis text utilities */
.text-buy,
.direction-switch-long { color: rgb(var(--colors-interactive-buy)); }
.text-sell,
.direction-switch-short { color: rgb(var(--colors-interactive-sell)); }

/* Accessibility: Focus styles for keyboard navigation */
.button:focus-visible,
.input-text-field:focus-visible,
.input-base-input:focus-visible {
  outline: 2px solid rgb(var(--colors-interactive-primary));
  outline-offset: 2px;
}

/* Logo size customization - use CSS variables for easy override */
.header-logo img,
.header-logo-image {
  height: var(--header-logo-height);
  width: auto;
  max-width: var(--header-logo-max-width);
  image-rendering: -webkit-optimize-contrast;
}

/* Adjust header layout for larger logo and add subtle backdrop */
.header-container {
  min-height: var(--header-min-height);
  backdrop-filter: saturate(120%) blur(6px);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  border-bottom: 1px solid rgb(var(--colors-border-lineSubtle));
}

/* @astrolabs/broker-widget theme overrides */

/* Order form: compact spacing and visual grouping */
.order-form-card {
  padding: 12px;
  gap: 10px;
}
.order-form-card .section-title,
.order-form-card .title,
.order-form-card .label {
  font-weight: 600;
}

/* Price ladder and orderbook tweaks */
.orderbook,
.depth,
.order-book {
  --row-height: 22px;
}
.orderbook .row,
.depth .row,
.order-book .row {
  height: var(--row-height);
}
.orderbook .bid .row:hover,
.orderbook .ask .row:hover {
  filter: brightness(1.08);
}

/* Chart container polish */
.chart-wrap, .tv-chart-view, .tradingview-container, .tv-lightweight-charts {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
  border: 1px solid rgb(var(--colors-border-lineSubtle));
}

/* Tabs */
.tabs, .tab-list, .tab {
  --tab-radius: var(--radius-sm);
}
.tab {
  border-radius: var(--tab-radius);
}
.tab.active {
  background: rgba(var(--colors-interactive-primary), .12);
  color: rgb(var(--colors-interactive-primary));
}

/* Table improvements */
.table, table {
  border-collapse: separate;
  border-spacing: 0 6px;
}
.table tr, table tr {
  background: rgb(var(--colors-background-bg2));
}
.table tr > td, .table tr > th, table tr > td, table tr > th {
  border: none !important;
}
.table tr:hover { filter: brightness(1.04); }

/* Toast/notification position if supported */
.toast, .notification {
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-2);
}

/* Link styles aligned with brand */
 a, .link {
  color: rgb(var(--colors-t-link));
}
 a:hover, .link:hover {
  color: rgb(var(--colors-t-linkHover));
}

/* Improve scrollbar contrast for dark theme specifically */
html.dark ::-webkit-scrollbar-thumb {
  background: rgb(var(--colors-border-line));
}

/* Subtle separators */
.separator, .divider {
  background: rgb(var(--colors-border-lineSubtle));
  opacity: .8;
  height: 1px;
}

/* Hover surfaces */
.surface-hover:hover {
  background: rgb(var(--colors-interactive-interactiveBgHover));
}


html.light .connect-wallet,
html.light .wallet-button {
  color: #fff !important;
}


header .h-5 img{ width:150px !important; height:auto !important;}
.direction-switch-short{ margin-left:5px !important;}


img[src*="crox"],
img[src*="logo"] {
  height:35px !important;
}

/* Fix for network dropdown images - prevent stretching */
img.mr-1.h-5.w-5 {
  width: 1.25rem !important;  /* h-5 equivalent */
  height: 1.25rem !important; /* w-5 equivalent */
  object-fit: contain !important;
  object-position: center !important;
  aspect-ratio: 1 !important;
}

/* Additional network selector image fixes */
.network-selector img,
.wallet-selector img,
.dropdown-option img,
[class*="network"] img,
[class*="wallet"] img {
  object-fit: contain !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Specific fix for ApolloX SDK network images */
img[src*="opbnb-logo"],
img[src*="bnb-logo"],
img[src*="arb-logo"],
img[src*="base-logo"] {
  object-fit: contain !important;
  width: auto !important;
  height: auto !important;
  max-width: 1.25rem !important;
  max-height: 1.25rem !important;
}
/* Top stats text bold */
.text-subtitle2{
  font-weight: 600;
}
.text-t-third{color: rgb(64 68 94) !important;}


.bg-interactive-interactive02{ background:#d0edd5;     color: #000 !important;}
.input-text-field, .input-base-input{height: 32px; padding-left: 9px;}
.bg-border-lineStrong{background-color: #11b478 !important;}
.text-t-buy{color: rgb(41 213 110) !important;}



footer {
  background-color: #232433 !important;
}

html.light footer {
  background-color: #c9d7f1 !important;
}
.bg-interactive-buy{ background:#03c16f !important}
.text-body2{color: #000;}

/* =========================
   FOOTER STYLES
   ========================= */

.site-footer {
    background: linear-gradient(135deg, rgb(var(--colors-background-bg1)) 0%, rgb(var(--colors-background-bg2)) 100%);
    border-top: 1px solid rgb(var(--colors-border-lineSubtle));
    padding: 2rem 0 1rem;
    margin-top: auto;
    width: 100%;
    color: rgb(var(--colors-t-primary));
    font-family: var(--font-site-main);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo-img {
    height: 32px;
    width: auto;
}

.footer-logo h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(var(--colors-t-primary));
}

.footer-description {
    margin: 0;
    line-height: 1.6;
    color: rgb(var(--colors-t-secondary));
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgb(var(--colors-interactive-interactive01));
    transition: all 0.2s ease;
    border: 1px solid rgb(var(--colors-border-line));
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgb(var(--colors-interactive-interactive01Hover));
}

.social-icon {
    width: 18px;
    height: 18px;
    filter: brightness(0.8);
}

.footer-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: rgb(var(--colors-t-primary));
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: rgb(var(--colors-t-secondary));
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: rgb(var(--colors-interactive-primary));
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 1.5rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgb(var(--colors-border-lineSubtle));
    color: rgb(var(--colors-t-third));
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0;
    line-height: 1.6;
}

/* Footer styles are now integrated above with the new site-footer class */
.bg-interactive-buy{ background:#03c16f !important}
.text-body2{color: #000;}

/* Dark theme footer adjustments */
html.dark .site-footer {
    background: linear-gradient(135deg, rgb(var(--colors-background-bg2)) 0%, rgb(var(--colors-background-bg1)) 100%);
}

html.dark .social-link {
    background: rgb(var(--colors-interactive-interactive02));
    border-color: rgb(var(--colors-border-line));
}

html.dark .social-link:hover {
    background: rgb(var(--colors-interactive-interactive02Hover));
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        padding: 1rem;
    }
    
    .footer-bottom p {
        font-size: 0.85rem;
    }
}