/* ========================================================
   🎯 STAKE WHEEL ("WHEELS") - PREMIUM CASINO REPLICA STYLES
   Authentic Stake Originals 1:1 Experience for Druk Fortune
   ======================================================== */

.wheels-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 15%, #131f2c 0%, #0f1923 50%, #0a0f16 100%);
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Outfit', Helvetica, Arial, sans-serif;
  user-select: none;
  overflow-x: hidden;
  padding-bottom: 70px;
}

/* Header */
.wheels-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(15, 25, 35, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
}

.wheels-hdr-left,
.wheels-hdr-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wheels-icon-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.wheels-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transform: translateY(-1px);
}

.wheels-icon-btn.active {
  background: rgba(0, 231, 1, 0.18);
  color: #00e701;
  border-color: #00e701;
  box-shadow: 0 0 10px rgba(0, 231, 1, 0.3);
}

.wheels-brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.wheels-brand-title span:first-child {
  background: linear-gradient(135deg, #00e701 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.wheels-tag-badge {
  font-size: 9px;
  font-weight: 900;
  background: rgba(0, 231, 1, 0.15);
  color: #00e701;
  border: 1px solid rgba(0, 231, 1, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.wheels-balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 33, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.wheels-balance-curr {
  color: #00e701;
}

.wheels-balance-val {
  color: #ffffff;
}

/* History Bar */
.wheels-history-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(11, 18, 25, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
  scrollbar-width: none;
}

.wheels-history-bar::-webkit-scrollbar {
  display: none;
}

.wheels-history-label {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.wheels-history-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wheels-history-chip {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  animation: chipSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

@keyframes chipSlide {
  from { opacity: 0; transform: scale(0.8) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Main Layout: Responsive Mobile (Wheel on TOP, Controls on BOTTOM) & Desktop (2-Column) */
.wheels-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 14px 28px;
  width: 100%;
  box-sizing: border-box;
  gap: 18px;
}

.wheels-stage {
  order: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wheels-controls-card {
  order: 2;
  width: 100%;
  max-width: 520px;
  background: #1a2c38;
  border: 1px solid #2f4553;
  border-radius: 12px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* App container expansion on desktop when in Wheels view */
body.in-wheels-view .app-container {
  max-width: 1100px !important;
  margin: 0 auto !important;
}

/* Desktop 2-column Layout (>= 900px) */
@media (min-width: 900px) {
  .wheels-arena {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    padding: 24px 20px;
  }

  .wheels-controls-card {
    order: 1;
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
  }

  .wheels-stage {
    order: 2;
    flex: 1;
  }
}

/* Tabs Bar (Manual vs Auto) */
.wheels-tabs-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0f212e;
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
  border: 1px solid #2f4553;
}

.wheels-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wheels-tab-btn:hover {
  color: #ffffff;
}

.wheels-tab-btn.active {
  background: #213743;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Control Groups */
.wheels-ctrl-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wheels-ctrl-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

/* Input Wrappers */
.wheels-input-wrap {
  display: flex;
  align-items: center;
  background: #0f212e;
  border: 1px solid #2f4553;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.wheels-input-wrap:focus-within {
  border-color: #00e701;
  box-shadow: 0 0 0 1px #00e701;
}

.wheels-curr-symbol {
  padding-left: 12px;
  font-weight: 800;
  color: #00e701;
  font-size: 15px;
}

.wheels-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 10px;
  font-family: inherit;
}

.wheels-input-mini {
  background: #0f212e;
  border: 1px solid #2f4553;
  border-radius: 6px;
  outline: none;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 8px;
  font-family: inherit;
}

.wheels-quick-btns {
  display: flex;
  align-items: center;
  padding-right: 4px;
}

.wheels-quick-btn {
  background: #213743;
  border: none;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 9px;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 3px;
  transition: all 0.15s ease;
}

.wheels-quick-btn:hover {
  background: #2f4553;
  color: #ffffff;
}

/* Segmented Buttons for Risk */
.wheels-segmented-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #0f212e;
  padding: 4px;
  border-radius: 6px;
  border: 1px solid #2f4553;
}

.wheels-seg-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.wheels-seg-btn:hover {
  color: #ffffff;
}

.wheels-seg-btn.active[data-risk="low"] {
  background: #00e701;
  color: #013e00;
  box-shadow: 0 2px 8px rgba(0, 231, 1, 0.35);
}

.wheels-seg-btn.active[data-risk="medium"] {
  background: #ffb300;
  color: #2e1d00;
  box-shadow: 0 2px 8px rgba(255, 179, 0, 0.35);
}

.wheels-seg-btn.active[data-risk="high"] {
  background: #ff1744;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 23, 68, 0.4);
}

/* Segments Count Selection Grid */
.wheels-segments-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.wheels-count-btn {
  background: #0f212e;
  border: 1px solid #2f4553;
  color: #94a3b8;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
}

.wheels-count-btn:hover {
  border-color: #557086;
  color: #ffffff;
}

.wheels-count-btn.active {
  background: #213743;
  border-color: #00e701;
  color: #00e701;
  box-shadow: 0 2px 6px rgba(0, 231, 1, 0.2);
}

/* Auto Panel */
.wheels-auto-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(15, 33, 46, 0.5);
  border: 1px solid #2f4553;
  border-radius: 8px;
  padding: 12px;
}

.wheels-auto-subrow {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wheels-auto-toggle {
  flex: 1;
  background: #0f212e;
  border: 1px solid #2f4553;
  color: #94a3b8;
  font-weight: 700;
  font-size: 12px;
  padding: 7px 0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wheels-auto-toggle.active {
  background: #213743;
  border-color: #00e701;
  color: #00e701;
}

/* Primary Stake Bet Button */
.btn-wheels-spin {
  background: #00e701;
  color: #013e00;
  border: none;
  border-radius: 8px;
  padding: 14px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 231, 1, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-wheels-spin:hover:not(:disabled) {
  background: #1fff20;
  box-shadow: 0 6px 24px rgba(0, 231, 1, 0.5);
  transform: translateY(-1px);
}

.btn-wheels-spin:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-wheels-spin:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-wheels-spin.is-autobetting {
  background: #ff1744;
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(255, 23, 68, 0.4);
}

/* Wheel Stage Area (Right / Center) */
.wheels-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
}

/* Top Pointer / Needle */
.wheels-pointer-wrap {
  position: absolute;
  top: -12px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.wheels-pointer {
  width: 0;
  height: 0;
  border-left: 14px solid transparent;
  border-right: 14px solid transparent;
  border-top: 26px solid #ffffff;
  position: relative;
  transform-origin: 50% 0%;
  transition: transform 0.08s ease;
}

.wheels-pointer::after {
  content: '';
  position: absolute;
  top: -28px;
  left: -8px;
  width: 16px;
  height: 12px;
  background: #00e701;
  border-radius: 4px 4px 0 0;
  box-shadow: 0 0 10px rgba(0, 231, 1, 0.9);
}

.wheels-pointer.ticking {
  transform: rotate(-14deg) scale(1.1);
}

/* Outer Rim & Frame */
.wheels-wheel-outer {
  position: relative;
  width: min(340px, 86vw);
  height: min(340px, 86vw);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: radial-gradient(circle, #1a2c38 0%, #111d26 80%, #0a1117 100%);
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.65),
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 0 0 8px #182833,
    0 0 35px rgba(0, 231, 1, 0.1);
}

/* SVG Wheel */
.wheels-svg {
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  will-change: transform;
}

/* Center Hub */
.wheels-center-hub {
  position: absolute;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, #213743 0%, #15242d 75%, #0f1a21 100%);
  border: 3px solid #2f4553;
  box-shadow: 
    0 8px 24px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(0, 231, 1, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
}

.wheels-hub-icon {
  font-size: 22px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.wheels-hub-sub {
  font-size: 9px;
  font-weight: 900;
  color: #94a3b8;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Result Banner */
.wheels-result-banner {
  margin-top: 16px;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 15px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  background: #1a2c38;
  border: 1px solid #2f4553;
  animation: bannerPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 90%;
}

@keyframes bannerPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.wheels-result-banner.is-win {
  display: flex;
  background: rgba(0, 231, 1, 0.15);
  border-color: #00e701;
  color: #00e701;
  box-shadow: 0 4px 20px rgba(0, 231, 1, 0.3);
}

.wheels-result-banner.is-loss {
  display: flex;
  background: rgba(255, 23, 68, 0.12);
  border-color: rgba(255, 23, 68, 0.4);
  color: #ff5252;
}

/* Multiplier Probability Grid (Stake Authentic Under Wheel) */
.wheels-multipliers-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  width: 100%;
}

.wheels-multiplier-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #1a2c38;
  border: 1px solid #2f4553;
  min-width: 65px;
  transition: all 0.2s ease;
  cursor: default;
}

.wheels-multiplier-card:hover {
  border-color: #557086;
  transform: translateY(-2px);
}

.wheels-multiplier-card.highlight-landed {
  border-color: #ffffff !important;
  transform: scale(1.12);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.6);
  z-index: 5;
}

.wheels-card-mult {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.wheels-card-odds {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 2px;
}

.wheels-card-profit {
  font-size: 9px;
  font-weight: 700;
  color: #00e701;
  margin-top: 1px;
}

/* Modals */
.wheels-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.wheels-modal-overlay.active {
  display: flex;
}

.wheels-modal-card {
  background: #1a2c38;
  border: 1px solid #2f4553;
  border-radius: 14px;
  max-width: 480px;
  width: 100%;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  max-height: 85vh;
  overflow-y: auto;
}

.wheels-modal-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.wheels-modal-hdr h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
}

.wheels-modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.wheels-rules-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}

.wheels-rules-table th,
.wheels-rules-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #2f4553;
}

.wheels-rules-table th {
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
}

.wheels-rules-table td strong {
  color: #00e701;
}
