:root {
  --lime: #d8fd57;
  --lime-2: #b9c57d;
  --lime-light: #edf8b9;
  --lime-text: #d7ff35;
  --lime-bright: #e5ff4d;
  --lime-soft: #ebff84;
  --icon-lime: #ccff00;
  --violet: #8b4ce1;
  --violet-tab: #7b61ff;
  --violet-glow: #6f32a8;
  --violet-dim: #2b143b;
  --scene: #0a070e;
  --topbar: #050505;
  --panel-bg: rgba(8, 7, 13, 0.3);
  --panel-line: #222129;
  --input-bg: #08070d;
  --btn-2: #19181e;
  --box-bg: #111016;
  --panel: rgba(9, 8, 14, 0.76);
  --panel-2: rgba(25, 23, 30, 0.78);
  --line: rgba(169, 143, 205, 0.22);
  --line-strong: rgba(183, 164, 210, 0.48);
  --muted: #717076;
  --muted-2: #96939e;
  --muted-3: #636074;
  --white: #ffffff;
  --dark: #0a070e;
  --green: #30cf97;
  --red: #f0485f;
  --font: "Space Mono", "Courier New", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Syncopate", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #050407;
  color: var(--white);
  font-family: var(--font);
  letter-spacing: 0;
}
body { overflow-x: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }

#viewport {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1920px;
  transform-origin: top left;
}
#pageSpacer { width: 1px; height: 1707px; }

.app {
  position: relative;
  width: 1920px;
  min-height: 1707px;
  overflow: hidden;
  background:
    radial-gradient(900px 760px at 84% 8%, rgba(111, 50, 168, 0.42), rgba(111, 50, 168, 0) 62%),
    radial-gradient(820px 660px at 2% 96%, rgba(216, 253, 87, 0.16), rgba(216, 253, 87, 0) 60%),
    var(--scene);
}
.app.is-auto { min-height: 1986px; }

.topbar {
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 58px;
  background: #030305;
  border-bottom: 1px solid #191520;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-weight: 900;
  font-size: 35px;
  letter-spacing: 3px;
}
.hex {
  display: inline-block;
  background: var(--lime);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.hex.small { width: 28px; height: 32px; }
.hex.tiny { width: 16px; height: 18px; }
.title-hex {
  width: 48px;
  height: 54px;
  box-shadow: 0 0 0 22px rgba(214, 255, 63, 0.11);
}

.top-tabs {
  position: absolute;
  left: 50%;
  top: 30px;
  transform: translateX(-50%);
  height: 66px;
  display: flex;
  padding: 0 14px;
  background: linear-gradient(180deg, #171719, #0c0c0e);
  border: 1px solid #3b383f;
  clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%);
}
.top-tab {
  width: 184px;
  border: 0;
  color: var(--white);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 900;
}
.top-tab.active {
  position: relative;
  background: rgba(0, 0, 0, 0.18);
}
.top-tab.active::after {
  content: "";
  position: absolute;
  bottom: 9px;
  width: 24px;
  height: 4px;
  border-radius: 3px;
  background: var(--violet);
}
.spade { color: var(--lime); font-size: 22px; }

.profile {
  width: 70px;
  height: 70px;
  border: 1px dashed #76aaba;
  background: rgba(50, 85, 94, 0.18);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.profile span {
  display: block;
  width: 35px;
  height: 35px;
  margin: 17px auto;
  border-radius: 50% 50% 42% 42%;
  background: #8bb7bf;
}

.hero {
  height: 135px;
  padding: 0 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, #0b0710 0%, #100719 70%, #1e0d2f 100%);
  border: 1px solid #2b2435;
}
.game-title { display: flex; align-items: center; gap: 42px; }
.eyebrow { color: var(--muted); font-size: 17px; letter-spacing: 2px; }
h1 { margin: 0; color: var(--lime); font-family: var(--display); font-size: 43px; line-height: 0.95; letter-spacing: 5px; }
.balance-card {
  width: 200px;
  height: 74px;
  padding: 16px 0;
  text-align: center;
  background: rgba(39, 35, 43, 0.86);
  border: 1px solid #39323f;
}
.balance-card div { color: var(--muted); font-size: 14px; }
.balance-card strong { display: block; margin-top: 11px; color: var(--lime); font-size: 18px; }

.game-shell {
  display: grid;
  grid-template-columns: 462px 1fr 302px;
  gap: 42px;
  padding: 43px 60px 0;
}
.bet-panel, .dice-board, .chat-panel {
  border: 3px solid rgba(63, 58, 74, 0.7);
  background: linear-gradient(145deg, rgba(5, 4, 8, 0.94), rgba(24, 18, 31, 0.58));
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.36);
}
.bet-panel {
  height: 620px;
  padding: 30px 25px;
  position: relative;
}
.app.is-auto .bet-panel,
.app.is-auto .dice-board,
.app.is-auto .chat-panel {
  height: 830px;
}
.mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.mode {
  height: 50px;
  border: 1px solid var(--line-strong);
  background: rgba(30, 29, 35, 0.65);
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}
.mode.active { background: var(--lime); color: #111; border-color: var(--lime); }

.field { margin-bottom: 20px; }
.field label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}
.field label em { font-style: normal; }
.field input, .profit-field, .split-input {
  width: 100%;
  height: 64px;
  color: var(--white);
  background: rgba(12, 10, 15, 0.85);
  border: 1px solid var(--line-strong);
}
input {
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
}
.bet-row {
  display: grid;
  grid-template-columns: 1fr 64px 64px 64px;
  height: 64px;
  border: 1px solid var(--line-strong);
}
.bet-row input { height: 62px; }
.bet-row button, .split-input button, .triple button {
  border: 0;
  border-left: 1px solid var(--line-strong);
  color: var(--muted);
  background: rgba(31, 29, 36, 0.72);
  font-size: 18px;
  font-weight: 900;
}
.bet-row button.active, .triple button.active { color: var(--lime); background: rgba(195, 255, 55, 0.14); outline: 1px solid rgba(214, 255, 63, 0.48); }
.profit-field {
  padding: 18px 18px;
  height: 84px;
}
.profit-field label { display: block; margin: 0 0 8px; }
.profit-field output { color: var(--lime); font-size: 23px; font-weight: 900; }

.auto-fields .split-input { display: grid; grid-template-columns: 1fr 58px; }
.modifier-grid, .stop-row { display: grid; grid-template-columns: 1fr; gap: 15px; }
.triple { display: grid; grid-template-columns: 95px 1fr 78px; height: 58px; border: 1px solid var(--line-strong); }
.triple input { font-size: 19px; }
.triple button { font-size: 14px; }
.stop-row { grid-template-columns: 1fr 1fr; }
.stop-row .field input { border: 1px solid var(--line-strong); height: 58px; font-size: 18px; }
.auto-fields .field { margin-bottom: 14px; }

.roll-button {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 38px;
  height: 64px;
  border: 0;
  color: #0e0e10;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 97% 100%, 0 100%);
  box-shadow: 0 0 24px rgba(214, 255, 63, 0.38);
  font-size: 22px;
  font-weight: 900;
}

.dice-board {
  height: 620px;
  position: relative;
  padding-top: 72px;
}
.roll-number {
  text-align: center;
  font-family: var(--display);
  font-size: 114px;
  line-height: 1;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 2px;
}
.roll-number.win { color: var(--lime); text-shadow: 0 0 30px rgba(214,255,63,.45); }
.roll-number.lose { color: var(--red); text-shadow: 0 0 30px rgba(240,72,95,.35); }
.roll-type { margin-top: 22px; text-align: center; color: var(--muted); font-size: 17px; }
.last-roll {
  margin: 18px auto 0;
  width: 170px;
  height: 42px;
  border: 1px solid var(--line);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}
.last-roll strong { color: var(--lime); }
.stats {
  position: absolute;
  left: 52px;
  right: 52px;
  top: 306px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.stats div {
  height: 96px;
  padding-top: 23px;
  text-align: center;
  background: rgba(16, 14, 20, 0.78);
  border: 1px solid var(--line);
  position: relative;
}
.stats span { display: block; color: var(--muted); font-size: 14px; margin-bottom: 11px; }
.stats strong { font-size: 27px; }
.stats button {
  position: absolute;
  right: 8px;
  top: 12px;
  width: 20px;
  height: 20px;
  border: 1px solid #69636f;
  border-radius: 50%;
  background: #302d35;
  color: var(--white);
  font-size: 12px;
  line-height: 18px;
}

.slider-wrap {
  position: absolute;
  left: 52px;
  right: 52px;
  top: 430px;
  height: 90px;
}
.slider {
  position: absolute;
  left: 35px;
  right: 35px;
  top: 30px;
  height: 52px;
  border: 4px solid #71558a;
  background: #27153c;
  clip-path: polygon(4% 0, 96% 0, 100% 50%, 96% 100%, 4% 100%, 0 50%);
}
.slider::before, .slider::after {
  content: "";
  position: absolute;
  top: -15px;
  width: 42px;
  height: 82px;
  border-top: 2px solid #9c8bb8;
  border-bottom: 2px solid #9c8bb8;
}
.slider::before { left: -48px; transform: skewX(-30deg); }
.slider::after { right: -48px; transform: skewX(30deg); }
.track { position: absolute; top: 10px; bottom: 10px; }
.track.left { left: 16px; background: linear-gradient(90deg, var(--lime-soft), #9cb75c); }
.track.right { right: 16px; background: linear-gradient(90deg, #331a50, #4a2867); }
.dot {
  position: absolute;
  top: 21px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.d1, .d2 { background: #060407; }
.d3, .d4 { background: var(--violet); }
.d1 { left: 9%; } .d2 { left: 28%; } .d3 { left: 70%; } .d4 { left: 88%; }
.knob {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 56px;
  transform: translate(-50%, -50%);
  border: 5px solid var(--white);
  border-radius: 50%;
  background: #21172d;
  box-shadow: 0 0 0 4px rgba(214, 255, 63, 0.24), 0 0 22px rgba(255,255,255,.34);
}
.knob::after {
  content: "";
  position: absolute;
  inset: 14px;
  background: var(--white);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.value-tag, .result-tag {
  position: absolute;
  top: 0;
  width: 78px;
  height: 34px;
  transform: translateX(-50%);
  color: var(--white);
  text-align: center;
  padding-top: 5px;
  font-size: 17px;
  font-weight: 900;
  z-index: 4;
}
.value-tag { background: #0b5f47; border: 2px solid #39e4a4; }
.value-tag::after, .result-tag::after {
  content: "";
  position: absolute;
  left: 31px;
  bottom: -15px;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
}
.value-tag::after { border-top: 15px solid #39e4a4; }
.result-tag { background: #6e1827; border: 2px solid var(--red); }
.result-tag::after { border-top: 15px solid var(--red); }

.board-actions {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 22px;
}
.board-actions button {
  width: 170px;
  height: 46px;
  border: 1px solid rgba(214,255,63,.22);
  color: var(--lime);
  background: rgba(36, 43, 18, 0.42);
}

.chat-panel {
  height: 620px;
  padding: 30px 26px;
  position: relative;
}
.chat-head {
  height: 37px;
  border-bottom: 1px solid rgba(92, 67, 114, 0.32);
  color: var(--muted);
  font-size: 14px;
}
.chat-head span {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
}
.chat-head button { float: right; border: 0; color: var(--white); background: transparent; font-size: 28px; line-height: 0.5; }
.chat-list { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-list article {
  min-height: 66px;
  padding: 14px 15px;
  background: rgba(21, 15, 28, 0.58);
  border: 1px solid rgba(83, 56, 105, 0.35);
  color: var(--muted);
  font-size: 13px;
}
.chat-list strong { color: var(--lime); display: block; margin-bottom: 7px; }
.chat-list p { margin: 0; line-height: 1.25; }
.chat-list blockquote { margin: 10px 0 0 15px; padding: 8px 10px; background: rgba(84, 68, 105, 0.18); font-size: 11px; }
.chat-input {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 28px;
  height: 38px;
  padding: 11px 15px;
  border: 1px solid rgba(179, 161, 204, 0.42);
  border-radius: 22px;
  color: #635a69;
  font-size: 13px;
}
.chat-input button { float: right; border: 0; background: transparent; color: #777082; }

.bets {
  padding: 50px 60px 0;
}
.bets-tabs { position: relative; display: flex; align-items: flex-end; gap: 0; height: 58px; }
.bets-tabs button {
  height: 52px;
  min-width: 210px;
  padding: 0 24px;
  border: 1px solid #49414f;
  color: var(--muted);
  background: rgba(20, 19, 24, 0.84);
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0 100%);
  text-align: left;
  font-size: 23px;
}
.bets-tabs button.active { color: var(--lime); background: rgba(72, 92, 23, 0.42); border-color: rgba(214,255,63,.45); }
.live-toggle {
  margin-left: auto;
  margin-right: 38px;
  color: #bdb4c9;
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 24px;
}
.live-toggle span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 11px var(--lime);
}
.live-toggle input { width: 46px; accent-color: #c9b7e6; }
.table { margin-top: 20px; }
.thead, .bet-row-live {
  display: grid;
  grid-template-columns: 1.1fr 1.7fr 1.25fr 1fr 1.25fr 1.2fr;
  align-items: center;
}
.thead {
  height: 34px;
  color: #aaa0b4;
  padding: 0 16px;
  font-size: 20px;
}
.bet-row-live {
  height: 66px;
  margin-top: 8px;
  padding: 0 16px;
  border: 1px solid #9b7ab6;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(34,35,28,.72), rgba(12,7,18,.74));
  font-size: 20px;
}
.bet-row-live strong { color: var(--white); }
.coin {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-right: 9px;
  color: #222;
  font-size: 14px;
  font-weight: 900;
  background: #c6d98b;
}
.coin.btc { background: #fff230; }

.footer {
  height: 124px;
  margin-top: 58px;
  padding: 36px 32px 0;
  background: #07050b;
  display: flex;
  justify-content: space-between;
}
.footer strong { display: block; font-family: var(--display); font-size: 34px; letter-spacing: 3px; }
.footer span { color: #5c5660; font-size: 12px; }
.footer nav { display: flex; gap: 36px; margin: 20px 38px 0 0; color: #5f5962; font-weight: 900; }
.floating-chat {
  position: fixed;
  left: 0;
  bottom: 190px;
  width: 47px;
  height: 62px;
  border: 1px solid #c3b5d8;
  background: rgba(74, 58, 91, 0.5);
  color: #d3c1ef;
  font-size: 23px;
}

.loader {
  position: fixed;
  left: 0;
  top: 0;
  width: calc(100vw / var(--scale, 1));
  height: calc(100vh / var(--scale, 1));
  z-index: 20;
  background:
    radial-gradient(150% 130% at 82% 40%, rgba(111, 50, 168, 0.55) 0%, rgba(86, 38, 130, 0.3) 40%, rgba(40, 18, 62, 0) 82%),
    #0b080f;
  display: grid;
  place-items: center;
  color: var(--white);
  transition: opacity .35s ease, visibility .35s ease;
}
.loader-content {
  width: 594px;
  transform: translateY(-20px);
}
.loader-logo {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 56.8px;
  margin-bottom: 16px;
}
.loader-mark {
  width: 50.8px;
  height: 56.8px;
  display: block;
}
.loader-word {
  width: 520.3px;
  height: auto;
  display: block;
}
.loader-bar {
  position: relative;
  width: 594px;
  height: 31.3px;
}
.loader-bar-track {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  transform: skewX(16.48deg);
  transform-origin: 0 50%;
}
.loader-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--load, 0%);
  min-width: 0;
  z-index: 1;
  border-radius: 6px;
  background: linear-gradient(90deg, #fdfff7 0%, #ccff00 100%);
  transform: skewX(16.48deg);
  transform-origin: 0 50%;
  transition: width .14s linear;
}
.loader-bar-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Syncopate", var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1;
}
.loader-bar-num--light {
  z-index: 2;
  color: #ffffff;
}
.loader-bar-num--dark {
  z-index: 3;
  color: #161b03;
  clip-path: inset(0 calc(100% - var(--load, 0%)) 0 0);
}
.app:not(.is-loading) .loader { opacity: 0; visibility: hidden; pointer-events: none; }

.hidden { display: none !important; }
.shake { animation: shake .28s linear; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  50% { transform: translateX(7px); }
  75% { transform: translateX(-4px); }
}

@media (max-width: 900px) {
  body { background: #050407; }
}
