:root {
  --bg: #0e1421;
  --bg-2: #131b2a;
  --card: #182233;
  --card-2: #1d283b;
  --border: #263349;
  --text: #e6edf3;
  --muted: #8b98a8;
  --muted-2: #5f6c7e;
  --green: #4cd787;
  --red: #f0616b;
  --blue: #2f80ed;
  --yellow: #e2b93b;
  --orange: #e2853b;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #0e1421;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(14, 20, 33, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #263349;
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.brand .logo {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2f80ed, #1652f0);
  border-radius: 7px;
  font-size: 15px;
}

.search {
  flex: 1;
  position: relative;
  max-width: 560px;
}
.search input {
  width: 100%;
  background: #131b2a;
  border: 1px solid #263349;
  border-radius: 10px;
  color: #e6edf3;
  padding: 11px 14px 11px 38px;
  font-size: 14px;
  outline: none;
}
.search input::placeholder {
  color: #5f6c7e;
}
.search .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #5f6c7e;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #8b98a8;
  font-size: 11px;
  cursor: pointer;
}
.nav-item:hover {
  color: #e6edf3;
}
.nav-item .n-icon {
  font-size: 16px;
}

.btn-login {
  color: #2f80ed;
  font-weight: 600;
  cursor: pointer;
}

.btn-play {
  background: linear-gradient(135deg, #27ae60, #34c56f);
  color: #05130b;
  font-weight: 800;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-play:hover {
  filter: brightness(1.06);
}

.btn-signup {
  background: #1652f0;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
}
.btn-signup:hover {
  filter: brightness(1.08);
}

.cats {
  border-bottom: 1px solid #263349;
}
.cats-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 44px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cats-inner::-webkit-scrollbar {
  display: none;
}

.cat {
  color: #8b98a8;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  font-size: 13px;
  padding-bottom: 2px;
}
.cat:hover {
  color: #e6edf3;
}
.cat.live {
  color: #d3454f;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cat.live::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d3454f;
  box-shadow: 0 0 0 3px rgba(211, 69, 79, 0.25);
}
.cat.active {
  color: #e6edf3;
  border-bottom: 2px solid #2f80ed;
}

.heroes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 16px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
  max-width: 70%;
}
.hero p {
  margin: 3px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 70%;
}
.hero .pill {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.hero .emoji {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 46px;
  opacity: 0.9;
}
.hero.h1 {
  background: linear-gradient(120deg, #3b4d8f, #6d7bbd);
}
.hero.h2 {
  background: linear-gradient(120deg, #c1414b, #e07a63);
}
.hero.h3 {
  background: linear-gradient(120deg, #6b3fa0, #b06bd6);
}
.hero.h4 {
  background: linear-gradient(120deg, #1f8f7a, #37c39b);
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar {
  display: none;
}

.chip {
  background: #182233;
  border: 1px solid #263349;
  color: #8b98a8;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.chip:hover {
  color: #e6edf3;
  border-color: #35455e;
}
.chip.top {
  color: #2f80ed;
  border-color: rgba(47, 128, 237, 0.4);
  background: rgba(47, 128, 237, 0.08);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chip.search-chip {
  color: #5f6c7e;
  min-width: 180px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.mcard {
  background: #182233;
  border: 1px solid #263349;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.mcard:hover {
  border-color: #3a4b66;
  transform: translateY(-2px);
}
.mcard-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.mcard-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: #1d283b;
}
.mcard-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.mcard-donut {
  margin-left: auto;
  text-align: center;
}
.mcard-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #263349;
  color: #8b98a8;
  font-size: 12px;
}
.mcard-foot .vol {
  color: #8b98a8;
}
.mcard-foot .spacer {
  margin-left: auto;
}

.donut {
  width: 46px;
  height: 46px;
  position: relative;
}
.donut .lbl {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.sub {
  font-size: 10px;
  color: #8b98a8;
  margin-top: 2px;
}

.outcome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 7px 0;
}
.outcome .name {
  font-size: 13px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.outcome .pct {
  font-size: 13px;
  font-weight: 700;
  width: 42px;
  text-align: right;
}

.yn {
  display: flex;
  gap: 5px;
}
.yn button {
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  cursor: pointer;
}
.yn .yes {
  background: rgba(39, 174, 96, 0.16);
  color: #4cd787;
}
.yn .yes:hover {
  background: #27ae60;
  color: #fff;
}
.yn .no {
  background: rgba(211, 69, 79, 0.16);
  color: #f0616b;
}
.yn .no:hover {
  background: #d3454f;
  color: #fff;
}

.bigbuy {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.bigbuy button {
  flex: 1;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.bigbuy .yes {
  background: rgba(39, 174, 96, 0.15);
  color: #4cd787;
}
.bigbuy .yes:hover {
  background: #27ae60;
  color: #fff;
}
.bigbuy .no {
  background: rgba(211, 69, 79, 0.15);
  color: #f0616b;
}
.bigbuy .no:hover {
  background: #d3454f;
  color: #fff;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin: 34px 0 16px;
}

.detail {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin: 10px 0 40px;
  background: #182233;
  border: 1px solid #263349;
  border-radius: 14px;
  padding: 20px;
}

.d-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.d-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: #1d283b;
}

.d-title {
  font-size: 20px;
  font-weight: 700;
}

.d-meta {
  display: flex;
  gap: 16px;
  color: #8b98a8;
  font-size: 12px;
  margin-top: 6px;
}

.d-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  color: #8b98a8;
}

.d-ranges {
  display: flex;
  gap: 8px;
  margin: 16px 0 6px;
}

.d-range {
  background: #1d283b;
  border: 1px solid #263349;
  color: #8b98a8;
  border-radius: 18px;
  padding: 6px 13px;
  font-size: 12px;
  cursor: pointer;
}
.d-range.active {
  background: #fff;
  color: #0e1421;
  font-weight: 700;
  border-color: #fff;
}

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
  font-size: 12px;
  color: #8b98a8;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.chart-wrap {
  position: relative;
}
.chart-wrap svg {
  width: 100%;
  height: 240px;
  display: block;
  overflow: visible;
}
.chart-wrap .grid-line {
  stroke: #20293a;
  stroke-width: 1;
}
.chart-wrap .axis-label {
  fill: #5f6c7e;
  font-size: 11px;
}
.chart-wrap .series-line {
  fill: none;
  stroke-width: 2;
}
.chart-wrap .series-dot {
  stroke: none;
}
.chart-wrap .hover-line {
  stroke: #3a4b66;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}
.chart-wrap .tooltip {
  position: absolute;
  pointer-events: none;
  background: #131b2a;
  border: 1px solid #263349;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: #e6edf3;
  transform: translate(-50%, -110%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s;
  z-index: 5;
}
.chart-wrap .tooltip .row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chart-wrap .tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.timebtns {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.timebtns button {
  background: transparent;
  border: none;
  color: #8b98a8;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.timebtns button.active {
  background: #1d283b;
  color: #e6edf3;
}

.outcome-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  border-top: 1px solid #263349;
  margin-top: 16px;
  padding-top: 16px;
}
.outcome-bar .headline .lbl {
  font-weight: 700;
  font-size: 15px;
}
.outcome-bar .headline .vol {
  color: #8b98a8;
  font-size: 12px;
  margin-top: 2px;
}
.outcome-bar .chance {
  font-size: 32px;
  font-weight: 800;
}
.outcome-bar .buttons {
  display: flex;
  gap: 8px;
}
.outcome-bar .buttons button {
  border: none;
  border-radius: 8px;
  font-weight: 700;
  padding: 12px 18px;
  cursor: pointer;
}
.outcome-bar .buy-yes {
  background: #27ae60;
  color: #fff;
}
.outcome-bar .buy-no {
  background: #d3454f;
  color: #fff;
}

.trade {
  background: #1d283b;
  border: 1px solid #263349;
  border-radius: 12px;
  padding: 16px;
  align-self: start;
  position: sticky;
  top: 78px;
}
.trade-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.trade-head .ti {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #182233;
  font-size: 17px;
}
.trade-head .tt {
  font-weight: 700;
  font-size: 14px;
}
.trade-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #263349;
  padding-bottom: 10px;
  margin-bottom: 16px;
}
.trade-tab {
  color: #8b98a8;
  font-weight: 600;
  cursor: pointer;
}
.trade-tab.active {
  color: #e6edf3;
}
.trade-tab.active.buy {
  border-bottom: 2px solid #e6edf3;
  padding-bottom: 10px;
  margin-bottom: -11px;
}
.trade-market {
  margin-left: auto;
  color: #8b98a8;
  font-size: 12px;
  cursor: pointer;
}
.trade-btn {
  width: 100%;
  background: #2f80ed;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 13px;
  border-radius: 9px;
  cursor: pointer;
}
.trade-btn:hover {
  filter: brightness(1.08);
}

.yn-big {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.yn-big button {
  flex: 1;
  border-radius: 8px;
  padding: 13px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #263349;
  background: #182233;
  color: #e6edf3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.yn-big .yes.sel {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}
.yn-big .no.sel {
  background: #d3454f;
  border-color: #d3454f;
  color: #fff;
}

.amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.amount-row .lbl {
  color: #8b98a8;
  font-weight: 600;
}
.amount-row .val {
  font-size: 30px;
  font-weight: 800;
}

.quick {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.quick button {
  flex: 1;
  background: #182233;
  border: 1px solid #263349;
  color: #8b98a8;
  border-radius: 7px;
  padding: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.quick button:hover {
  color: #e6edf3;
  border-color: #35455e;
}

.terms {
  text-align: center;
  color: #5f6c7e;
  font-size: 11px;
  margin-top: 12px;
}
.terms a {
  color: #8b98a8;
  text-decoration: underline;
}

.related {
  margin-top: 18px;
  border-top: 1px solid #263349;
  padding-top: 14px;
}
.related-tabs {
  display: flex;
  gap: 14px;
  color: #8b98a8;
  font-size: 12px;
  margin-bottom: 12px;
}
.related-tabs .active {
  color: #e6edf3;
  font-weight: 700;
}
.related-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.related-item .ri {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #182233;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.related-item .rt {
  font-size: 12px;
  color: #8b98a8;
  line-height: 1.3;
  flex: 1;
}
.related-item .rp {
  font-weight: 700;
  font-size: 13px;
}

.mcard {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.mcard:hover {
  border-color: #35455e;
  transform: translateY(-2px);
}
.mcard.selected {
  border-color: #2f80ed;
  box-shadow: inset 0 0 0 1px #2f80ed;
}

.related-item {
  cursor: pointer;
}

.related-item:hover .rt {
  color: #e6edf3;
}

.d-actions a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.market-about {
  border-top: 1px solid #263349;
  margin-top: 16px;
  padding-top: 16px;
}
.market-about .about-head {
  font-size: 13px;
  font-weight: 700;
  color: #8b98a8;
  margin-bottom: 8px;
}
.market-about .about-summary {
  font-size: 14px;
  line-height: 1.55;
  color: #e6edf3;
  margin: 0 0 14px;
}

.study-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #1d283b;
  border: 1px solid #263349;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #e6edf3;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.study-link .ext {
  color: #8b98a8;
}
.study-link:hover {
  border-color: #2f80ed;
  color: #fff;
}
.study-link:hover .ext {
  color: #fff;
}

footer {
  border-top: 1px solid #263349;
  color: #5f6c7e;
  font-size: 12px;
  padding: 24px 0;
  text-align: center;
}

.state-msg {
  color: #8b98a8;
  text-align: center;
  padding: 40px 0;
  font-size: 14px;
}
.state-msg.error {
  color: #f0616b;
}

@media (max-width: 980px) {
  .heroes {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail {
    grid-template-columns: 1fr;
  }
  .trade {
    position: static;
  }
}
@media (max-width: 620px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .heroes {
    grid-template-columns: 1fr;
  }
  .nav-actions .nav-item {
    display: none;
  }
}