/* ===== GTranslate flags + hide google elements ===== */
a.gflag {
  vertical-align: middle;
  padding: 0;
  background-repeat: no-repeat;
  background-image: url(//gtranslate.net/flags/24.png);
}
a.gflag img { border: 0; }
a.gflag:hover { background-image: url(//gtranslate.net/flags/24a.png); }

#goog-gt-tt { display: none !important; }
.goog-te-banner-frame { display: none !important; }
.goog-logo-link { display: none !important; }
.goog-te-gadget { font-size: 0 !important; }
body { top: 0 !important; }
#google_translate_element2 { display: none !important; }

/* ===== Language switcher UI ===== */
.language-switcher {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  padding: 4px 12px;
}
.language-switcher i {
  font-size: 18px;
  color: #ffffff;
}
.custom-gtranslate-select {
  border: none;
  background: transparent;
  color: #ffffff;
  padding-right: 1.5rem;
  padding-left: 0;
  box-shadow: none;
  cursor: pointer;
  font-size: 14px;
}
.custom-gtranslate-select:focus {
  outline: none;
  box-shadow: none;
}
.custom-gtranslate-select option { color: #000000; }

/* ===== Wallet connect dropdown toggle ===== */
.dropdown-toggle-split {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: none;
  outline: none;
  color: var(--heading-text_color);
  margin-left: -12px;
}

/* Hide wallet-connect dropdown offscreen, elements stay for JS */
.wallet-group .wallet-hidden-dropdown {
  position: absolute;
  left: -9999px;
  top: 100%;
  opacity: 0;
  pointer-events: none;
}

/* ===== Hero engine panel – light glass version (2 rows × 3 columns) ===== */
.algx-engine-wrapper {
  max-width: 840px;          /* wider as requested */
  margin-left: auto;
  margin-right: 0;
  margin-top: 68px;
}

.algx-engine-panel {
  position: relative;
  background: rgba(249, 250, 251, 0.65);
  border-radius: 26px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  color: #0f172a;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 18px 22px 14px;
  overflow: hidden;
}

.algx-engine-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top left, rgba(253, 224, 171, 0.18), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.algx-engine-panel-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.algx-engine-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 6px;
}

.algx-engine-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0f172a;
}

.algx-engine-subtitle {
  font-size: 11px;
  color: #6b7280;
  max-width: 280px;
}

/* Better contrast – dark background, light text */
.algx-engine-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  background: #16a34a;
  color: #ecfdf5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  align-self: center;
  margin-left: auto;
  white-space: nowrap;
}

.algx-engine-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 2 rows × 3 columns */
  column-gap: 14px;
  row-gap: 10px;
}

.algx-engine-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px 9px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.95);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.algx-engine-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.algx-engine-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px;
}

.algx-engine-cell { min-width: 0; }

.algx-engine-asset {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.algx-engine-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: #0f172a;
  color: #f9fafb;
  border: 1px solid rgba(209, 213, 219, 0.8);
}

.algx-engine-label {
  font-size: 12px;
  color: #374151;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.algx-engine-roi {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.algx-engine-roi-value {
  font-size: 14px;
  font-weight: 600;
}

.algx-engine-roi-value.is-positive { color: #16a34a; }
.algx-engine-roi-value.is-negative { color: #dc2626; }

.algx-engine-roi-chip {
  font-size: 10px;
  text-transform: capitalize;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  white-space: nowrap;
}

.algx-engine-volume {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  color: #4b5563;
}

.algx-engine-volume-label {
  font-size: 12px;
  font-weight: 500;
}

.algx-engine-volume-detail {
  font-size: 11px;
  color: #6b7280;
}

.algx-engine-util {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

.algx-engine-progress {
  position: relative;
  width: 100%;
  max-width: 130px;
  height: 5px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.algx-engine-progress-bar {
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #16a34a);
}

.algx-engine-progress-caption {
  font-size: 10px;
  color: #6b7280;
  text-align: right;
}

.algx-engine-footnote {
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.algx-engine-footnote span { white-space: nowrap; }

/* Responsiveness / position tweaks */
@media (min-width: 1400px) {
  .algx-engine-wrapper {
    max-width: 900px;
    margin-right: 40px; /* slightly more to the right on large screens */
  }
}

@media (max-width: 1199.98px) {
  .algx-engine-wrapper {
    max-width: 560px;
    margin-top: 36px;
    margin-right: auto;
  }
}

@media (max-width: 991.98px) {
  .algx-engine-wrapper { max-width: 100%; }
  .algx-engine-panel { margin: 0 auto 12px; }
}

@media (max-width: 767.98px) {
  .algx-engine-rows { grid-template-columns: 1fr; } /* 1 column on tablet/mobile */
  .algx-engine-wrapper {
    margin-top: 22px;
    margin-right: 0;
  }
}

@media (max-width: 575.98px) {
  .algx-engine-panel {
    padding: 12px 12px 10px;
    border-radius: 20px;
  }
  .algx-engine-title { font-size: 13px; }
  .algx-engine-subtitle { display: none; }
  .algx-engine-row { padding: 7px 8px 6px; }
}
