/* Rocket Star — dual-panel crash */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700&family=Teko:wght@600;700&display=swap');

.game-shell.rs-mode {
  max-width: 480px;
  margin: 0 auto;
  background: #020617;
}
.game-shell.rs-mode .game-top {
  display: none;
}
.game-shell.rs-mode .game-stage {
  padding: 0;
  max-width: 100%;
  width: 100%;
  min-height: 100dvh;
  display: block;
}

.rs-screen {
  position: relative;
  min-height: 100dvh;
  color: #e2e8f0;
  font-family: Teko, 'Trebuchet MS', sans-serif;
  overflow: hidden;
}
.rs-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.rs-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.45) 0%, rgba(2, 6, 23, 0.2) 40%, rgba(2, 6, 23, 0.85) 100%);
}
.rs-ui {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: max(6px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  gap: 4px;
}

.rs-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 6px;
  align-items: center;
}
.rs-bal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #38bdf8;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 800;
  color: #fde68a;
}
.rs-bal img {
  width: 18px;
  height: 18px;
  background: transparent !important;
}
.rs-plus {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #38bdf8;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}
.rs-jp {
  text-align: center;
  padding: 2px 12px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #f59e0b;
}
.rs-jp span {
  display: block;
  font-size: 0.7rem;
  color: #fbbf24;
  letter-spacing: 0.08em;
  font-family: Orbitron, sans-serif;
}
.rs-jp b {
  color: #fde68a;
  font-size: 1.05rem;
}
.rs-ico {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.rs-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent !important;
}

.rs-logo {
  width: min(300px, 86vw);
  height: auto;
  margin: 2px auto 0;
  display: block;
  object-fit: contain;
  background: transparent !important;
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.55)) drop-shadow(0 0 8px rgba(249, 115, 22, 0.35));
}

.rs-hist {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 2px 0;
}
.rs-h {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
}
.rs-h.low {
  background: #2563eb;
}
.rs-h.mid {
  background: #16a34a;
}
.rs-h.high {
  background: #ea580c;
}
.rs-h.mega {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.rs-arena {
  display: grid;
  grid-template-columns: 88px 1fr 44px;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 240px;
  max-height: 42vh;
}
.rs-side {
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rs-players-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0ea5e9;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 900;
}
.rs-player {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 8px;
  padding: 3px;
  font-size: 0.68rem;
}
.rs-player img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  background: transparent !important;
}
.rs-player b {
  display: block;
  line-height: 1;
  color: #e2e8f0;
}
.rs-player small {
  color: #94a3b8;
  line-height: 1;
}
.rs-stage {
  position: relative;
  border-radius: 16px;
  border: 2px solid rgba(56, 189, 248, 0.45);
  background: rgba(2, 6, 23, 0.28);
  box-shadow: inset 0 0 30px rgba(14, 165, 233, 0.12), 0 0 18px rgba(14, 165, 233, 0.2);
  overflow: hidden;
}
.rs-round {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: #94a3b8;
  z-index: 2;
}
.rs-crash-lab {
  position: absolute;
  left: 4px;
  top: 40%;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: Orbitron, sans-serif;
  font-size: 0.65rem;
  color: #fbbf24;
  letter-spacing: 0.12em;
  z-index: 2;
}
.rs-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 3;
}
.rs-ring {
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(#38bdf8 calc(var(--p, 100) * 1%), rgba(30, 41, 59, 0.5) 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
}
.rs-cd-txt {
  text-align: center;
  z-index: 1;
}
.rs-cd-txt small {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
}
.rs-cd-txt b {
  font-family: Orbitron, sans-serif;
  font-size: 1.8rem;
  color: #fff;
}
.rs-mult {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  font-family: Orbitron, sans-serif;
  font-size: clamp(2.2rem, 11vw, 3rem);
  color: #7dd3fc;
  text-shadow: 0 0 22px rgba(56, 189, 248, 0.85), 0 0 4px #fff;
  z-index: 6;
  pointer-events: none;
}
.rs-mult.crashed {
  color: #ef4444;
  text-shadow: 0 0 18px rgba(239, 68, 68, 0.8);
}
.rs-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.rs-rocket-wrap {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 78%);
  transform: translate(-50%, -50%) rotate(var(--rot, -32deg));
  z-index: 5;
  width: 88px;
  height: 88px;
  pointer-events: none;
  will-change: left, top, transform;
}
.rs-aura {
  position: absolute;
  inset: -18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 160, 40, 0.45) 0%, rgba(255, 80, 20, 0.15) 45%, transparent 70%);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.rs-rocket-wrap.is-flying .rs-aura {
  opacity: 1;
  animation: rs-aura-pulse 0.35s ease-in-out infinite;
}
.rs-flame-img {
  position: absolute;
  left: -42%;
  top: 48%;
  width: 72px;
  height: auto;
  opacity: 0;
  transform-origin: 90% 50%;
  transform: translateY(-50%) rotate(180deg) scaleX(1.15);
  filter: drop-shadow(0 0 10px #ff6a00) brightness(1.15);
  background: transparent !important;
  z-index: 1;
  pointer-events: none;
}
.rs-rocket-wrap.is-flying .rs-flame-img {
  opacity: 1;
}
.rs-rocket {
  position: relative;
  z-index: 2;
  width: 72px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  background: transparent !important;
  filter: drop-shadow(0 0 16px rgba(255, 140, 40, 0.95));
}
.rs-rocket.fly {
  animation: rs-shake 0.14s linear infinite;
}
.rs-rocket.boom {
  filter: grayscale(0.2) brightness(1.55) drop-shadow(0 0 22px #ef4444);
  transform: rotate(16deg) scale(0.88);
}
@keyframes rs-shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(1.5px, -1.5px);
  }
}
@keyframes rs-aura-pulse {
  0%,
  100% {
    transform: scale(0.95);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}
.rs-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.rs-ping {
  writing-mode: vertical-rl;
  font-size: 0.7rem;
  color: #4ade80;
}

.rs-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.rs-panel {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.75), rgba(15, 23, 42, 0.9));
  border: 1px solid #38bdf8;
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rs-target,
.rs-amount {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px;
  background: rgba(2, 6, 23, 0.55);
  border-radius: 8px;
  padding: 4px;
}
.rs-target button,
.rs-amount button {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: #1e40af;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
.rs-target b,
.rs-amount b {
  text-align: center;
  color: #fde68a;
  font-size: 1.05rem;
}
.rs-amount small {
  font-size: 0.7rem;
  color: #94a3b8;
}
.rs-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px;
}
.rs-auto {
  border: none;
  border-radius: 999px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #fde68a, #f59e0b);
  color: #0f172a;
  font-weight: 900;
  font-size: 0.8rem;
  cursor: pointer;
}
.rs-auto.on {
  outline: 2px solid #fff;
  background: linear-gradient(180deg, #f472b6, #db2777);
  color: #fff;
}
.rs-act {
  border: none;
  border-radius: 999px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #4ade80, #16a34a);
  color: #052e16;
  font-weight: 900;
  font-size: 0.9rem;
  cursor: pointer;
}
.rs-act.done {
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  color: #fff;
}
.rs-act.cash {
  background: linear-gradient(180deg, #fbbf24, #ea580c);
  color: #0f172a;
  animation: rs-pulse 0.8s ease infinite;
}
.rs-act.won {
  background: linear-gradient(180deg, #4ade80, #15803d);
  color: #fff;
}
.rs-act.lost {
  background: #475569;
  color: #cbd5e1;
}
@keyframes rs-pulse {
  50% {
    filter: brightness(1.15);
  }
}
.rs-pot {
  text-align: center;
  font-size: 0.85rem;
  color: #7dd3fc;
}
.rs-foot-rocket {
  width: 28px;
  height: 28px;
  margin: 2px auto 0;
  display: block;
  object-fit: contain;
  background: transparent !important;
  opacity: 0.85;
}

.rs-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.78);
  padding: 16px;
}
.rs-card {
  width: min(92vw, 360px);
  max-height: 80vh;
  overflow: auto;
  background: linear-gradient(180deg, #1e3a8a, #0f172a);
  border: 2px solid #38bdf8;
  border-radius: 16px;
  padding: 14px;
}
.rs-card-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.rs-card-h h3 {
  margin: 0;
  font-family: Orbitron, sans-serif;
  color: #7dd3fc;
  font-size: 1rem;
}
.rs-card-h button {
  border: none;
  background: #ef4444;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}
.rs-rules {
  margin: 0;
  padding-left: 18px;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.35;
}
.rs-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-weight: 700;
}
.rs-field select {
  padding: 8px;
  border-radius: 10px;
  border: 2px solid #38bdf8;
  background: #0f172a;
  color: #fff;
  font-size: 1rem;
}
.rs-apply {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(180deg, #38bdf8, #0284c7);
  color: #fff;
  font-weight: 900;
  font-size: 1.1rem;
  cursor: pointer;
}
.rs-luck .rs-left {
  color: #fbbf24;
  font-weight: 800;
}
.rs-flight-h {
  text-align: center;
  font-family: Orbitron, sans-serif;
  font-size: 1.35rem;
  color: #f97316;
  margin-bottom: 12px;
}
.rs-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 6px;
  align-items: end;
}
.rs-pod {
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 12px;
  padding: 8px 4px;
  border: 1px solid #334155;
}
.rs-pod img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: transparent !important;
}
.rs-pod b {
  display: block;
  font-size: 0.85rem;
  color: #e2e8f0;
}
.rs-pod em {
  display: block;
  font-style: normal;
  color: #fbbf24;
  font-size: 1rem;
}
.rs-pod small {
  display: block;
  color: #94a3b8;
  font-size: 0.68rem;
}
.rs-pod.p1 {
  border-color: #f59e0b;
  transform: translateY(-8px);
}

@media (max-height: 720px) {
  .rs-arena {
    max-height: 34vh;
  }
  .rs-logo {
    width: min(180px, 55vw);
  }
}
