body {
  margin: 0;
  padding: 0 10px;
  font-size: 16px;
  text-align: center;
  font-family: "Arial", sans-serif;
}

h1 {
  font-size: 12px;
}

.menu {
  display: flex;
}

.menu span {
  cursor: pointer;
  padding: 3px 0;
  flex-basis: auto;
  flex-grow: 1;
  text-align: center;
  font-size: 12px;
  border-radius: 5px;
  color: #fff;
  background-color: #000000;
  margin: 0.1em;
}

.menu span:hover {
  background: #4a4a4a;
}

span.menu-active {
  background: #779dd9;
}

.digits {
  margin-bottom: 5px;
  display: flex;
}

.digits span {
  padding: 3px 0;
  flex-basis: auto;
  flex-grow: 1;
  text-align: center;
  font-size: 16px;
  /* border-radius: 5px; */
  color: #fff;
  border-radius: 0.2em;
  margin: 1px;
}

.digits_moved_down {
  background-color: #c03;
}

.digits_moved_up {
  background-color: #29abe2;
}

.headcol {
  margin-bottom: 2px;
  display: flex;
}

.headcol span {
  padding: 2px 0;
  flex-basis: auto;
  flex-grow: 1;
  text-align: center;
  font-size: 0px;
  /* border-radius: 5px; */
  color: #fff;
}

.Head_moved_down {
  background-color: #c03;
}

.Head_moved_up {
  background-color: #29abe2;
}

.Head_moved_mid {
  background-color: #32cd32;
}

.placecol {
  margin-bottom: 10px;
  display: flex;
}

.placecol span {
  padding: 2px 0;
  flex-basis: auto;
  flex-grow: 1;
  text-align: center;
  font-size: 0px;
  /* border-radius: 5px; */
  color: #fff;
}

.Place_moved_down {
  background-color: #c03;
}

.Place_moved_up {
  background-color: #29abe2;
}

.Place_moved_none {
  background-color: #fff;
}

.chartContainer {
  /* margin-bottom: 15px; */
  min-height: 180px;
  min-width: 125px;
}

.digitHeatmapContainer {
  min-height: 180px;
  min-width: 125px;
}

.add-border-chart {
  border: 1px solid #ccc;
  border-radius: 5px;
}

.chartContainerDigit {
  min-height: 115px;
  min-width: 125px;
}

input {
  font-family: monospace;
  font-weight: bold;
  border: 1px solid #909090;
  /* border-radius: 4px; */
  outline: none;
}

#token {
  padding: 0.2em;
  border-right: transparent;
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  /* width: 8em; */
}

#tokenbtn {
  color: white;
  background: black;
  position: relative;
  left: -2em;
  padding: 0.2em 0.5em;
  border-radius: 0;

}

/* ===== Top account/balance/profit stat cards ===== */
.stat-row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 4px;
  box-sizing: border-box;
}

.stat-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e3e6ea;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-align: left;
  position: relative; /* anchors the mobile corner caret */
}

.stat-card .stat-icon {
  font-size: 1.3em;
  color: #5d5d5d;
  flex-shrink: 0;
}

.stat-body {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  min-width: 0;
}

.stat-key {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #90a0ad;
}

.stat-key-short {
  display: none;
}

.stat-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2d3a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row {
  width: 100%;
  ;
}

.column {
  float: left;
  width: 33.33%;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}


.textbox-btm {
  padding: 4px 6px;
  border-radius: 5px;
  border: 1px solid #cfd6dd;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.95em;
}

.textbox-btm:focus {
  border-color: #406781;
  box-shadow: 0 0 0 2px rgba(64, 103, 129, 0.15);
}

.risebtn {
  background: linear-gradient(145deg, #3498db, #2980b9);
  border: none;
  border-radius: 4px;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-family: 'Arial', sans-serif;
  font-size: 13px;
  padding: 6px 14px;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  width: 78%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.risebtn:active {
  background: linear-gradient(145deg, #2980b9, #23689e);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.risebtn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.4);
}


.fallbtn {
  /* box-shadow: 0px 10px 14px -7px #b07a41; */
  background: linear-gradient(to bottom, #c94e4e 5%, #c94e4e 100%);
  background-color: #c94e4e;
  border-radius: 4px;
  border: 1px solid #ad4949;
  display: inline-block;
  cursor: pointer;
  color: #ffffff;
  font-family: Arial;
  font-size: 13px;
  padding: 6px 14px;
  /* font-weight: bold; */
  width: 78%;
  text-decoration: none;
  /* text-shadow: 0px 1px 0px #c75732; */
}

.fallbtn:hover {
  background: linear-gradient(to bottom, #c94e4e 5%, #c94e4e 100%);
  background-color: #c94e4e;
}

.fallbtn:active {
  position: relative;
  top: 1px;
}

.button-active {
  color: #000 !important;
  background-color: #ccc !important
}


/* ------------------------------------------------------------------  */

:root {
  --color-white-100: hsl(206, 5%, 98%);
  --color-white-200: hsl(206, 5%, 90%);
  --color-white-300: hsl(206, 5%, 80%);
  --color-white-400: hsl(206, 5%, 65%);
  --color-white-500: hsl(206, 5%, 50%);
  --color-black-100: hsl(213, 23%, 8%);
  --color-black-200: hsl(214, 21%, 6%);
  --color-black-300: hsl(210, 21%, 6%);
  --color-black-400: hsl(216, 22%, 4%);
  --color-black-500: hsl(220, 18%, 3%);
  --color-pink-100: hsl(326, 10%, 32%);
  --color-pink-200: hsl(336, 3%, 29%);
  --color-pink-300: hsl(330, 4%, 9%);
  --color-pink-400: hsl(328, 11%, 26%);
  --color-pink-500: hsl(336, 5%, 19%);
  --shadow-small: 0 1px 3px 0 rgba(0, 0, 0, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-large: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  list-style: none;
  list-style-type: none;
  text-decoration: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

html {
  font-size: 100%;
  box-sizing: inherit;
  scroll-behavior: smooth;
  height: -webkit-fill-available;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  height: -webkit-fill-available;
  color: var(--color-black-500);
  background-color: var(--color-white-100);
}

a,
button {
  cursor: pointer;
  border: none;
  outline: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  background: none;
  box-shadow: none;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
  -o-object-fit: cover;
  object-fit: cover;
}

.container {
  max-width: 75rem;
  height: auto;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.brand {
  font-family: inherit;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -1px;
  text-transform: uppercase;
  color: var(--color-pink-500);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 100;
  margin: 0 auto;
  box-shadow: var(--shadow-medium);
  background-color: var(--color-white-100);
}

.wrapper {
  max-width: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  row-gap: 2rem;
  width: 100%;
  height: 3.5rem;
  margin: 0 auto;
}

@media screen and (max-width: 992px) {
  .navbar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100%;
    z-index: 10;
    opacity: 0;
    overflow-y: auto;
    visibility: hidden;
    box-shadow: var(--shadow-medium);
    background-color: var(--color-white-100);
    transition: all 0.5s ease;
  }

  .navbar.active {
    left: 0rem;
    opacity: 1;
    visibility: visible;
  }
}

.menu-item {
  position: relative;
  display: inline-block;
  margin-left: 1.5rem;
}

.menu-link {
  display: flex;
  justify-content: center;
  align-items: center;
  -moz-column-gap: 0.4rem;
  column-gap: 0.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: inherit;
  cursor: pointer;
  text-transform: capitalize;
  color: #33414f;
  transition: color 0.2s ease-in-out;
}

.menu-link>i.bx {
  font-size: 1.35rem;
  line-height: 1.5;
  color: inherit;
}

.menu-link:hover {
  outline: none;
  color: var(--color-pink-500);
}

@media only screen and (min-width: 993px) {
  .menu-dropdown:hover>.submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media only screen and (max-width: 992px) {
  .menu {
    width: 100%;
    height: auto;
    padding: 1rem 0;
    display: block;
  }

  .menu-item {
    display: block;
    margin: 0 auto;
    text-align: left;
    font-size: 1.2em;
    padding: 0.5em;
  }

  .menu-link {
    justify-content: space-between;
    padding: 0.5rem 1.25rem;
  }

  .market-menue {
    display: flex !important;
    margin-top: -4.5em !important
  }

  .stat-card {
    padding: 8px 10px;
    gap: 8px;
  }

  .stat-val {
    font-size: 1rem;
  }

  #opration-cosole {
    width: 60% !important;
  }

  #output {
    width: 40% !important;
  }

  .w3-bar .w3-button {
    font-size: 0.9em;
  }

}

.msgoutput {
  font-size: 0.8em;
  line-height: 1.5;
  float: left;
  padding: 8px 12px;
  overflow-y: auto;
  width: 60%;
  height: 150px;
  max-height: 300px;
  display: inline-block;
  box-sizing: border-box;
  text-align: left;
  background: #fbfcfd;
  border: 1px solid #e3e6ea;
  border-radius: 8px 0 0 8px;
  border-right: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Each log entry sits on its own subtle divider for readability */
.msgoutput > div {
  padding: 3px 0;
  border-bottom: 1px solid #f0f2f4;
}

.msgoutput > div:last-child {
  border-bottom: none;
}

/* Slim scrollbar for the compact log panel */
.msgoutput::-webkit-scrollbar,
#opration-cosole::-webkit-scrollbar {
  width: 6px;
}

.msgoutput::-webkit-scrollbar-thumb,
#opration-cosole::-webkit-scrollbar-thumb {
  background: #cfd6dd;
  border-radius: 3px;
}

@media only screen and (min-width: 992px) {
  #mobile-login {
    display: none !important;
  }
}

@media only screen and (max-width: 600px) {
  .stat-row {
    gap: 6px;
    padding: 0;
  }

  /* Market tabs (100v, 10v … 100(1s)) — shrink so all 10 fit one tidy row */
  .market-menue span,
  .market-menue span.menu-active {
    font-size: 9px;
    padding: 4px 0;
    margin: 0.08em;
    border-radius: 4px;
  }

  .stat-card {
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 6px 3px;
    text-align: center;
    border-left: 1px solid #e3e6ea;
  }

  .stat-card .stat-icon {
    font-size: 0.95em;
  }

  .stat-body {
    align-items: center;
    width: 100%;
  }

  .stat-key-full {
    display: none;
  }

  .stat-key-short {
    display: inline;
  }

  .stat-key {
    font-size: 0.6rem;
  }

  .stat-val {
    font-size: 0.8rem;
    max-width: 100%;
  }

  #opration-cosole {
    width: 100% !important;
    font-size: 0.9em !important;
  }

  #output {
    width: 100% !important;
    margin-top: 1em !important;
    border: 1px solid #a3a3a3;

  }

  .chartContainerDigit {
    min-height: 110px !important
  }
}


.submenu {
  position: absolute;
  top: 2.35rem;
  left: -2rem;
  min-width: 13rem;
  height: auto;
  padding: 0 1rem 1rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  border-radius: 0 0 0.25rem 0.25rem;
  border-top: 2px solid var(--color-pink-400);
  box-shadow: var(--shadow-medium);
  background-color: var(--color-white-100);
  transition: all 0.3s ease-in-out;
}

.submenu-item {
  display: block;
  margin-top: 0.75rem;
}

.submenu-link {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: inherit;
  cursor: pointer;
  color: var(--color-black-500);
  transition: all 0.35s ease;
}

.submenu-link:hover {
  outline: none;
  color: var(--color-pink-500);
}

@media only screen and (max-width: 992px) {
  .submenu {
    position: relative;
    top: -0.5rem;
    left: 2.5rem;
    width: 100%;
    max-height: 0;
    padding: 0px;
    border: none;
    outline: none;
    opacity: 1;
    overflow: hidden;
    visibility: visible;
    transform: translateY(0px);
    box-shadow: none;
    background: transparent;
  }
}

.burger {
  position: relative;
  display: none;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  width: 1.75rem;
  height: 1rem;
  opacity: 0;
  visibility: hidden;
  background: transparent;
}

.burger-line {
  position: absolute;
  display: block;
  left: 0;
  width: 100%;
  height: 2px;
  opacity: 1;
  border: none;
  outline: none;
  background: var(--color-black-500);
}

.burger-line:nth-child(1) {
  top: 0px;
}

.burger-line:nth-child(2) {
  top: 0.5rem;
}

.burger-line:nth-child(3) {
  top: 1rem;
}

@media only screen and (max-width: 992px) {
  .burger {
    display: block;
    opacity: 1;
    visibility: visible;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 9;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease-in-out;
  background-color: rgba(0, 0, 0, 0.65);
}

@media only screen and (max-width: 992px) {
  .overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
  }
}

/* CSS */
.button-3 {
  width: 10em;
  appearance: none;
  background-color: #2ea44f;
  border: 1px solid rgba(27, 31, 35, .15);
  border-radius: 6px;
  box-shadow: rgba(27, 31, 35, .1) 0 1px 0;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-family: -apple-system, system-ui, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 6px 16px;
  position: relative;
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  vertical-align: middle;
  white-space: nowrap;
}

.button-3:focus:not(:focus-visible):not(.focus-visible) {
  box-shadow: none;
  outline: none;
}

.button-3:hover {
  background-color: #2c974b;
}

.button-3:focus {
  box-shadow: rgba(46, 164, 79, .4) 0 0 0 3px;
  outline: none;
}

.button-3:disabled {
  background-color: #94d3a2;
  border-color: rgba(27, 31, 35, .1);
  color: rgba(255, 255, 255, .8);
  cursor: default;
}

.button-3:active {
  background-color: #298e46;
  box-shadow: rgba(20, 70, 32, .2) 0 1px 0 inset;
}

.img-text-men {
  font-size: 1.2em;
  padding: 0.5em;
}

/* -------------------------------------------------- */


.select-mrkt {
  appearance: none;
  /* safari */
  -webkit-appearance: none;
  /* other styles for aesthetics */
  width: 60%;
  font-size: 1.15rem;
  padding: 0.675em 6em 0.675em 1em;
  background-color: #fff;
  border: 1px solid #caced1;
  border-radius: 0.25rem;
  cursor: pointer;
}

.w3-bar .w3-button {
  border-radius: 5px;
  margin: 0 0.1em;
  background: #67636a;
  padding: 0.2em 0.5em !important;
}

.w3-bar {
  padding: 0.2em 0 !important;
  background-color: #fff !important;
}

.w3-container {
  border-top: 1px solid #eceef1;
  padding: 8px 12px 4px;
}


.tbl-rw {
  padding: 0.35em 0;
  font-size: 0.85em;
}


#opration-cosole {
  text-align: left;
  width: 40%;
  height: 150px;
  max-height: 300px;
  display: inline-block;
  box-sizing: border-box;
  vertical-align: top;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #e3e6ea;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


.disabledbtn {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
  opacity: 0.6;
}

.live-indicator-analyzing {
  width: 1.4em;
  position: initial;
  float: right;
  margin-left: 1em;
  display: none;
  margin-right: 0.2em;
}

/* _________________________________________ */

.notyf__toast--dismissible .notyf__wrapper {
  font-size: 0.8em;
  padding: 0.5em;
  padding-left: 0;
}

.setting-titl {
  color: #3a3a3a;
  font-weight: 550;
  padding-left: 1em;
  float: left;
}

.notiy-icon {
  color: #fff !important;
  font-size: 1.5em !important;
}

.span-text-safe {
  vertical-align: top;
}

.span-text-safe:before {
  content: "Safe Sell";
}


.market-condition {
  display: inline-block;
  padding: 0 8px;
  border-radius: 15px;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 12px;
  transition: all 0.5s ease;
}

.market-condition.very-bad {
  background-color: #FF4136;
  color: white;
}

.market-condition.bad {
  background-color: #FF851B;
  color: white;
}

.market-condition.neutral {
  background-color: #FFDC00;
  color: black;
}

.market-condition.good {
  background-color: #2ECC40;
  color: white;
}

.market-condition.very-good {
  background-color: #3D9970;
  color: white;
}



.w3-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #e2e7ec;
  padding: 5px;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
  border-bottom: 1px solid #d3d9df;
}

.w3-bar-item.w3-button {
  flex: 1 1 auto;
  padding: 6px 8px;
  border: 1px solid #c2ccd6 !important;
  border-radius: 6px;
  background-color: #ffffff;
  color: #46586a;
  font-family: 'Arial', sans-serif;
  font-size: 0.82em;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  transition: all 0.15s ease;
  cursor: pointer;
  outline: none;
  text-decoration: none;
}

.w3-bar-item.w3-button:hover {
  background-color: #eef2f6 !important;
  border-color: #a9b6c2 !important;
  box-shadow: none;
  color: #1f2d3a !important;
}

.w3-bar-item.w3-button.button-active {
  background-color: #406781 !important;
  border-color: #406781 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Responsive design */
@media (max-width: 600px) {
  .w3-bar {
    flex-wrap: nowrap;
    gap: 4px;
    padding: 4px;
  }

  .w3-bar-item.w3-button {
    flex: 1 1 0;
    min-width: 0;
    padding: 6px 3px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}




/* ========================================= */
/* COMPLETE FOOTER CSS - COPY ALL OF THIS */
/* ========================================= */


/* Main footer styles */
.site-footer-compact {
  background: white;
  border-top: 1px solid #ddd;
  padding: 15px 20px 10px 20px;
  font-size: 11px;
  color: #333;
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;

}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 10px;
  align-items: center;
  justify-content: center;
}

.footer-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-label {
  color: #007acc;
  font-weight: bold;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-group a {
  color: #333;
  text-decoration: none;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.footer-group a:hover {
  color: #007acc;
  background: rgba(0, 122, 204, 0.1);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  font-size: 10px;
  color: #666;
}

.footer-bottom a {
  color: #007acc;
  text-decoration: none;
  font-size: 10px;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

.footer-divider {
  color: #ccc;
  font-size: 10px;
}

/* Mobile tool links for SEO */
.mobile-tool-links {
  display: none;
  font-size: 7px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.mobile-tool-links a {
  color: #007acc;
  text-decoration: none;
  margin: 0 2px;
  font-size: 7px;
}

.mobile-tool-links a:hover {
  text-decoration: underline;
}

/* Smart positioning for short screens */
@media (min-width: 769px) and (max-height: 850px) {
  .site-footer-compact {
    position: relative !important;
  }

  body {
    padding-bottom: 10px !important;
  }

  .main-content,
  main,
  #chartContainer,
  .chartContainer {
    margin-bottom: 25px !important;
  }
}

/* Tablet responsive */
@media (max-width: 768px) {
  .site-footer-compact {
    padding: 4px 5px 3px 5px;
    font-size: 8px;
    border-top: 1px solid #ddd;
  }

  .footer-links {
    display: none;
  }

  .mobile-tool-links {
    display: block;
  }

  .footer-bottom {
    margin-bottom: 0;
    padding-top: 0;
    border-top: none;
    font-size: 7px;
    gap: 4px;
  }

  .footer-bottom a {
    font-size: 7px;
  }

  .footer-divider {
    font-size: 7px;
  }

  #btm-tool {
    margin-bottom: 3em;
  }

}

/* Phone responsive */
@media (max-width: 480px) {
  .site-footer-compact {
    padding: 3px 5px 2px 5px;
    font-size: 7px;
  }

  .mobile-tool-links {
    font-size: 6px;
    margin-bottom: 2px;
  }

  .mobile-tool-links a {
    font-size: 6px;
    margin: 0 1px;
  }

  .footer-bottom {
    font-size: 6px;
    gap: 2px;
  }

  .footer-bottom a {
    font-size: 6px;
  }

  .footer-divider {
    font-size: 6px;
  }

  #btm-tool {
    margin-bottom: 13em;
  }

}




/* Professional SEO Section Styles */
.seo-section {

  padding: 3rem 1rem;
  border-top: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  position: relative;
  overflow: hidden;
}

.seo-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;

}

.seo-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header Styles */
.seo-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.seo-title {
  font-size: 2rem;
  color: #2c3e50;
  margin: 0 0 1rem;

}

.seo-subtitle {
  font-size: 1.2rem;
  color: #5a6c7d;
  line-height: 1.6;
  max-width: 800px;
  margin: 0 auto;
  font-weight: 400;
}



/* FAQ Section */
.faq-section {
  margin-bottom: 3rem;
}

.faq-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  text-align: center;
  margin: 0 0 2rem;
  position: relative;
}

.faq-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
}

.faq-item {
  border: 2px solid #f1f5f9;
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  background: white;
}

.faq-item:hover {
  border-color: rgba(102, 126, 234, 0.3);
}

.faq-item.active {
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.faq-question {
  padding: .5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #fafbfc;
  transition: all 0.3s ease;
  user-select: none;
}

.faq-question:hover {
  background: #f0f4f8;
}

.faq-item.active .faq-question {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.faq-icon {
  font-size: 1.25rem;
  font-weight: bold;
  color: #667eea;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  background: white;
  color: #667eea;
  transform: rotate(45deg);
}

.faq-text {
  font-weight: 600;
  font-size: 1rem;
  color: #2c3e50;
  flex: 1;
}

.faq-item.active .faq-text {
  color: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  margin: 0;
  color: #5a6c7d;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Benefits Banner */
.benefits-banner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.benefits-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="30" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="90" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
  opacity: 0.3;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.benefit-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.benefit-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.benefit-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.benefit-content strong {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.benefit-content span {
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.2;
}

/* Hidden SEO Content */
.seo-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .seo-section {
    padding: 2rem 0.5rem;
  }

  .seo-title {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
  }

  .seo-subtitle {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .feature-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .feature-icon {
    font-size: 2.5rem;
    padding: 0.75rem;
    border-radius: 12px;
  }

  .feature-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  .feature-list li {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
  }

  .faq-section {
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
  }

  .faq-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .faq-question {
    padding: 1rem;
    gap: 0.75rem;
  }

  .faq-text {
    font-size: 0.95rem;
  }

  .faq-answer p {
    padding: 0 1rem 1rem;
    font-size: 0.9rem;
  }

  .benefits-banner {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .benefit-item {
    padding: 0.75rem;
    border-radius: 8px;
  }

  .benefit-icon {
    font-size: 1.5rem;
  }

  .benefit-content strong {
    font-size: 0.9rem;
  }

  .benefit-content span {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .seo-section {
    padding: 1.5rem 0.25rem;
  }

  .seo-header {
    margin-bottom: 2rem;
  }

  .seo-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .seo-subtitle {
    font-size: 0.95rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .feature-icon {
    font-size: 2rem;
    padding: 0.5rem;
  }

  .feature-title {
    font-size: 1.1rem;
  }

  .faq-section {
    padding: 1.25rem;
  }

  .faq-title {
    font-size: 1.3rem;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .benefit-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* Scroll animations */
.seo-section>* {
  animation: fadeInUp 0.6s ease-out forwards;
}

.seo-section>*:nth-child(2) {
  animation-delay: 0.1s;
}

.seo-section>*:nth-child(3) {
  animation-delay: 0.2s;
}

.seo-section>*:nth-child(4) {
  animation-delay: 0.3s;
}

/* Focus styles for accessibility */
.faq-question:focus {
  outline: 3px solid rgba(102, 126, 234, 0.5);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .feature-card {
    border: 2px solid #2c3e50;
  }

  .faq-item {
    border: 2px solid #2c3e50;
  }

  .benefits-banner {
    background: #2c3e50;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Chart Loading Overlay Styles */
.chart-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 5px;
  backdrop-filter: blur(2px);
}

.chart-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.chart-loading-content img {
  max-width: 40px;
  max-height: 40px;
  opacity: 0.8;
}

.chart-loading-content p {
  margin: 0;
  font-size: 12px;
  color: #666;
  font-family: 'Arial', sans-serif;
  font-weight: 500;
}

/* Loading animation for better UX */
.chart-loading-overlay {
  animation: fadeInOverlay 0.3s ease-in-out;
}

@keyframes fadeInOverlay {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive loading overlay */
@media (max-width: 600px) {
  .chart-loading-content img {
    max-width: 30px;
    max-height: 30px;
  }

  .chart-loading-content p {
    font-size: 11px;
  }
}

/* LDP Pro Glowing Highlight */
/* LDP Pro — animated "running" gradient border, no fill */
.ldp-pro-highlight {
  position: relative;
  z-index: 0;
  display: inline-flex;
  flex: 0 0 auto;
  align-self: center;
  padding: 0.26rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #5a3fa0 !important;
  background: transparent;
  transition: color 0.2s ease, transform 0.2s ease;
}

/* Animatable angle so the gradient spins WITHOUT moving the box (no poking
   corners). Older browsers ignore @property and show a static gradient border. */
@property --ldp-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* Conic gradient sits just behind the button... */
.ldp-pro-highlight::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -2;
  border-radius: 8px;
  background: conic-gradient(from var(--ldp-angle), #667eea, #764ba2, #f6d365, #667eea);
  animation: ldp-run 2.6s linear infinite;
}

/* ...and this mask hides its centre, leaving only a 2px running ring. */
.ldp-pro-highlight::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 6px;
  background: var(--color-white-100);
}

.ldp-pro-highlight:hover {
  transform: translateY(-1px);
  color: #764ba2 !important;
}

.ldp-pro-highlight i {
  color: #764ba2 !important;
}

@keyframes ldp-run {
  to { --ldp-angle: 360deg; }
}

/* Mobile: keep it a small inline pill inside the drawer (don't stretch full width) */
@media only screen and (max-width: 992px) {
  .ldp-pro-highlight {
    padding: 0.3rem 0.75rem;
    margin: 0.4rem 0;
    font-size: 0.82rem;
    align-self: flex-start;
  }
}
/* ===== Account switcher (top Account card popup) ===== */
.stat-card.switchable {
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.stat-card.switchable:hover {
  border-color: #406781;
  box-shadow: 0 2px 8px rgba(64, 103, 129, 0.18);
}

.stat-caret {
  margin-left: auto;
  color: #90a0ad;
  font-size: 1em;
  flex-shrink: 0;
}

.stat-card.switchable:hover .stat-caret {
  color: #406781;
}

.acct-sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 32, 0.28);
}

.acct-sw-pop {
  position: absolute;
  background: #ffffff;
  border: 1px solid #d9dee4;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  font-family: 'Arial', sans-serif;
  animation: acctSwIn 0.12s ease-out;
}

@keyframes acctSwIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.acct-sw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #5b6b7a;
  background: #f4f6f8;
  border-bottom: 1px solid #e6eaee;
}

.acct-sw-close {
  cursor: pointer;
  color: #97a3ae;
  padding: 2px 4px;
}
.acct-sw-close:hover { color: #d33; }

.acct-sw-list {
  max-height: 260px;
  overflow-y: auto;
  padding: 4px;
}

/* One compact line per account: dot · id · pill · balance · check */
.acct-sw-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.acct-sw-row:hover { background: #f0f4f8; }

.acct-sw-row.active {
  background: #eaf1f6;
}

.acct-sw-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.acct-sw-dot.real { background: #2ecc71; }
.acct-sw-dot.demo { background: #f39c12; }

.acct-sw-id {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1f2d3a;
  white-space: nowrap;
}

.acct-sw-pill {
  font-size: 0.54rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1px 5px;
  border-radius: 8px;
  color: #fff;
  flex-shrink: 0;
}
.acct-sw-pill.real { background: #2ecc71; }
.acct-sw-pill.demo { background: #f39c12; }

.acct-sw-bal {
  margin-left: auto;
  font-size: 0.7rem;
  color: #5f6f7c;
  font-family: monospace;
  white-space: nowrap;
}
.acct-sw-bal.muted { color: #9aa6b1; }

.acct-sw-check {
  color: #406781;
  font-size: 0.8rem;
  flex-shrink: 0;
  width: 0.9em;
  text-align: center;
}
.acct-sw-check.hidden { visibility: hidden; }

@media only screen and (max-width: 600px) {
  /* Card stacks into a centred column here — pin the caret to the right edge,
     vertically centred, so the "tap to switch" affordance survives without
     costing a row. */
  .stat-caret {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    margin: 0;
    font-size: 0.68rem;
    opacity: 0.8;
  }
  .acct-sw-id { font-size: 0.74rem; }
  .acct-sw-bal { font-size: 0.66rem; }
}

.acct-sw-loading {
  padding: 20px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: #46586a;
  font-family: 'Arial', sans-serif;
}
.acct-sw-loading .fa { margin-right: 6px; color: #406781; }

/* ===================================================================== */
/* Multi Shot — page components on top of the LDP theme                   */
/* ===================================================================== */

.ms-page {
  --ms-bg: #ffffff;
  --ms-surface: #ffffff;
  --ms-soft: #f6f8fa;
  --ms-border: #e3e7ec;
  --ms-border-strong: #cfd7df;
  --ms-text: #1f2d3a;
  --ms-label: #5b6b7a;
  --ms-muted: #8a99a8;
  --ms-brand: #406781;
  --ms-blue: #2980b9;
  --ms-green: #2e7d32;
  --ms-green-bg: #edf8ef;
  --ms-green-line: #a6dbb1;
  --ms-red: #c62828;
  --ms-red-bg: #fdf0f0;
  --ms-red-line: #f1b9b9;
  --ms-amber: #f39c12;
  --ms-radius: 10px;
  --ms-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.04);

  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: var(--ms-bg);
  color: var(--ms-text);
}

.ms-wrap {
  flex: 1 0 auto;
  width: 100%;
  /* Top spacing comes from the account bar's own padding, as on Dual Shot */
  padding: 0 clamp(10px, 1.6vw, 24px) 18px;
  text-align: left;
}

/* Same 15px base as Dual Shot and LDP (they get it from w3.css), so every
   rem-sized part of the page — the account row included — matches them. */
html,
body.ms-page {
  font-size: 15px;
}

/* Logo and the Account / Balance / Profit row come from the shared
   /css/account-theme.css with Dual Shot's markup, so they match it exactly. */

/* Footer closes the page at the bottom instead of floating over content */
.ms-page .site-footer-compact {
  position: relative;
  z-index: auto;
  flex-shrink: 0;
}

/* ----- Layout: markets + history filling the left, controls on the right ----- */
.ms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 12px;
  /* Dual Shot's account bar ends in 4em of padding and the next section pulls
     back 2.5em — the same 1.5em gap here */
  margin-top: -2.5em;
  align-items: stretch;
}

.ms-side,
.ms-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ms-side > :last-child,
.ms-main > :last-child {
  flex: 1 1 auto;
}

.ms-panel {
  min-width: 0;
  padding: 12px 14px;
  background: var(--ms-surface);
  border: 1px solid var(--ms-border);
  border-radius: var(--ms-radius);
  box-shadow: var(--ms-shadow);
}

.ms-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 24px;
  margin-bottom: 10px;
}

.ms-panel-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ms-label);
}

.ms-panel-title .fa {
  color: var(--ms-brand);
}

.ms-count {
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ms-muted);
}

.ms-sub {
  font-size: 0.7rem;
  color: var(--ms-muted);
  white-space: nowrap;
}

/* ----- Setup ----- */
.ms-fields {
  display: grid;
  gap: 10px;
}

.ms-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ms-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ms-muted);
}

.ms-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  background: #eceff3;
  border-radius: 9px;
}

.ms-seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 36px;
  padding: 4px 6px;
  font: inherit;
  color: var(--ms-label);
  background: transparent;
  border-radius: 7px;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.ms-seg button:hover:not(:disabled):not(.active) {
  color: var(--ms-text);
  background: rgba(255, 255, 255, 0.55);
}

.ms-seg button.active {
  color: #ffffff;
  background: var(--ms-brand);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
}

.ms-seg button:disabled { cursor: default; opacity: 0.6; }

.ms-seg-main {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.84rem;
  font-weight: 700;
}

.ms-seg-sub {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ms-muted);
}

.ms-seg button.active .ms-seg-sub { color: rgba(255, 255, 255, 0.82); }
.ms-seg button[data-mode="safe"]:not(.active) .fa { color: var(--ms-green); }
.ms-seg button[data-mode="high"]:not(.active) .fa { color: #e67e22; }

.ms-stepper {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 5px;
}

.ms-step {
  height: 38px;
  font-size: 0.8rem;
  color: var(--ms-label);
  background: #ffffff;
  border: 1px solid var(--ms-border);
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease, transform 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}

.ms-step:hover:not(:disabled) { color: var(--ms-text); background: var(--ms-soft); }
.ms-step:active:not(:disabled) { transform: scale(0.95); }
.ms-step:disabled { cursor: default; opacity: 0.5; }

.ms-stake-box { position: relative; }

.ms-stake-box input {
  width: 100%;
  height: 38px;
  padding: 0 42px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
  color: var(--ms-text);
  background: #ffffff;
  border: 1px solid var(--ms-border);
  border-radius: 8px;
  -moz-appearance: textfield;
  appearance: textfield;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.ms-stake-box input:focus {
  border-color: var(--ms-brand);
  box-shadow: 0 0 0 3px rgba(64, 103, 129, 0.15);
}

.ms-stake-box input:disabled { color: var(--ms-muted); background: var(--ms-soft); }

.ms-cur {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ms-muted);
  pointer-events: none;
}

.ms-hint {
  margin-top: 8px;
  font-size: 0.74rem;
  color: var(--ms-label);
}

.ms-hint strong { color: var(--ms-text); }

/* 2 × 2 figures; the 1px grid gap over a border-coloured background draws the
   dividers, so they stay right at any column count */
.ms-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 8px;
  overflow: hidden;
  background: var(--ms-border);
  border: 1px solid var(--ms-border);
  border-radius: 8px;
}

.ms-summary > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  padding: 6px 4px;
  background: var(--ms-soft);
}

.ms-warn {
  margin-top: 1px;
  font-size: 0.68rem;
  color: #b26a00;
}

.ms-warn .fa { margin-right: 3px; }

.ms-sum-key {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ms-muted);
  white-space: nowrap;
}

.ms-sum-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ms-text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ms-sum-val small {
  margin-left: 2px;
  font-size: 0.72em;
  font-weight: 600;
  color: var(--ms-muted);
}

.ms-note {
  margin-top: 6px;
  font-size: 0.7rem;
  color: var(--ms-muted);
}

.ms-note.err { color: var(--ms-red); }

.ms-pos { color: var(--ms-green) !important; }
.ms-neg { color: var(--ms-red) !important; }

/* ----- Auto-Fire ----- */
.ms-auto {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--ms-soft);
  border: 1px solid var(--ms-border);
  border-radius: 8px;
}

.ms-auto-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

/* Limits only appear while Auto-Fire is switched on (the hidden attribute
   has to beat the grid display below) */
.ms-limits[hidden] { display: none; }

.ms-limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.ms-limit {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ms-limit span {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ms-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-limit input {
  width: 100%;
  height: 30px;
  padding: 0 7px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ms-text);
  background: #ffffff;
  border: 1px solid var(--ms-border);
  border-radius: 7px;
  -moz-appearance: textfield;
  appearance: textfield;
}

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

.ms-limit input:focus {
  border-color: var(--ms-brand);
  box-shadow: 0 0 0 3px rgba(64, 103, 129, 0.15);
}

.ms-limit input::placeholder { font-weight: 600; color: #b4bec8; }

.ms-auto-run {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ms-label);
  font-variant-numeric: tabular-nums;
}

.ms-switch {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.ms-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ms-switch-track {
  position: absolute;
  inset: 0;
  background: #c7cfd6;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.ms-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.25);
  transition: transform 0.15s ease;
}

.ms-switch input:checked + .ms-switch-track { background: var(--ms-blue); }
.ms-switch input:checked + .ms-switch-track .ms-switch-thumb { transform: translateX(16px); }
.ms-switch input:focus-visible + .ms-switch-track { outline: 3px solid rgba(41, 128, 185, 0.35); outline-offset: 2px; }

.ms-auto-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.ms-auto-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ms-text);
}

.ms-auto-label .fa { margin-right: 4px; color: var(--ms-blue); }

.ms-auto-hint {
  font-size: 0.68rem;
  color: var(--ms-muted);
}

.ms-auto-hint.live { color: var(--ms-blue); font-weight: 600; }
.ms-auto-hint.hot { color: #b3542c; font-weight: 700; }

/* A subtle ring on the Basket panel while Auto-Fire is armed and watching */
.ms-setup-panel.is-armed {
  border-color: #a9cbe4;
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.12);
}

/* ----- Fire ----- */
.ms-fire-bar { margin-top: 10px; }

.ms-fire {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--ms-blue);
  border-radius: 9px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.1);
  transition: background 0.15s ease, transform 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}

.ms-fire span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ms-fire:hover:not(:disabled) { background: #2471a3; }
.ms-fire:active:not(:disabled) { transform: scale(0.985); }
.ms-fire:focus-visible { outline: 3px solid rgba(41, 128, 185, 0.35); outline-offset: 2px; }
.ms-fire:disabled { cursor: default; background: #a7bac9; }
.ms-fire.login { background: #2ea44f; }
.ms-fire.login:hover { background: #2c974b; }

/* ----- Markets ----- */
.ms-markets-panel {
  display: flex;
  flex-direction: column;
}

.ms-links { display: flex; gap: 5px; }

.ms-link {
  min-height: 26px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ms-brand);
  background: var(--ms-soft);
  border: 1px solid var(--ms-border);
  border-radius: 7px;
}

.ms-link:hover:not(:disabled) { background: #eaf0f5; }
.ms-link:disabled { cursor: default; opacity: 0.5; }

.ms-grid {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: minmax(94px, 1fr);
  gap: 8px;
}

.ms-mkt {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px 9px;
  background: #ffffff;
  border: 1px solid var(--ms-border);
  border-radius: 9px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ms-mkt:hover { border-color: var(--ms-border-strong); }
.ms-grid.is-locked .ms-mkt { cursor: default; }

.ms-mkt-box {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ms-mkt-head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ms-check {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  font-size: 9px;
  color: #ffffff;
  background: #ffffff;
  border: 1.5px solid #c3ccd6;
  border-radius: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.ms-check .fa { opacity: 0; }

.ms-mkt-box:checked + .ms-mkt-head .ms-check {
  background: var(--ms-brand);
  border-color: var(--ms-brand);
}

.ms-mkt-box:checked + .ms-mkt-head .ms-check .fa { opacity: 1; }

.ms-mkt-box:focus-visible + .ms-mkt-head .ms-check {
  box-shadow: 0 0 0 3px rgba(64, 103, 129, 0.3);
}

.ms-mkt-name {
  flex: 1;
  min-width: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ms-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ms-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  background: #c9d1d9;
  border-radius: 50%;
}

.ms-mkt[data-q="ready"] .ms-dot { background: #2ecc71; }
.ms-mkt[data-q="wait"] .ms-dot { background: var(--ms-amber); animation: ms-pulse 1.2s ease-in-out infinite; }
.ms-mkt[data-q="err"] .ms-dot { background: #e05555; }
.ms-mkt[data-q="busy"] .ms-dot { background: var(--ms-blue); }

@keyframes ms-pulse {
  50% { opacity: 0.3; }
}

.ms-mkt-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ms-mkt-digit {
  font-family: Consolas, 'SFMono-Regular', 'Roboto Mono', Menlo, monospace;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1;
  color: #29abe2;
  font-variant-numeric: tabular-nums;
}

.ms-mkt-digit.lose { color: #d0103a; }

.ms-mark {
  display: grid;
  place-items: center;
  font-size: 1.95rem;
  line-height: 1;
}

.ms-mark i { transition: opacity 0.2s ease, transform 0.2s ease; }
.ms-mark i.ms-mark-out { opacity: 0; transform: scale(0.6); }
.ms-mark .fa-check-circle { color: var(--ms-green); animation: ms-pop 0.28s ease-out; }
.ms-mark .fa-times-circle { color: var(--ms-red); animation: ms-pop 0.28s ease-out; }
.ms-mark .fa-circle-o-notch { font-size: 0.7em; color: var(--ms-blue); }
.ms-mark .fa-ban { font-size: 0.8em; color: #9aa6b1; }

@keyframes ms-pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

.ms-mkt.res-buying,
.ms-mkt.res-open { background: #f4f9fd; border-color: #a9cbe4; }
.ms-mkt.res-won { background: var(--ms-green-bg); border-color: var(--ms-green-line); }
.ms-mkt.res-lost { background: var(--ms-red-bg); border-color: var(--ms-red-line); }
.ms-mkt.is-off { opacity: 0.5; background: var(--ms-soft); }
.ms-mkt.is-off .ms-mkt-digit,
.ms-mkt.is-err .ms-mkt-digit { color: #b4bec8; }

/* ----- Last basket ----- */
.ms-res {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ms-res-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ms-res-pl {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ms-text);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ms-badges { display: flex; gap: 5px; }

.ms-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 46px;
  justify-content: center;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.ms-badge.won { color: var(--ms-green); background: var(--ms-green-bg); }
.ms-badge.lost { color: var(--ms-red); background: var(--ms-red-bg); }

.ms-legs {
  display: flex;
  gap: 3px;
  min-height: 5px;
}

.ms-legs span {
  flex: 1 1 0;
  height: 5px;
  background: var(--ms-border);
  border-radius: 3px;
}

.ms-legs span.won { background: #2ecc71; }
.ms-legs span.lost { background: #e05555; }
.ms-legs span.buying,
.ms-legs span.open { background: #8bbfe3; }
.ms-legs span.failed { background: #c3ccd4; }

.ms-res-sub {
  font-size: 0.72rem;
  color: var(--ms-muted);
}

/* ----- History ----- */
.ms-history-panel {
  display: flex;
  flex-direction: column;
}

.ms-table-wrap {
  flex: 1 1 auto;
  min-height: 120px;
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--ms-border);
  border-radius: 8px;
}

.ms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.ms-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 10px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ms-label);
  background: var(--ms-soft);
  border-bottom: 1px solid var(--ms-border);
}

.ms-table td {
  padding: 6px 10px;
  color: var(--ms-text);
  white-space: nowrap;
  border-bottom: 1px solid #eef1f4;
}

.ms-table tbody tr:hover td { background: #fafbfc; }
.ms-table td small { color: var(--ms-muted); }
.ms-table .ms-muted { color: var(--ms-muted); }

.ms-table th:last-child,
.ms-table td:last-child {
  text-align: right;
  font-weight: 700;
}

.ms-table .ms-empty td {
  padding: 22px 10px;
  text-align: center;
  font-weight: 400;
  color: var(--ms-muted);
  border-bottom: 0;
}

.ms-table .ms-empty:hover td { background: transparent; }

/* ----- FAQ dialog ----- */
.ms-faq-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  overflow: auto;
  background: rgba(15, 23, 32, 0.5);
}

.ms-faq-box {
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  margin: 5% auto;
  padding: 20px;
  overflow-y: auto;
  text-align: left;
  background: #ffffff;
  border-radius: 14px;
}

.ms-faq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ms-faq-head h3 { font-size: 1.15rem; color: #333; }
.ms-faq-head button { padding: 0 4px; font-size: 24px; line-height: 1; color: #666; }

/* ----- Tablet: one column, setup fields side by side ----- */
@media (max-width: 1023px) {
  .ms-layout { grid-template-columns: minmax(0, 1fr); }
  .ms-side,
  .ms-main { display: contents; }
  .ms-setup-panel { order: 1; }
  .ms-markets-panel { order: 2; }
  .ms-result-panel { order: 3; }
  .ms-history-panel { order: 4; }
  .ms-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ms-grid { grid-auto-rows: minmax(88px, auto); }
  /* The Basket panel spans the full width here — the figures fit in one row */
  .ms-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ----- Phone: app-style, thumb-reachable Fire button ----- */
@media (max-width: 760px) {
  /* Reserve the fixed Fire bar's height so the last content and the footer
     always end above it instead of sliding underneath. */
  .ms-page {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .ms-wrap {
    padding: 0 10px 12px;
  }

  .ms-layout { gap: 10px; }
  .ms-panel { padding: 11px 12px; }
  .ms-panel-head { margin-bottom: 9px; }

  /* Direction and mode side by side, stake across the full width */
  .ms-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 7px; }
  .ms-fields > .ms-field:last-child { grid-column: 1 / -1; }
  .ms-seg button { min-height: 40px; padding: 3px; }
  .ms-seg-main { font-size: 0.84rem; }
  .ms-seg-sub { display: none; }
  .ms-stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .ms-step,
  .ms-stake-box input { height: 42px; }
  .ms-stake-box input { font-size: 1rem; }
  .ms-hint { margin-top: 8px; }
  .ms-auto { margin-top: 8px; padding: 8px 9px; }
  .ms-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-limit input { height: 36px; font-size: 1rem; }

  /* All markets visible at once: compact 4-column grid */
  .ms-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 5px;
  }

  .ms-mkt { gap: 3px; padding: 7px 6px 8px; border-radius: 9px; }
  .ms-mkt-head { gap: 4px; }
  .ms-check { display: none; }
  .ms-mkt-name { font-size: 0.68rem; }
  .ms-dot { width: 6px; height: 6px; }
  .ms-mkt-body { gap: 2px; }
  .ms-mkt-digit { font-size: 1.5rem; }
  .ms-mark { font-size: 1.25rem; }
  .ms-mkt.is-off { border-style: dashed; }

  .ms-res-pl { font-size: 1.55rem; }

  .ms-fire-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    margin: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--ms-border);
    box-shadow: 0 -6px 18px rgba(16, 24, 40, 0.06);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
  }

  .ms-fire { min-height: 48px; font-size: 0.96rem; }

  .ms-table th,
  .ms-table td { padding: 6px 8px; }
  .ms-hide-sm { display: none; }
  .ms-table-wrap { min-height: 0; }
}

/* Very narrow phones: two market columns so names stay readable */
@media (max-width: 359px) {
  .ms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ms-fields { grid-template-columns: minmax(0, 1fr); }
}
