:root {
  --bg: #050000;
  --text: #f2ede8;
  --muted: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(255, 255, 255, 0.035);
  --gold: #ffd700;
  --orange: #ff6b35;
  --green: #4ade80;
  --red: #f87171;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --font-ui: "Space Grotesk", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-tech: "Orbitron", "DIN Alternate", "Arial Narrow", var(--font-ui);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

input {
  border: 0;
  outline: 0;
}

#app {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--bg);
}

.bg-radial,
.bg-grid {
  position: fixed;
  inset: 0;
  width: min(100%, 480px);
  margin: 0 auto;
  pointer-events: none;
}

.bg-radial {
  background:
    radial-gradient(ellipse 100% 62% at 50% 0%, rgba(255, 215, 0, 0.075), transparent 62%),
    radial-gradient(ellipse 70% 44% at 12% 74%, rgba(255, 107, 53, 0.065), transparent 55%),
    radial-gradient(ellipse 80% 80% at 88% 18%, rgba(167, 139, 250, 0.05), transparent 55%);
}

.bg-grid {
  opacity: 0.7;
  background-image:
    linear-gradient(rgba(255, 215, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.035) 1px, transparent 1px);
  background-size: 40px 40px;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  background: rgba(5, 0, 0, 0.86);
  backdrop-filter: blur(18px);
}

#app.trade-home .top-nav {
  display: none;
}

.nav-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 32px;
  line-height: 1;
}

.nav-back.hidden {
  display: none;
}

.gold-sphere {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 32% 28%, #fff8c9 0%, #ffd700 32%, #a76a00 70%, #392400 100%);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.42);
}

.top-nav h1 {
  font-family: var(--font-tech);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.top-nav p {
  margin-top: 2px;
  color: rgba(255, 215, 0, 0.52);
  font-size: 9px;
  letter-spacing: 1px;
}

.wallet-pill {
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.08);
  color: rgba(255, 215, 0, 0.78);
  font-family: var(--font-tech);
  font-size: 9px;
}

#main {
  position: relative;
  z-index: 1;
  padding-bottom: 24px;
}

.page {
  display: none;
  flex-direction: column;
  gap: 16px;
  min-height: calc(100vh - 56px);
  padding: 14px 16px 24px;
  animation: pageIn 0.24s ease-out;
}

#app.trade-home .page {
  min-height: 100vh;
}

.page.active {
  display: flex;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glass {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.trade-head {
  padding-top: 8px;
}

.trade-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.trade-title-row h1 {
  font-size: 22px;
  font-weight: 950;
}

.race-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffae11 0%, #ff7a1f 42%, #ff3349 100%);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(255, 79, 42, 0.22);
}

.race-btn span {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
}

.race-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-head-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.head-action {
  height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 950;
}

.head-action-outline {
  border: 1px solid rgba(255, 215, 0, 0.34);
  background: rgba(255, 215, 0, 0.055);
  color: var(--gold);
}

.head-action-filled {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #1a0a00;
}

.stake-countdown {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  margin: 0 -16px;
  padding: 0 16px;
  border-top: 1px solid rgba(255, 215, 0, 0.08);
  border-bottom: 1px solid rgba(255, 215, 0, 0.08);
  background: rgba(255, 215, 0, 0.035);
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.countdown-chips {
  display: flex;
  gap: 6px;
}

.countdown-chips b {
  min-width: 36px;
  padding: 6px 5px;
  border-radius: 7px;
  background: rgba(255, 215, 0, 0.08);
  color: var(--gold);
  text-align: center;
  font-size: 11px;
}

.kline-card {
  overflow: hidden;
}

.kline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 8px;
}

.kline-symbol {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btc-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f7931a, #ff6b35);
  box-shadow: 0 0 12px rgba(247, 147, 26, 0.38);
  font-weight: 900;
}

.kline-header h2 {
  font-family: var(--font-tech);
  font-size: 13px;
}

.kline-header p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
}

.price-box {
  text-align: right;
}

.price-box strong {
  display: block;
  color: var(--green);
  font-family: var(--font-tech);
  font-size: 18px;
}

.price-box span {
  color: var(--green);
  font-size: 11px;
}

.score-track {
  height: 5px;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

#scoreFill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.25s ease, background 0.25s ease;
}

#marketChart {
  display: block;
  width: 100%;
  height: 252px;
  background: #080b10;
}

.kline-card {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(6, 10, 17, 0.88);
}

.asset-board {
  padding: 14px 16px;
  border-color: rgba(255, 215, 0, 0.13);
  background: rgba(255, 215, 0, 0.04);
}

.asset-board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.asset-board-head h2,
.list-card h2,
.section-kicker {
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--font-tech);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 800;
}

.asset-board-head p {
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
}

.asset-board-head strong,
.score-node.active {
  color: var(--gold);
}

.asset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.asset-cell {
  min-height: 94px;
  padding: 14px;
  border-radius: 12px;
}

.asset-cell-gold {
  border: 1px solid rgba(255, 215, 0, 0.16);
  background: rgba(255, 215, 0, 0.06);
}

.asset-cell-orange {
  border: 1px solid rgba(255, 107, 53, 0.16);
  background: rgba(255, 107, 53, 0.06);
}

.asset-cell p {
  color: rgba(255, 255, 255, 0.44);
  font-size: 11px;
}

.asset-cell strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-tech);
  font-size: 25px;
  line-height: 1;
}

.score-cell-line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.score-cell-line strong {
  margin-top: 0;
}

.score-cell-line button {
  min-width: 48px;
  height: 26px;
  border: 1px solid rgba(255, 215, 0, 0.36);
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.08);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.asset-cell span {
  display: block;
  margin-top: 6px;
  font-size: 10px;
}

.asset-cell-gold strong,
.asset-cell-gold span {
  color: var(--gold);
}

.asset-cell-orange strong,
.asset-cell-orange span {
  color: var(--orange);
}

.score-progress {
  margin-top: 18px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 215, 0, 0.06);
}

.score-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 12px;
}

.score-progress-head span:last-child {
  color: var(--gold);
  font-family: var(--font-tech);
  font-size: 12px;
  font-weight: 900;
}

.score-track {
  position: relative;
  height: 8px;
  margin: 0 4px;
  overflow: visible;
}

#scoreFill {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--orange), var(--gold));
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

.milestone-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 9px;
}

.score-node {
  position: relative;
  color: rgba(255, 255, 255, 0.28);
  text-align: center;
  font-family: var(--font-tech);
  font-size: 10px;
}

.score-node::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -17px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #44413c;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.score-node.reached::before {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.65);
}

.trade-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.trade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  border-radius: 10px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.trade-btn i {
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
  font-style: normal;
}

.trade-btn i svg {
  width: 30px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trade-btn strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 950;
}

.trade-btn span {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  opacity: 0.62;
}

.trade-up {
  border: 0;
  background: linear-gradient(90deg, #16bc55, #20cf62);
  color: #fff;
}

.trade-down {
  border: 0;
  background: linear-gradient(90deg, #ed252c, #ff3e42);
  color: #fff;
}

.trade-btn.active {
  transform: scale(0.98);
}

.trade-btn.predicting {
  box-shadow: 0 0 22px currentColor;
  filter: brightness(1.15);
}

.trade-btn:disabled {
  cursor: not-allowed;
}

.trade-btn.locked {
  opacity: 0.72;
}

.predict-note {
  margin-top: -7px;
  color: rgba(255, 255, 255, 0.42);
  text-align: center;
  font-size: 12px;
}

.list-card {
  padding: 14px 16px;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-head button {
  padding: 5px 12px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.07);
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.history-list,
.stake-records {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.stake-record {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 12px;
}

.history-item {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-item.win {
  border-color: rgba(74, 222, 128, 0.14);
}

.history-item.lose {
  border-color: rgba(248, 113, 113, 0.14);
}

.history-item.pending {
  border-color: rgba(255, 215, 0, 0.14);
}

.history-dir {
  display: grid;
  place-items: center;
  width: 46px;
  height: 36px;
  border-radius: 7px;
  font-weight: 900;
}

.history-dir.up {
  background: rgba(74, 222, 128, 0.15);
  color: var(--green);
}

.history-dir.down {
  background: rgba(248, 113, 113, 0.15);
  color: var(--red);
}

.history-title,
.stake-record strong {
  font-size: 13px;
  font-weight: 800;
}

.history-time,
.stake-record p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 10px;
}

.history-prices {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 10px;
}

.history-score {
  margin-left: auto;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  font-family: var(--font-tech);
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
}

.history-score.win {
  background: rgba(74, 222, 128, 0.14);
  color: var(--green);
}

.history-score.lose {
  color: var(--red);
}

.history-score.pending {
  color: var(--gold);
}

.history-score small {
  display: block;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
}

.balance-hero,
.avail-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 92px;
  padding: 16px;
  border-color: rgba(255, 215, 0, 0.15);
  background: rgba(255, 215, 0, 0.04);
}

.avail-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.avail-bar > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.08);
}

.avail-bar > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
  text-align: left;
}

.avail-bar strong {
  margin-top: 0;
  font-size: 16px;
}

.balance-hero {
  justify-content: flex-start;
  gap: 12px;
}

.token-bubble {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff8c9, #ffd700 38%, #8d5b00 100%);
  color: #1a0a00;
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.3);
}

.balance-hero p,
.avail-bar span,
.form-head,
.preview-row span {
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

.balance-hero strong,
.avail-bar strong {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-family: var(--font-tech);
  font-size: 18px;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.mode-tabs button {
  height: 40px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.48);
  font-weight: 900;
}

.mode-tabs button.active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 107, 53, 0.12));
  color: var(--gold);
}

.form-panel {
  padding: 16px;
}

.form-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.form-head label,
.form-head b {
  color: rgba(255, 255, 255, 0.62);
}

.gold-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  height: 64px;
  border: 1px solid rgba(255, 215, 0, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.gold-input-wrap:focus-within {
  border-color: rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.12);
}

.gold-input-wrap input {
  min-width: 0;
  padding: 0 18px;
  background: transparent;
  color: white;
  font-family: var(--font-tech);
  font-size: 21px;
  font-weight: 800;
}

.gold-input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.gold-input-wrap span {
  padding-right: 18px;
  color: var(--gold);
  font-family: var(--font-tech);
  font-weight: 900;
}

.error-msg {
  min-height: 18px;
  margin-top: 7px;
  color: var(--red);
  font-size: 11px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.quick-grid button {
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 800;
}

.quick-grid button.active {
  border-color: rgba(255, 215, 0, 0.42);
  background: rgba(255, 215, 0, 0.09);
  color: var(--gold);
}

.info-panel {
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12px;
  line-height: 1.85;
}

.confirm-btn {
  display: block;
  width: 100%;
  min-height: 58px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 950;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.confirm-btn.active,
.confirm-btn:not(.inactive) {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #1a0a00;
  box-shadow: 0 12px 34px rgba(255, 107, 53, 0.18);
}

.confirm-btn.inactive {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.38);
  cursor: not-allowed;
}

.success-card {
  padding: 22px 18px;
  border-radius: 18px;
  text-align: center;
}

.success-card.hidden,
.hidden {
  display: none !important;
}

.success-green {
  border: 1px solid rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.055);
}

.success-orange {
  border: 1px solid rgba(255, 107, 53, 0.3);
  background: rgba(255, 107, 53, 0.055);
}

.success-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.08);
  color: var(--gold);
  font-size: 26px;
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.18);
}

.success-card h2 {
  color: white;
  font-size: 18px;
}

.success-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.soft-btn {
  margin-top: 18px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 900;
}

.soft-btn.green {
  background: rgba(74, 222, 128, 0.12);
  color: var(--green);
}

.soft-btn.orange {
  background: rgba(255, 107, 53, 0.12);
  color: var(--orange);
}

.section-kicker {
  margin-bottom: 12px;
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.period-card {
  position: relative;
  min-height: 120px;
  padding: 16px 8px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.period-card:active {
  transform: scale(0.98);
}

.period-card.selected-blue {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(96, 165, 250, 0.08);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.12);
}

.period-card.selected-purple {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.12);
}

.period-card.selected-gold {
  border-color: rgba(255, 215, 0, 0.38);
  background: rgba(255, 215, 0, 0.08);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.14);
}

.recommend {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #1a0a00;
  font-size: 8px;
  font-weight: 950;
  white-space: nowrap;
}

.period-card h3 {
  font-family: var(--font-tech);
  font-size: 20px;
  line-height: 1;
}

.period-card p {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 10px;
}

.ratio-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-tech);
  font-size: 10px;
  font-weight: 900;
}

.period-card.selected-blue h3,
.period-card.selected-blue .ratio-badge {
  color: var(--blue);
}

.period-card.selected-purple h3,
.period-card.selected-purple .ratio-badge {
  color: var(--purple);
}

.period-card.selected-gold h3,
.period-card.selected-gold .ratio-badge,
.period-card.selected-gold p {
  color: var(--gold);
}

.rules-card {
  padding: 14px 16px;
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.52);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.rule-name {
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
}

.rule-dot {
  width: 7px;
  height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 9px currentColor;
}

.rule-ratio {
  font-family: var(--font-tech);
  font-size: 11px;
  font-weight: 900;
}

.rule-lock {
  margin-left: 7px;
  color: rgba(255, 255, 255, 0.28);
  font-size: 9px;
}

.rule-row[data-tone="blue"] .rule-ratio,
.rule-row[data-tone="blue"] .rule-dot {
  color: var(--blue);
}

.rule-row[data-tone="purple"] .rule-ratio,
.rule-row[data-tone="purple"] .rule-dot {
  color: var(--purple);
}

.rule-row[data-tone="gold"] .rule-ratio,
.rule-row[data-tone="gold"] .rule-dot {
  color: var(--gold);
}

.rule-row.active[data-tone="blue"] {
  border-color: rgba(96, 165, 250, 0.24);
  background: rgba(96, 165, 250, 0.08);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.04);
}

.rule-row.active[data-tone="purple"] {
  border-color: rgba(167, 139, 250, 0.24);
  background: rgba(167, 139, 250, 0.08);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.04);
}

.rule-row.active[data-tone="gold"] {
  border-color: rgba(255, 215, 0, 0.24);
  background: rgba(255, 215, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.04);
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 215, 0, 0.16);
  border-radius: 12px;
  background: rgba(255, 215, 0, 0.06);
}

.preview-row strong {
  color: var(--gold);
  font-family: var(--font-tech);
}

.detail-card {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 11px;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-row strong {
  color: white;
  font-family: var(--font-tech);
}

.stake-record {
  border: 1px solid rgba(167, 139, 250, 0.18);
  background: rgba(167, 139, 250, 0.05);
}

.unlock-btn {
  padding: 7px 12px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  font-weight: 900;
}

.unlock-btn.ready {
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  color: white;
}

.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 50;
  display: none;
  transform: translateX(-50%);
}

.toast.show {
  display: block;
  animation: toastIn 0.24s ease-out;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.toast-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 230px;
  padding: 12px 18px;
  border-radius: 999px;
  backdrop-filter: blur(16px);
}

.toast-inner.win,
.toast-inner.success {
  border: 1px solid rgba(74, 222, 128, 0.38);
  background: rgba(74, 222, 128, 0.14);
}

.toast-inner.lose,
.toast-inner.error {
  border: 1px solid rgba(248, 113, 113, 0.38);
  background: rgba(248, 113, 113, 0.14);
}

.toast-inner.info {
  border: 1px solid rgba(255, 215, 0, 0.34);
  background: rgba(255, 215, 0, 0.12);
}

.toast-inner strong {
  display: block;
  font-size: 13px;
}

.toast-inner p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  width: min(100%, 360px);
  padding: 26px 20px 20px;
  border: 1px solid rgba(255, 215, 0, 0.22);
  border-radius: 20px;
  background: #120b07;
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 24px;
}

.modal-card h2 {
  color: var(--gold);
}

.action-modal-card h2 {
  color: white;
}

.modal-card p {
  margin: 8px 0 18px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 13px;
}

.action-modal-card .detail-card {
  margin-bottom: 18px;
}

@media (min-width: 481px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 215, 0, 0.08), transparent 34%),
      #020000;
  }

  #app {
    min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 24px 90px rgba(0, 0, 0, 0.55);
  }
}
