/* Laretka (Ruletka) Styles — Mosche Casino Reborn */

#roulette-card {
  width: min(620px, 100%);
  max-width: 620px;
  margin-inline: auto;
  margin-top: clamp(24px, 4vw, 40px);
  box-sizing: border-box;
}

/* History Bar */
.roulette-history-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px 12px;
  margin-bottom: 20px;
  min-height: 40px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.history-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-color, #8a9bb0);
  font-weight: 700;
  flex-shrink: 0;
}

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

.history-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  animation: historyItemPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.history-item.is-red {
  background: linear-gradient(135deg, #f43f5e, #be123c);
  border-color: rgba(244, 63, 94, 0.6);
}

.history-item.is-black {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border-color: rgba(148, 163, 184, 0.3);
}

.history-item.is-green {
  background: linear-gradient(135deg, #10b981, #047857);
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

@keyframes historyItemPop {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Wheel Stage */
.roulette-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 24px;
  width: 100%;
  box-sizing: border-box;
}

.roulette-wheel-box {
  position: relative;
  width: 380px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  user-select: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Pointer Flapper at Top */
.roulette-pointer {
  position: absolute;
  top: 1.2%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 8px rgba(34, 240, 208, 0.8));
  transition: transform 0.05s ease-out;
  transform-origin: top center;
}

.roulette-pointer.tick {
  transform: translateX(-50%) rotate(-8deg) scale(0.96);
}

/* Disc Wrap & Rotor */
.roulette-disc-wrap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  transform: rotate(0deg);
  will-change: transform;
}

.roulette-rotor {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

/* Center Hub */
.roulette-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #152422, #040908 75%);
  border: 2px solid rgba(73, 244, 213, 0.45);
  box-shadow: 0 0 16px rgba(34, 240, 208, 0.25), inset 0 0 10px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  transition: all 0.3s ease;
}

.hub-content {
  text-align: center;
  line-height: 1.1;
}

.hub-label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: #49f4d5;
  opacity: 0.8;
  font-weight: 700;
}

.hub-number {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  font-family: ui-monospace, monospace;
}

.roulette-center-hub.is-red {
  border-color: #f43f5e;
  box-shadow: 0 0 20px rgba(244, 63, 94, 0.55), inset 0 0 10px rgba(244, 63, 94, 0.3);
}

.roulette-center-hub.is-red .hub-number {
  color: #fca5a5;
  text-shadow: 0 0 8px #f43f5e;
}

.roulette-center-hub.is-green {
  border-color: #10b981;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.7), inset 0 0 10px rgba(16, 185, 129, 0.4);
}

.roulette-center-hub.is-green .hub-number {
  color: #6ee7b7;
  text-shadow: 0 0 10px #10b981;
}

.roulette-center-hub.is-black {
  border-color: #64748b;
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.4);
}

.roulette-center-hub.is-black .hub-number {
  color: #e2e8f0;
}

/* Form Controls */
.roulette-form {
  display: grid;
  gap: 16px;
  margin-top: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* Color Bet Selector */
.roulette-color-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.color-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  user-select: none;
}

.color-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.color-btn.is-red .color-badge-dot {
  background: #f43f5e;
  box-shadow: 0 0 8px #f43f5e;
}

.color-btn.is-green .color-badge-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.color-btn.is-black .color-badge-dot {
  background: #64748b;
  box-shadow: 0 0 8px #94a3b8;
}

.color-btn-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.color-btn-mult {
  font-size: 0.78rem;
  font-weight: 800;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}

/* Individual Color States */
.color-btn.is-red {
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.14), rgba(190, 18, 60, 0.08));
  border-color: rgba(244, 63, 94, 0.28);
}

.color-btn.is-red:hover {
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.24), rgba(190, 18, 60, 0.16));
  border-color: rgba(244, 63, 94, 0.6);
  transform: translateY(-2px);
}

.color-btn.is-red.is-selected {
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.35), rgba(190, 18, 60, 0.25));
  border-color: #f43f5e;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.45);
  transform: translateY(-2px);
}

.color-btn.is-green {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14), rgba(4, 120, 87, 0.08));
  border-color: rgba(16, 185, 129, 0.28);
}

.color-btn.is-green:hover {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.24), rgba(4, 120, 87, 0.16));
  border-color: rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

.color-btn.is-green.is-selected {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.35), rgba(4, 120, 87, 0.25));
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.color-btn.is-black {
  background: linear-gradient(145deg, rgba(100, 116, 139, 0.12), rgba(30, 41, 59, 0.15));
  border-color: rgba(148, 163, 184, 0.24);
}

.color-btn.is-black:hover {
  background: linear-gradient(145deg, rgba(100, 116, 139, 0.22), rgba(30, 41, 59, 0.25));
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-2px);
}

.color-btn.is-black.is-selected {
  background: linear-gradient(145deg, rgba(100, 116, 139, 0.32), rgba(30, 41, 59, 0.35));
  border-color: #cbd5e1;
  box-shadow: 0 0 16px rgba(203, 213, 225, 0.35);
  transform: translateY(-2px);
}

/* Stake Panel */
.roulette-stake-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.stake-input-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stake-field-label {
  font-size: 0.82rem;
  color: var(--muted-color, #8a9bb0);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stake-input-field input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  padding: 8px 12px;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: right;
  width: 140px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.stake-input-field input:focus {
  outline: none;
  border-color: var(--accent-color, #00f0ff);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

/* Quick Stake Buttons */
.quick-stake-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.quick-stake-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 0;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s ease;
}

.quick-stake-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.quick-stake-btn:active {
  transform: translateY(0);
}

/* Action Spin Button */
.roulette-action-box {
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
}

#roulette-result {
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.roulette-spin-submit {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 14px 20px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.spin-main-text {
  line-height: 1.2;
}

.spin-sub-text {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
  text-transform: none;
  letter-spacing: normal;
}

/* Responsive queries */
@media (max-width: 480px) {
  .roulette-wheel-box {
    width: 290px;
  }

  .color-btn {
    padding: 10px 4px;
  }

  .color-btn-title {
    font-size: 0.78rem;
  }

  .color-btn-mult {
    font-size: 0.7rem;
  }

  .stake-input-field input {
    width: 110px;
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-item {
    animation: none;
  }

  .roulette-pointer.tick {
    transform: translateX(-50%);
  }
}
