* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overscroll-behavior: none;
  overflow: hidden;
  touch-action: pan-x pan-y;
  background: #0b0f1a;
  color: #f2f4ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  overflow-y: auto;
}

.hidden {
  display: none !important;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #5b8def;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.denied-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

#denied-text, #loading-text {
  font-size: 16px;
  opacity: 0.85;
  max-width: 320px;
}

#screen-games {
  justify-content: flex-start;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}

#games-title {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 20px;
}

.games-grid {
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.game-card {
  background: #141a2a;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.game-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.game-card span {
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  text-transform: capitalize;
}

/* ---- Lucky Jet screen ---- */
#screen-luckyjet {
  justify-content: center;
  align-items: stretch;
  padding: 0 0 12px;
  gap: 10px;
  overflow-y: auto;
}

.lj-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 0;
}

.lj-back {
  background: none;
  border: none;
  color: #f2f4ff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.8;
}

.lj-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.lj-history-box {
  margin: 0 16px;
  background: #0d1220;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.lj-history-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #c8cdde;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lj-clock {
  font-size: 15px;
}

.lj-close-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #f2f4ff;
  font-size: 13px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lj-history-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  min-height: 60px;
  align-items: center;
}

.lj-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}

.pill-blue    { background: #1a3a7a; color: #7aadff; }
.pill-purple  { background: #2a1a5a; color: #b07aff; }
.pill-orange  { background: #4a2a00; color: #ffaa33; }
.pill-magenta { background: #4a0a3a; color: #ff55cc; }

.lj-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: #5b8def;
  animation: spin 0.8s linear infinite;
  margin: 8px auto;
}

/* ---- Lucky Jet canvas ---- */
.lj-canvas {
  margin: 0 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1c1638 0%, #261f4d 100%);
  background-image: url(https://1play.gamedev-tech.cc/lucky/assets/bg.jpg);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(124,90,255,0.25);
  overflow: hidden;
  position: relative;
  height: 230px;
}

/* Phase base */
.lj-phase {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 10px;
}

/* --- BETTING phase --- */
.lj-orbit-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lj-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(160,120,255,0.45);
}
.lj-orbit-1 {
  width: 118px; height: 118px;
  animation: orbit-spin 6s linear infinite;
}
.lj-orbit-2 {
  width: 96px; height: 96px;
  animation: orbit-spin 4s linear infinite reverse;
  border-color: rgba(120,180,255,0.35);
}
@keyframes orbit-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.lj-joe-img {
  width: 100px;
  height: auto;
  position: relative;
  z-index: 2;
  animation: joe-bob 2.2s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(140,100,255,0.5));
}
@keyframes joe-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}

.lj-bet-info {
  flex: 1;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lj-wait-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  line-height: 1.4;
}

.lj-wait-line {
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, #7c5aff, transparent);
  border-radius: 2px;
  margin: 2px 0;
}

.lj-signal-label-sm {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}

.lj-signal-num {
  font-size: 52px;
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  color: #ffb432;
  text-shadow: 0 0 30px rgba(255,180,50,0.6);
  transition: color 0.5s, text-shadow 0.5s;
}
.lj-signal-num.color-blue    { color: #5b8def; text-shadow: 0 0 30px rgba(91,141,239,0.6); }
.lj-signal-num.color-purple  { color: #b07aff; text-shadow: 0 0 30px rgba(176,122,255,0.6); }
.lj-signal-num.color-orange  { color: #ffb432; text-shadow: 0 0 30px rgba(255,180,50,0.6); }
.lj-signal-num.color-magenta { color: #ff55cc; text-shadow: 0 0 30px rgba(255,85,204,0.8), 0 0 60px rgba(255,85,204,0.3); }

@keyframes signal-in {
  0%   { opacity: 0; transform: scale(0.6); }
  65%  { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}
.lj-signal-num.signal-new { animation: signal-in 0.4s cubic-bezier(.175,.885,.32,1.275); }

@keyframes signal-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.lj-signal-num.betting { animation: signal-pulse 1.8s ease-in-out infinite; }

/* --- FLYING phase --- */
.lj-joe-fly-img {
  width: 110px;
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 16px rgba(100,180,255,0.5));
  animation: joe-fly 1.6s ease-in-out infinite;
}
@keyframes joe-fly {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%       { transform: translateY(-8px) rotate(-6deg); }
}

.lj-fly-info {
  flex: 1;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lj-signal-badge-sm {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffb432;
  background: rgba(255,180,50,0.12);
  border: 1px solid rgba(255,180,50,0.3);
  border-radius: 20px;
  padding: 2px 10px;
  display: inline-block;
  width: fit-content;
}

.lj-signal-num-fly {
  font-size: 50px;
}

.lj-fly-status {
  font-size: 11px;
  font-weight: 600;
  color: #00dc78;
  letter-spacing: 0.3px;
}

/* --- WAIT (no data) --- */
.lj-phase-wait .lj-bet-info {
  align-items: flex-start;
}
.lj-phase-wait .lj-wait-text {
  font-size: 12px;
}

/* Dots */
.lj-bet-dots {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.lj-bet-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(160,120,255,0.7);
  animation: dot-pulse 1.2s ease-in-out infinite;
}
.lj-bet-dots span:nth-child(2) { animation-delay: 0.2s; }
.lj-bet-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-pulse {
  0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
  40%            { transform: scale(1.2); opacity: 1; }
}

.lj-empty {
  font-size: 14px;
  opacity: 0.5;
  margin: 0;
}

/* ============================================================
   MINES SCREEN
   ============================================================ */
#screen-mines {
  justify-content: center;
  align-items: center;
  padding: 12px 16px 20px;
  gap: 12px;
  overflow-y: auto;
}

.mn-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mn-header-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffb432;
  background: rgba(255,180,50,0.12);
  border: 1px solid rgba(255,180,50,0.3);
  border-radius: 20px;
  padding: 3px 10px;
}

/* --- mine count selector --- */
.mn-selector {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0d1422;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px 14px;
}

.mn-selector-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
}

.mn-selector-btns {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.mn-cnt-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  font-weight: 800;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mn-cnt-btn.active {
  background: rgba(120,90,255,0.25);
  border-color: rgba(160,120,255,0.6);
  color: #d0b8ff;
}

/* signal button — full width */
.mn-signal-btn {
  width: 100%;
  background: linear-gradient(135deg, #3ecf8e, #1da866);
  border: none;
  border-radius: 16px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 0;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(30,200,120,0.4);
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  white-space: nowrap;
}
.mn-signal-btn:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(30,200,120,0.25);
}
.mn-signal-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.mn-signal-btn-icon {
  font-size: 18px;
  display: inline-block;
  animation: mn-star-spin 2.4s linear infinite;
}
@keyframes mn-star-spin {
  0%   { transform: rotate(0deg) scale(1); }
  50%  { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

/* --- result label --- */
.mn-result {
  width: 100%;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #3ecf8e;
  min-height: 18px;
  letter-spacing: 0.3px;
  text-shadow: 0 0 12px rgba(62,207,142,0.5);
}

/* --- grid wrapper --- */
.mn-grid-wrap {
  width: 100%;
  background: #080e1c;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 14px;
  box-shadow: inset 0 2px 20px rgba(0,0,0,0.4);
}

/* --- 5×5 grid --- */
.mn-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

/* closed cell */
.mn-cell {
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  background: linear-gradient(160deg, #1c2540 0%, #131b30 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 5px 0 rgba(0,0,0,0.55),
    0 1px 0 rgba(255,255,255,0.05) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  cursor: default;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

/* top-left highlight */
.mn-cell::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 55%; height: 45%;
  background: linear-gradient(135deg, rgba(255,255,255,0.07), transparent);
  border-radius: 13px 0 0 0;
}

/* revealed safe cell */
.mn-cell.mn-safe {
  background: linear-gradient(160deg, #0e3d24 0%, #072b18 100%);
  border-color: rgba(40,220,120,0.6);
  box-shadow:
    0 0 18px rgba(40,220,120,0.28),
    0 5px 0 rgba(0,0,0,0.45),
    0 1px 0 rgba(40,255,140,0.12) inset;
  font-size: 22px;
  animation: mn-reveal 0.38s cubic-bezier(.175,.885,.32,1.275) forwards;
}
@keyframes mn-reveal {
  0%   { transform: scale(0.35) rotateY(80deg); opacity: 0; }
  65%  { transform: scale(1.08) rotateY(-4deg); }
  100% { transform: scale(1)    rotateY(0deg);  opacity: 1; }
}

/* expanding ring on safe */
.mn-cell.mn-safe::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 16px;
  border: 2px solid rgba(40,220,120,0.55);
  animation: mn-ring 1.8s ease-out infinite;
}
@keyframes mn-ring {
  0%   { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0;   transform: scale(1.3); }
}

/* ============================================================
   COINFLIP SCREEN
   ============================================================ */
#screen-coinflip {
  justify-content: center;
  align-items: center;
  padding: 12px 16px 20px;
  gap: 14px;
}

.cf-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- arena --- */
.cf-arena {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0 16px;
}

/* ambient glow behind coin */
.cf-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,196,0,0.22) 0%, transparent 70%);
  pointer-events: none;
  transition: background 0.6s;
}
.cf-glow.cf-glow-tails {
  background: radial-gradient(circle, rgba(160,200,255,0.22) 0%, transparent 70%);
}

/* --- 3-D coin --- */
.cf-coin-wrap {
  perspective: 900px;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.6));
}

.cf-coin {
  width: 190px;
  height: 190px;
  transform-style: preserve-3d;
  position: relative;
  transform: rotateY(0deg);
}

.cf-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}

/* heads — rich gold */
.cf-heads {
  background:
    radial-gradient(circle at 32% 28%, #fff8b0 0%, #ffd730 28%, #c8900a 60%, #7a5500 100%);
  box-shadow:
    0 0 0 5px #9a6e00,
    0 0 0 9px #e8c840,
    0 0 0 11px #7a5500,
    0 18px 50px rgba(200,150,10,0.55),
    inset 0 3px 8px rgba(255,245,130,0.5);
}

/* tails — cool silver */
.cf-tails {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 32% 28%, #ffffff 0%, #c8d8f8 28%, #7090cc 60%, #2a4070 100%);
  box-shadow:
    0 0 0 5px #304870,
    0 0 0 9px #90b0e8,
    0 0 0 11px #304870,
    0 18px 50px rgba(60,110,220,0.5),
    inset 0 3px 8px rgba(200,220,255,0.5);
}

.cf-face-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

/* inner embossed ring */
.cf-face-inner::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  pointer-events: none;
}

/* diagonal gloss */
.cf-face-shine {
  position: absolute;
  top: -15%;
  left: -10%;
  width: 65%;
  height: 55%;
  background: linear-gradient(140deg, rgba(255,255,255,0.42) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.cf-face-icon {
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.4));
  position: relative;
  z-index: 1;
}

.cf-face-label {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
  position: relative;
  z-index: 1;
}

/* result text */
.cf-result {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #ffd700;
  text-shadow: 0 0 20px rgba(255,215,0,0.6);
  min-height: 44px;
  transition: color 0.4s, text-shadow 0.4s;
}
.cf-result.cf-res-tails {
  color: #90b8ff;
  text-shadow: 0 0 20px rgba(100,160,255,0.6);
}

.cf-result-sub {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
  min-height: 16px;
}

/* --- sides indicator --- */
.cf-sides {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cf-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 0;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0d1422;
  color: rgba(255,255,255,0.35);
  transition: background 0.4s, border-color 0.4s, color 0.4s, box-shadow 0.4s;
}

.cf-side-heads.cf-active {
  background: rgba(255,200,0,0.14);
  border-color: rgba(255,200,0,0.5);
  color: #ffd700;
  box-shadow: 0 0 14px rgba(255,200,0,0.2);
}
.cf-side-tails.cf-active {
  background: rgba(90,150,255,0.14);
  border-color: rgba(90,150,255,0.5);
  color: #90b8ff;
  box-shadow: 0 0 14px rgba(90,150,255,0.2);
}

.cf-versus {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255,255,255,0.2);
  letter-spacing: 1px;
  flex-shrink: 0;
}

/* cf signal button override */
.cf-signal-btn {
  width: 100%;
  background: linear-gradient(135deg, #a06aff, #6030cc) !important;
  box-shadow: 0 4px 20px rgba(130,60,255,0.45) !important;
}

/* ============================================================
   DICE SCREEN
   ============================================================ */
#screen-dice {
  justify-content: center;
  align-items: center;
  padding: 12px 16px 20px;
  gap: 14px;
}

.dc-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* --- arena --- */
.dc-arena {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: #080e1c;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 22px 18px 18px;
}

.dc-glow {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100,180,255,0.15) 0%, transparent 70%);
  pointer-events: none;
  transition: background 0.5s;
}
.dc-glow.dc-glow-less {
  background: radial-gradient(circle, rgba(255,100,100,0.18) 0%, transparent 70%);
}
.dc-glow.dc-glow-more {
  background: radial-gradient(circle, rgba(60,220,140,0.18) 0%, transparent 70%);
}

/* --- 3D dice --- */
.dc-scene {
  perspective: 600px;
  width: 110px;
  height: 110px;
}

.dc-cube {
  width: 110px;
  height: 110px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(30deg);
  transition: transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.dc-face {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1e2d50, #0f1a35);
  border: 1.5px solid rgba(100,160,255,0.25);
  box-shadow: inset 0 2px 6px rgba(255,255,255,0.06);
  display: grid;
  grid-template-areas:
    "tl . tr"
    "ml c mr"
    "bl . br";
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  padding: 14px;
}

.dc-face--1 { transform: translateZ(55px); }
.dc-face--6 { transform: rotateY(180deg) translateZ(55px); }
.dc-face--2 { transform: rotateY(-90deg) translateZ(55px); }
.dc-face--5 { transform: rotateY(90deg) translateZ(55px); }
.dc-face--3 { transform: rotateX(90deg) translateZ(55px); }
.dc-face--4 { transform: rotateX(-90deg) translateZ(55px); }

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #90c8ff, #3a7acc);
  box-shadow: 0 0 6px rgba(80,160,255,0.6);
  align-self: center;
  justify-self: center;
}
.dot.tl { grid-area: tl; }
.dot.tr { grid-area: tr; }
.dot.ml { grid-area: ml; }
.dot.mr { grid-area: mr; }
.dot.bl { grid-area: bl; }
.dot.br { grid-area: br; }
.dot.c  { grid-area: c;  }

/* rolling animation */
@keyframes dc-roll {
  0%   { transform: rotateX(-20deg) rotateY(30deg); }
  25%  { transform: rotateX(200deg) rotateY(120deg); }
  50%  { transform: rotateX(400deg) rotateY(250deg); }
  75%  { transform: rotateX(580deg) rotateY(370deg); }
  100% { transform: rotateX(720deg) rotateY(450deg); }
}
.dc-cube.dc-rolling {
  animation: dc-roll 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- signal row (number + direction) --- */
.dc-signal-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dc-signal-box,
.dc-dir-box {
  flex: 1;
  background: #0d1422;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 10px 12px;
  text-align: center;
  transition: border-color 0.4s, background 0.4s;
}
.dc-dir-box.dc-less {
  background: rgba(255,80,80,0.1);
  border-color: rgba(255,100,100,0.4);
}
.dc-dir-box.dc-more {
  background: rgba(40,200,120,0.1);
  border-color: rgba(40,200,120,0.4);
}

.dc-signal-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.dc-signal-num {
  font-size: 38px;
  font-weight: 900;
  color: #90c8ff;
  letter-spacing: -1px;
  line-height: 1;
  text-shadow: 0 0 20px rgba(80,160,255,0.5);
  transition: color 0.4s;
}

.dc-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: color 0.4s, transform 0.4s;
}
.dc-arrow.dc-less { color: #ff7070; transform: rotate(180deg); }
.dc-arrow.dc-more { color: #3ecf8e; }

.dc-dir-val {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.4);
  line-height: 1.2;
  transition: color 0.4s;
}
.dc-dir-box.dc-less .dc-dir-val { color: #ff9090; }
.dc-dir-box.dc-more .dc-dir-val { color: #3ecf8e; }

/* --- slider track --- */
.dc-track-wrap {
  width: 100%;
}

.dc-track {
  position: relative;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: visible;
}

.dc-track-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 50%;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff6060, #90c8ff);
  transition: width 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

.dc-track-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #90c8ff;
  box-shadow: 0 0 10px rgba(80,160,255,0.7);
  transition: left 0.5s cubic-bezier(0.34,1.56,0.64,1), border-color 0.4s, box-shadow 0.4s;
}
.dc-track-thumb.dc-less {
  border-color: #ff7070;
  box-shadow: 0 0 10px rgba(255,80,80,0.7);
}
.dc-track-thumb.dc-more {
  border-color: #3ecf8e;
  box-shadow: 0 0 10px rgba(40,200,120,0.7);
}

.dc-track-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.2);
  margin-top: 6px;
  font-weight: 600;
}

/* --- stats row --- */
.dc-stats {
  width: 100%;
  display: flex;
  gap: 10px;
}

.dc-stat {
  flex: 1;
  background: #0d1422;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  padding: 10px 0;
  text-align: center;
}

.dc-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #90c8ff;
  line-height: 1;
}

.dc-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
  text-transform: uppercase;
}

/* dc signal button — orange */
.dc-signal-btn {
  width: 100%;
  background: linear-gradient(135deg, #ff8c42, #d95f00) !important;
  box-shadow: 0 4px 20px rgba(220,100,0,0.45) !important;
}
