:root {
  color-scheme: dark;
  --body: #000;
  --wrapper: 95%;
  --wrapper-max: 1525px;
  --purple: #4d2f5d;
  --purple-dark: #311d3c;
  --panel: #1f1f1f;
  --panel-mid: #252525;
  --row: #303030;
  --row-alt: #343434;
  --row-border-top: #3c3c3c;
  --row-border-bottom: #1d1d1d;
  --field: #2a2a2a;
  --field-border: #222;
  --text: #cecece;
  --white: #fff;
  --muted: #ababab;
  --dim: #717171;
  --green: #0f0;
  --red: #c00;
  --no: #a63d3d;
  --yes: #457245;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #000 url("/market-space-bg.jpg") no-repeat center top fixed;
  background-size: cover;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--white);
  background: transparent;
  font-family: Verdana, Arial, Sans-Serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body::before {
  content: none;
}

a {
  color: var(--white);
  text-decoration: none;
}

a:hover {
  color: var(--green);
}

button,
input,
select,
textarea {
  font-family: Verdana, Arial, Sans-Serif;
}

button,
input.button,
a.primary,
a.ghost,
.header-link {
  min-height: 29px;
  border: 1px solid #555;
  border-radius: 0;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d4d4d4;
  background: #2d2d2d;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 1px 1px 1px #000;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

button:hover:not(:disabled),
a.primary:hover,
a.ghost:hover,
.header-link:hover {
  color: var(--green);
  background: var(--purple);
  border-color: var(--purple);
}

button.danger {
  color: #ffdada;
  border-color: #7a3434;
  background: #4a2020;
}

button.danger:hover:not(:disabled) {
  color: #fff;
  border-color: #ff7272;
  background: #7a2a2a;
}

button.warning {
  color: #f2d06b;
  border-color: #8a6d24;
  background: #3a321d;
}

button.warning:hover:not(:disabled) {
  color: #fff3bf;
  border-color: #f2d06b;
  background: #5a4820;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.primary,
.ghost {
  width: auto;
}

.compact {
  min-height: 27px;
  padding: 5px 9px;
}

.full {
  width: 100%;
}

.clear {
  clear: both;
}

#container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrapper,
.hf-wrap {
  width: var(--wrapper);
  max-width: var(--wrapper-max);
  margin: auto;
}

#panel {
  display: block;
  margin: auto;
  width: calc(95% - 50px);
  max-width: var(--wrapper-max);
}

#panel .upper {
  padding: 8px 20px;
  clear: both;
  color: var(--white);
  font-size: 13px;
}

#panel .upper .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.oc-time {
  order: 2;
  color: #c1c1c1;
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

.welcome {
  order: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c1c1c1;
  font-size: 11px;
  text-transform: uppercase;
  min-width: 0;
}

.user-chip {
  display: inline-block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  color: var(--green);
}

#panel .lower {
  min-height: 31px;
  background: #1d1d1d;
  color: var(--dim);
  border-top: 1px solid #272727;
  border-bottom: 1px solid #080808;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  padding: 5px 20px;
}

#panel .lower .wrapper {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-nav-lower .clear {
  display: none;
}

.menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu li {
  display: inline-block;
  margin-right: 12px;
}

.panel_links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  float: none;
  margin-left: -20px;
  font-size: 12px;
}

.user_links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 2px 14px;
  float: none;
  font-size: 12px;
  margin-right: 5px;
}

#panel .lower .menu li {
  margin-right: 0;
}

.panel_links a,
.panel_links span,
.user_links span {
  color: var(--dim);
  font-size: 11px;
  line-height: 20px;
  text-shadow: 1px 1px 1px #000;
  white-space: nowrap;
}

.panel_links a:hover {
  color: var(--green);
}

.api-online {
  color: var(--green) !important;
}

.drop-toggle {
  color: #aaa !important;
}

.page-content {
  padding: 16px 0 35px;
  position: relative;
}

.hf-ad-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  max-width: 960px;
  margin: 0 auto 12px;
}

.hf-ad-strip a {
  display: block;
  width: 468px;
  max-width: calc(50% - 6px);
  background: #000;
  border-top: 1px solid #b7af95;
  border-bottom: 1px solid #0c0c0c;
  transition: border-color 0.15s ease, filter 0.15s ease;
}

.hf-ad-strip a:hover {
  border-top-color: var(--green);
  filter: brightness(1.12);
}

.hf-ad-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 468 / 60;
}

.forum-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 10px 0 16px;
  text-align: center;
}

.forum-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 138px;
  padding: 0 14px;
  color: #efefef;
  background: #252525;
  border: 1px solid #222;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 1px 1px 1px #000;
  white-space: nowrap;
  transition:
    color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.forum-tabs button:hover {
  color: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.22);
}

.forum-tabs button.active {
  color: var(--green);
  background: var(--purple);
  animation: activeTabGlow 2.8s ease-in-out infinite;
}

.tab-panel {
  min-width: 0;
}

.tborder,
.forum-section {
  width: 100%;
  margin: 0 0 18px;
  padding: 3px;
  background: #181818;
  border: 1px solid #141414;
  border-radius: 6px;
  box-shadow:
    0 0 0 1px rgba(77, 47, 93, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.38);
}

.thead {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  color: var(--white);
  background: linear-gradient(180deg, #5a376d 0%, #452956 100%);
  border-top: 1px solid #6b4580;
  border-bottom: 1px solid #171717;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  font-size: 14px;
  word-break: normal;
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 1px #000;
  position: relative;
  overflow: hidden;
}

.thead::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -120px;
  width: 90px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  animation: theadSweep 7s linear infinite;
}

.thead strong {
  font-size: 16px;
  line-height: 1.25;
}

.tcat {
  color: var(--white);
  background: var(--panel);
  border-top: 1px solid var(--panel);
  border-bottom: 1px solid var(--row-border-bottom);
}

.trow1,
.trow2 {
  background: var(--row);
  border-top: 1px solid var(--row-border-top);
  border-bottom: 1px solid var(--row-border-bottom);
  color: var(--text);
}

.trow2 {
  background: var(--row-alt);
}

.tfoot {
  color: #f7f7f7;
  background: var(--panel);
  border-top: 1px solid var(--panel);
}

.section-foot {
  min-height: 30px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
}

.smalltext,
small,
.tinytext {
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #555;
  color: #deabab;
  background: #2d2d2d;
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
  text-shadow: 1px 1px 1px #000;
}

.status-pill.on {
  color: var(--green);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.18);
}

.forum-columns,
.market-table-head {
  display: grid;
  align-items: center;
  padding: 6px 10px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.2;
  background: #202020;
  border-bottom: 1px solid #161616;
}

.account-columns {
  grid-template-columns: minmax(0, 1fr) 150px 150px 150px;
}

.market-table-head {
  grid-template-columns: minmax(0, 1fr) 90px 90px 190px;
}

.account-columns span:nth-child(n + 2),
.market-table-head span:nth-child(2),
.market-table-head span:nth-child(3) {
  text-align: center;
}

.market-table-head span:nth-child(4) {
  text-align: right;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 150px 150px;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: var(--row);
}

.account-copy,
.stat-box {
  padding: 10px;
  border-right: 1px solid #252525;
  min-width: 0;
}

.account-copy strong,
.account-copy span,
.stat-box strong,
.stat-box span {
  display: block;
}

.account-copy strong {
  color: var(--white);
  font-size: 15px;
}

.account-copy span {
  margin-top: 4px;
  color: var(--text);
}

.stat-box strong {
  color: var(--white);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.stat-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.account-tools {
  padding: 10px;
  background: var(--row-alt);
  border-top: 1px solid var(--row-border-top);
}

.auth-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.auth-box .primary {
  justify-self: end;
}

.auth-box strong,
.auth-box span {
  display: block;
}

.auth-box span {
  margin-top: 3px;
  color: var(--text);
}

.wallet-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.wallet-controls form {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(120px, 1fr) minmax(86px, auto);
  gap: 7px;
  align-items: center;
  min-width: 0;
}

label {
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

input,
select,
textarea {
  width: 100%;
  min-height: 35px;
  padding: 8px;
  color: #eeeeee;
  background: #242424;
  border: 1px solid var(--field-border);
  border-radius: 0;
  outline: none;
  font-size: 13px;
  line-height: 1.2;
  min-width: 0;
}

.wallet-controls button,
.create-form > button.full {
  min-height: 35px;
}

select {
  border-color: #555;
  color: #d4d4d4;
  font-size: 12px;
}

textarea {
  min-height: 78px;
  resize: vertical;
  color: #cecece;
  font-size: 15px;
  line-height: 1.4;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

.market-stack {
  display: block;
}

.market-card {
  display: grid;
  grid-template-columns: 56px minmax(260px, 1fr) 90px 90px 190px;
  gap: 0;
  align-items: stretch;
  padding: 0;
  cursor: pointer;
  background: var(--row);
  transition:
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.market-card:hover,
.market-card.selected {
  background: #393939;
  filter: brightness(1.04);
}

.market-card.selected {
  outline: 1px solid rgba(0, 255, 0, 0.65);
  outline-offset: -1px;
  box-shadow: inset 3px 0 0 var(--green);
}

.forum-status {
  width: 36px;
  height: 36px;
  align-self: center;
  justify-self: center;
  border-radius: 4px;
  background:
    linear-gradient(180deg, #555, #252525);
  border: 1px solid #171717;
  position: relative;
}

.forum-status::after {
  content: "?";
  position: absolute;
  inset: 4px;
  display: grid;
  place-items: center;
  color: #d8d8ff;
  background: #4d4d74;
  border-radius: 3px;
  font-weight: 700;
}

.forum-status.hot::after {
  content: "!";
  color: var(--green);
  background: #172617;
  animation: statusBlink 1.8s steps(2, end) infinite;
}

.market-card-main {
  min-width: 0;
  padding: 10px;
  border-left: 1px solid #252525;
  border-right: 1px solid #252525;
}

.market-card h3 {
  margin: 0;
  color: var(--white);
  font-size: 15px;
  line-height: 1.24;
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 1px #000;
}

.uid-inline {
  color: var(--muted);
  font-size: 0.86em;
  font-weight: 700;
}

.market-card-main p {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.featured {
  color: var(--green);
}

.subforums {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  color: var(--text);
  font-size: 13px;
}

.status-dot {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 8px rgba(0, 255, 0, 0.45);
  animation: statusDot 2.2s ease-in-out infinite;
}

.forum-stat,
.last-post {
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 10px 8px;
  border-right: 1px solid #252525;
  text-align: center;
  line-height: 1.25;
}

.forum-stat strong {
  color: var(--white);
  font-size: 16px;
}

.forum-stat span,
.last-post span,
.last-post small {
  color: var(--muted);
  font-size: 12px;
}

.yes-stat strong {
  color: var(--green);
}

.no-stat strong {
  color: #ee7676;
}

.last-post {
  justify-items: end;
  text-align: right;
}

.last-post strong {
  color: var(--white);
  font-size: 13px;
}

.countdown-pill {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 4px 6px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  position: relative;
  overflow: hidden;
  color: var(--text);
  background: #1d1d1d;
  border: 1px solid #444;
  font-size: 11px;
  line-height: 1.1;
  text-shadow: 1px 1px 1px #000;
}

.countdown-pill span {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.countdown-pill strong {
  color: var(--white);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.last-post .countdown-pill {
  justify-self: end;
  margin-top: 2px;
}

.detail-countdown,
.history-countdown,
.admin-countdown {
  justify-self: start;
}

.market-detail dd .countdown-pill {
  justify-self: end;
}

.countdown-pill.warning {
  border-color: #8a6d24;
  background: linear-gradient(180deg, #2c291b 0%, #1f1f1f 100%);
  box-shadow: inset 0 0 10px rgba(255, 194, 41, 0.1);
}

.countdown-pill.warning span,
.countdown-pill.warning strong {
  color: #f2d06b;
}

.countdown-pill.final {
  border-color: var(--green);
  color: var(--green);
  background:
    linear-gradient(180deg, rgba(0, 255, 0, 0.16), rgba(0, 0, 0, 0.18)),
    #111;
  box-shadow:
    0 0 12px rgba(0, 255, 0, 0.28),
    inset 0 0 14px rgba(0, 255, 0, 0.16);
  animation: countdownFinalPulse 0.7s ease-in-out infinite;
}

.countdown-pill.final::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: translateX(-120%);
  animation: countdownScan 0.9s linear infinite;
}

.countdown-pill.final span,
.countdown-pill.final strong {
  color: var(--green);
}

.countdown-pill.final strong {
  animation: countdownDigitKick 0.5s steps(2, end) infinite;
}

.countdown-pill.due {
  border-color: #8f3030;
  background: #241818;
}

.countdown-pill.due span,
.countdown-pill.due strong {
  color: #ee7676;
}

.split-bar {
  width: min(380px, 100%);
  height: 5px;
  display: flex;
  overflow: hidden;
  margin-top: 8px;
  background: #111;
}

.split-bar .yes-fill {
  width: var(--yes-width);
  background: #00b500;
  transition: width 0.35s ease;
  animation: yesPulse 3.6s ease-in-out infinite;
}

.split-bar .no-fill {
  flex: 1;
  background: #ff2121;
  animation: noPulse 3.6s ease-in-out infinite;
}

.empty {
  display: block;
  padding: 16px;
  color: var(--text);
  background: var(--row);
  border: 1px dashed #555;
  text-align: center;
}

.empty-market-row {
  cursor: default;
}

.empty-market-row:hover {
  background: var(--row);
}

.external-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.external-intro strong,
.external-intro span {
  display: block;
  min-width: 0;
}

.external-intro strong {
  color: var(--white);
  font-size: 15px;
}

.external-intro span {
  margin-top: 4px;
  color: var(--text);
  line-height: 1.45;
}

.external-actions,
.external-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.external-provider-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  padding: 0;
  background: #171717;
}

.external-provider-tabs button {
  min-width: 150px;
  min-height: 36px;
  border-color: #252525;
  background: #252525;
}

.external-provider-tabs button.active {
  color: var(--green);
  background: var(--purple);
  box-shadow: inset 0 -2px 0 var(--green);
}

.external-feed {
  min-height: 160px;
  background: var(--row);
}

.external-state {
  padding: 18px;
  color: var(--text);
  background: var(--row);
  text-align: center;
}

.external-state.loading {
  color: var(--green);
  background: #202020;
  border-bottom: 1px solid #252525;
  animation: statusBlink 1.8s steps(2, end) infinite;
}

.external-state.error {
  color: #ee7676;
}

.external-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #252525;
}

.external-card {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  background: #303030;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.external-card:hover {
  background: #393939;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 0, 0.22);
}

.external-card-loading {
  pointer-events: none;
  opacity: 0.78;
}

.external-card-loading h3,
.external-card-loading p,
.external-card-loading .external-odds,
.external-card-loading .split-bar {
  animation: skeletonPulse 1.4s ease-in-out infinite;
}

.external-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.provider-badge {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid currentColor;
  color: #d5b6e5;
  background: #1d1d1d;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.provider-badge.polymarket {
  color: #7dc2ff;
}

.provider-badge.kalshi {
  color: var(--green);
}

.external-card h3 {
  margin: 0;
  color: var(--white);
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow: 1px 1px 1px #000;
}

.external-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.external-odds,
.external-local-pool,
.external-payout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.external-odds div,
.external-local-pool div,
.external-payout {
  padding: 8px;
  background: #282828;
  border: 1px solid #555;
}

.external-odds .yes {
  border-color: #00b500;
}

.external-odds .no {
  border-color: #ff2121;
}

.external-odds strong,
.external-local-pool strong,
.external-payout strong {
  display: block;
  color: var(--white);
  font-size: 16px;
}

.external-odds span,
.external-local-pool span,
.external-payout span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.external-local-pool {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.external-local-pool div:first-child {
  border-color: #00b500;
}

.external-local-pool div:nth-child(2) {
  border-color: #ff2121;
}

.external-payout {
  grid-template-columns: minmax(0, 1fr);
}

.external-stake-form {
  display: grid;
  gap: 8px;
}

.external-stake-form label {
  display: grid;
  gap: 5px;
}

.external-card-actions button.yes,
.external-card-actions button.no {
  min-height: 34px;
  display: inline-flex;
}

.external-auth-note {
  color: var(--muted);
  font-size: 11px;
}

.external-meta {
  display: grid;
  gap: 0;
  margin: 0;
  border: 1px solid #252525;
}

.external-meta div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 7px;
  background: #333;
  border-bottom: 1px solid #1d1d1d;
}

.external-meta div:last-child {
  border-bottom: 0;
}

.external-meta dd {
  text-align: right;
}

.external-card-actions {
  justify-content: stretch;
}

.external-card-actions a,
.external-card-actions button {
  flex: 1 1 145px;
}

.example-title {
  min-height: 45px;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #252525;
}

.example-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  min-width: 0;
  background: var(--row);
  position: relative;
  overflow: hidden;
  transition:
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.example-card:hover {
  background: #383838;
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 0, 0.3);
}

.example-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -130px;
  width: 90px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  opacity: 0;
}

.example-card:hover::after {
  opacity: 1;
  animation: cardSweep 1.2s ease;
}

.example-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  border: 1px solid #171717;
  transition:
    border-color 0.18s ease,
    filter 0.18s ease,
    transform 0.18s ease;
}

.example-card:hover img {
  border-color: rgba(0, 255, 0, 0.55);
  filter: brightness(1.08) contrast(1.04);
}

.example-card div {
  display: grid;
  gap: 3px;
}

.example-card span {
  color: #d5b6e5;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.example-card strong {
  color: var(--white);
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: break-word;
  text-shadow: 1px 1px 1px #000;
}

.example-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.utility-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr) minmax(0, 0.85fr);
  gap: 18px;
}

.utility-grid .forum-section .trow1 {
  padding: 10px;
}

.market-detail {
  display: grid;
  gap: 10px;
}

.detail-head {
  display: grid;
  gap: 6px;
}

.detail-head h3 {
  margin: 0;
  color: var(--white);
  font-size: 15px;
}

.market-code,
.deadline-pill {
  display: inline-flex;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  padding: 3px 6px;
  color: var(--green);
  background: #1f1f1f;
  border: 1px solid #333;
  font-size: 11px;
}

.market-detail p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.market-detail dl {
  display: grid;
  margin: 0;
  border: 1px solid #252525;
}

.market-detail dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px;
  background: #333;
  border-bottom: 1px solid #1d1d1d;
}

.market-detail dl div:last-child {
  border-bottom: 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 0;
  color: var(--white);
  text-align: right;
  overflow-wrap: anywhere;
}

.odds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.odds-grid div,
.quote {
  padding: 8px;
  background: #282828;
  border: 1px solid #555;
}

.odds-grid .yes {
  border-color: #00b500;
}

.odds-grid .no {
  border-color: #ff2121;
}

.odds-grid strong {
  display: block;
  color: var(--white);
  font-size: 17px;
}

.odds-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.stake-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, auto) minmax(88px, auto);
  gap: 8px;
  align-items: end;
}

.payout-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  color: var(--text);
  background: #202020;
  border: 1px solid #444;
  font-size: 12px;
}

.payout-preview strong,
.payout-preview span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.payout-preview strong {
  color: var(--white);
}

.payout-preview span:last-child {
  grid-column: 1 / -1;
  color: var(--muted);
}

.stake-amount {
  display: grid;
  gap: 5px;
}

button.yes,
button.no {
  min-height: 50px;
  display: grid;
  gap: 3px;
}

button.yes {
  background: var(--yes);
  border-color: var(--yes);
  color: var(--white);
}

button.no {
  background: var(--no);
  border-color: var(--no);
  color: var(--white);
}

.position-list,
.resolved-list {
  display: grid;
  gap: 8px;
}

.position-row,
.resolved-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: #282828;
  border: 1px solid #252525;
}

.history-section .thead span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.history-head,
.history-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.45fr) minmax(110px, 0.5fr) minmax(120px, 0.55fr) minmax(105px, 0.45fr) minmax(210px, 0.8fr);
  align-items: stretch;
}

.history-head {
  gap: 0;
}

.history-head span {
  min-width: 0;
}

.history-list {
  display: grid;
}

.history-row {
  border-top: 1px solid var(--row-border-top);
  border-bottom: 1px solid var(--row-border-bottom);
  cursor: pointer;
}

.history-row:hover,
.history-row.selected {
  background: #393939;
}

.history-row > div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid #252525;
}

.history-row > div:last-child {
  border-right: 0;
}

.history-main {
  display: grid;
  gap: 5px;
}

.history-main h3 {
  margin: 0;
  color: var(--white);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.history-status,
.history-creator,
.history-pool,
.history-dates {
  display: grid;
  align-content: center;
  gap: 4px;
}

.status-badge {
  width: max-content;
  max-width: 100%;
  padding: 3px 7px;
  border: 1px solid currentColor;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.no,
.status-badge.due,
.status-badge.refunded {
  color: #ee7676;
}

.status-badge.refunded {
  color: #f2d06b;
}

.status-badge.open {
  color: var(--green);
}

.history-pool strong {
  color: var(--white);
}

.history-status small,
.history-creator small,
.history-pool small,
.history-dates small,
.history-dates span {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.trade-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.positions-section .position-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faq-section .thead span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.faq-list {
  display: grid;
}

.faq-row {
  padding: 14px;
  border-top: 1px solid var(--row-border-top);
  border-bottom: 1px solid var(--row-border-bottom);
}

.faq-row h3 {
  margin: 0 0 6px;
  color: var(--white);
  font-size: 15px;
}

.faq-row p {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.resolved-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.position-row span,
.resolved-row span {
  min-width: 42px;
  padding: 3px 6px;
  border: 1px solid currentColor;
  color: var(--green);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.position-row .no,
.resolved-row .no {
  color: #ee7676;
}

.position-row strong,
.resolved-row strong {
  color: var(--white);
}

.position-row small,
.resolved-row small,
.resolved-row strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.position-row small b {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.thread-link,
.member-link {
  color: var(--white);
  text-decoration: none;
}

.thread-link:hover,
.member-link:hover {
  color: var(--green);
}

.risk-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid currentColor;
  color: #f2d06b;
  background: #1d1d1d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.risk-badge.low {
  color: var(--green);
}

.risk-badge.high {
  color: #ee7676;
}

.admin-head,
.admin-market-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
}

.admin-list {
  display: grid;
}

.admin-market-row {
  gap: 0;
  align-items: stretch;
  border-top: 1px solid var(--row-border-top);
  border-bottom: 1px solid var(--row-border-bottom);
}

.admin-market-row > div {
  min-width: 0;
  padding: 10px;
  border-right: 1px solid #252525;
}

.admin-market-row > div:last-child {
  border-right: 0;
}

.admin-market-summary {
  display: grid;
  align-content: start;
  gap: 8px;
}

.admin-market-summary strong,
.admin-market-summary small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-market-fields {
  display: grid;
  gap: 8px;
}

.admin-settlement-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.settlement-badge {
  display: inline-grid;
  gap: 2px;
  max-width: 100%;
  min-height: 27px;
  align-content: center;
  padding: 4px 8px;
  border: 1px solid currentColor;
  background: #202020;
  color: #f2d06b;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  text-shadow: 1px 1px 1px #000;
}

.settlement-badge strong,
.settlement-badge small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.settlement-badge strong {
  font-size: 11px;
  letter-spacing: 0;
}

.settlement-badge small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
}

.settlement-badge.paid {
  color: var(--green);
  background: #122312;
  box-shadow: inset 0 0 0 1px rgba(0, 255, 0, 0.12), 0 0 9px rgba(0, 255, 0, 0.14);
}

.settlement-badge.problem {
  color: #ff7272;
  background: #2a1717;
  box-shadow: inset 0 0 0 1px rgba(255, 114, 114, 0.12), 0 0 9px rgba(255, 114, 114, 0.13);
}

.settlement-badge.pending {
  color: #f2d06b;
  background: #262315;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.audit-trail {
  display: grid;
  gap: 1px;
  background: #252525;
  border: 1px solid #252525;
}

.audit-trail div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 6px 7px;
  background: #242424;
}

.audit-trail strong,
.audit-trail small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.audit-trail strong {
  color: var(--white);
  font-size: 11px;
}

.audit-trail small {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.empty-audit {
  padding: 7px;
  color: var(--muted);
  background: #242424;
  font-size: 11px;
}

.admin-ban-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
  gap: 12px;
}

.admin-ban-form {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ban-list {
  display: grid;
  gap: 1px;
  background: #252525;
}

.ban-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  background: var(--row);
}

.ban-row strong,
.ban-row small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ban-row small {
  color: var(--muted);
  font-size: 11px;
}

.create-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr);
  gap: 1px;
  padding: 0;
  background: #252525;
}

.create-layout > div {
  min-width: 0;
  padding: 10px;
  background: var(--row);
}

.inline-heading {
  margin: -10px -10px 10px;
  padding: 8px 10px;
  font-weight: 700;
}

.type-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.type-chip {
  min-height: 80px;
  display: grid;
  align-content: start;
  justify-content: stretch;
  gap: 4px;
  padding: 10px;
  color: var(--text);
  text-align: left;
  background: #282828;
  border: 1px solid #222;
  white-space: normal;
}

.type-chip:hover:not(:disabled) {
  border-color: var(--purple);
}

.type-chip.selected {
  border-color: var(--green);
  box-shadow: inset 3px 0 0 var(--green);
}

.type-chip span {
  color: #d5b6e5;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.type-chip strong {
  color: var(--white);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.type-chip small {
  color: var(--muted);
  font-size: 10px;
}

.type-chip span,
.type-chip strong,
.type-chip small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.create-form {
  display: grid;
  gap: 10px;
}

.create-form label {
  display: grid;
  gap: 5px;
}

.template-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, auto);
  align-items: center;
  gap: 10px;
  padding: 9px;
  background: #282828;
  border: 1px solid #555;
}

.template-note strong,
.template-note small,
.template-note > span {
  display: block;
  min-width: 0;
}

.template-note small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.template-note > span {
  color: #d5b6e5;
  font-size: 11px;
  text-align: right;
  overflow-wrap: anywhere;
}

.uid-resolver {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px;
  color: var(--muted);
  background: #242424;
  border: 1px solid #252525;
  font-size: 12px;
  line-height: 1.35;
}

.uid-resolver.resolved {
  color: var(--text);
  border-color: #457245;
}

.uid-resolver.loading {
  color: #d5b6e5;
}

.uid-resolver.error {
  color: #deabab;
  border-color: #6d3333;
}

.uid-resolver span {
  color: var(--green);
  font-weight: 700;
}

.uid-resolver a,
.member-link {
  color: var(--white);
  font-weight: 700;
}

.uid-resolver a:hover,
.member-link:hover {
  color: var(--green);
  text-decoration: underline;
}

.uid-resolver small {
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  background: #252525;
}

.stats-row span {
  display: block;
  min-width: 0;
  padding: 10px;
  background: rgba(51, 51, 51, 0.92);
  color: var(--text);
}

.stats-row strong {
  color: var(--white);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  padding: 10px 12px;
  color: var(--white);
  background: #457245;
  border: 1px solid #0f0;
}

.toast.error {
  background: #a63d3d;
  border-color: #ff2121;
}

.error-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
}

#footer {
  clear: both;
  justify-content: flex-end;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

#footer .upper {
  padding: 5px 18px;
  overflow: hidden;
  background: #1f1f1f;
  border-top: 1px solid #0c0c0c;
  border-bottom: 1px solid #151414;
  font-size: 15px;
}

#footer .upper ul.bottom_links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 15px;
  float: none;
  margin: 3px 0 0;
}

#footer .upper li {
  display: inline;
  margin: 0;
}

#footer .lower {
  padding: 12px 17px;
  color: #9c9c9c;
  background: #333;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25px;
  text-transform: uppercase;
}

.footer-disclaimer {
  max-width: 980px;
  margin: 0 0 10px;
  padding: 8px 0 8px 12px;
  color: #c5c5c5;
  border-left: 3px solid var(--purple);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
}

#footer a:hover {
  color: var(--green);
  text-decoration: underline;
}

@keyframes activeTabGlow {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(0, 255, 0, 0);
  }

  50% {
    box-shadow: 0 0 16px rgba(0, 255, 0, 0.26);
  }
}

@keyframes theadSweep {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(1800px);
  }
}

@keyframes cardSweep {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(800px);
  }
}

@keyframes statusDot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.72;
    transform: scale(0.88);
  }
}

@keyframes statusBlink {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.45);
  }
}

@keyframes yesPulse {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.28);
  }
}

@keyframes noPulse {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(0.82);
  }
}

@keyframes countdownFinalPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }

  50% {
    transform: translateY(-1px) scale(1.03);
    filter: brightness(1.45);
  }
}

@keyframes countdownDigitKick {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(1px);
  }
}

@keyframes countdownScan {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes skeletonPulse {
  0%,
  100% {
    filter: brightness(0.9);
  }

  50% {
    filter: brightness(1.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1275px) {
  #panel {
    width: calc(95% - 50px);
    max-width: 1150px;
  }

  .wrapper,
  .hf-wrap {
    width: 95%;
    max-width: 1200px;
  }

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

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

  .utility-grid,
  .trade-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .positions-section .position-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 968px) {
  #panel .lower .wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .menu li {
    margin-right: 8px;
  }

  .panel_links {
    display: flex;
    gap: 2px 12px;
    margin-left: 0;
    margin-bottom: 5px;
  }

  .hf-ad-strip {
    flex-wrap: wrap;
  }

  .hf-ad-strip a {
    max-width: min(468px, 100%);
  }

  .user_links {
    display: flex;
    justify-content: flex-start;
    gap: 2px 12px;
    margin-right: 0;
  }

  .account-columns {
    display: none;
  }

  .account-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-copy {
    grid-column: 1 / -1;
    border-bottom: 1px solid #252525;
  }

  .wallet-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .market-table-head {
    display: none;
  }

  .history-head {
    display: none;
  }

  .history-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-head {
    display: none;
  }

  .admin-market-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-ban-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-market-row > div {
    border-right: 0;
    border-bottom: 1px solid #252525;
  }

  .admin-market-row > div:last-child {
    border-bottom: 0;
  }

  .history-row > div {
    border-right: 0;
    border-bottom: 1px solid #252525;
  }

  .history-row > div:last-child {
    border-bottom: 0;
  }

  .market-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .forum-stat,
  .last-post {
    grid-column: 2;
    display: flex;
    justify-content: space-between;
    text-align: left;
    justify-items: stretch;
    border-left: 1px solid #252525;
  }

  .create-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    font-size: 13px;
  }

  .wrapper,
  .hf-wrap {
    width: 100%;
  }

  #panel {
    width: 100%;
  }

  #panel .upper {
    padding: 8px;
  }

  #panel .upper .wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .oc-time,
  .welcome {
    order: initial;
  }

  .welcome {
    justify-content: stretch;
  }

  .welcome .header-link {
    width: 100%;
  }

  #panel .lower {
    padding: 8px;
  }

  .page-content {
    padding-top: 8px;
  }

  .forum-tabs {
    padding: 0 5px;
  }

  .forum-tabs button {
    min-width: 0;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .thead {
    min-height: 39px;
    padding: 10px;
  }

  .thead strong {
    font-size: 14px;
  }

  .tborder,
  .forum-section {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .account-row,
  .example-grid,
  .external-grid,
  .external-intro,
  .external-local-pool,
  .type-board,
  .form-row,
  .stake-form,
  .payout-preview,
  .auth-box,
  .template-note,
  .stats-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-copy,
  .stat-box {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid #252525;
  }

  .wallet-controls form {
    grid-template-columns: minmax(0, 1fr);
  }

  .market-card h3 {
    font-size: 14px;
  }

  .subforums,
  .market-card-main p {
    font-size: 12px;
  }

  .last-post {
    justify-content: start;
    gap: 10px;
  }

  .template-note span {
    text-align: left;
  }

  .external-actions {
    justify-content: stretch;
  }

  .external-actions a,
  .external-actions button,
  .external-provider-tabs button {
    width: 100%;
  }

  .section-foot {
    display: grid;
    justify-content: stretch;
  }

  .audit-trail div {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-trail small {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .welcome {
    display: grid;
    gap: 6px;
    align-items: start;
  }

  .panel_links li:nth-child(n + 7) {
    display: none;
  }

  input,
  select,
  textarea {
    font-size: 12px;
  }
}
