.loading-overlay {
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.roulette-container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1600px;
  margin: 0 auto 2rem;
  width: 100%;
}

.game-history {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--secondary-bg);
  border-radius: 16px;
  overflow-x: auto;
  width: fit-content;
  margin: 0 auto;
  max-width: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.history-item {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  animation: popIn 0.3s ease-out;
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.history-item i {
  font-size: 12px;
  line-height: 1;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-item.red {
  background: linear-gradient(135deg, #ff4444, #cc3333);
}
.history-item.black {
  background: linear-gradient(135deg, #34495e, #2c3e50);
}
.history-item.green {
  background: linear-gradient(135deg, #4caf50, #388e3c);
}
.history-item.blue {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.roulette-game {
  background: var(--secondary-bg);
  border-radius: 16px;
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}

.spinner-container {
  position: relative;
  height: 120px;
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.spinner-track {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.spinner {
  position: absolute;
  left: 0;
  display: flex;
  height: 100%;
  transition: transform 7s cubic-bezier(0.64, 0, 0.12, 1);
}

.spinner-item {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 2px;
  border-radius: 10px;
  transition: transform 0.3s ease;
  color: rgba(255, 255, 255, 0.9);
  position: relative;
  top: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.spinner-item i {
  font-size: 56px;
  line-height: 1;
  transform: scale(1);
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.spinner-item.active {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

.spinner-item.winning {
  animation: winningTileAnimation 0.6s ease-in-out;
}

@keyframes winningTileAnimation {
  0%,
  100% {
    top: 0;
  }
  50% {
    top: -20px;
  }
}

.spinner-pointer {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-color);
  transform: translateX(-50%);
  z-index: 1;
  box-shadow: 0 0 10px rgba(255, 144, 0, 0.6);
}

.spinner-pointer::before,
.spinner-pointer::after {
  content: "";
  position: absolute;
  left: 50%;
  border: 6px solid transparent;
  transform: translateX(-50%);
}

.spinner-pointer::before {
  top: -6px;
  border-top: 6px solid var(--accent-color);
}

.spinner-pointer::after {
  bottom: -6px;
  border-bottom: 6px solid var(--accent-color);
}

.game-info {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.timer {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
}

.timer-circle {
  position: relative;
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 144, 0, 0.3);
  padding: 2px;
}

.timer-circle svg {
  transform: rotate(-90deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.timer-circle span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  color: white;
}

.timer-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.25rem auto 0;
  z-index: 5;
  width: 100%;
}

.timer-container .timer-circle {
  position: relative;
  width: 60px;
  height: 60px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 144, 0, 0.3);
  padding: 2px;
}

.timer-container .timer-circle svg {
  transform: rotate(-90deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.timer-container .timer-circle span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  color: white;
}

.betting-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.bet-container {
  background: var(--secondary-bg);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.03);
  min-width: 0;
  min-height: 320px;
}

.bet-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bet-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.bet-header .icon-container {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  box-shadow: none;
}

.bet-header .icon-container i {
  font-size: 16px;
  color: rgba(255, 255, 255, 1);
}

.multiplier {
  font-size: 22px;
  font-weight: 600;
  text-shadow: none;
}

.color-indicator {
  width: 20px;
  height: 20px;
  border-radius: 8px;
}

.bet-container.red .color-indicator {
  background: linear-gradient(135deg, #ff4444, #cc3333);
}
.bet-container.black .color-indicator {
  background: linear-gradient(135deg, #34495e, #2c3e50);
}
.bet-container.green .color-indicator {
  background: linear-gradient(135deg, #4caf50, #388e3c);
}
.bet-container.blue .color-indicator {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.total-bet {
  margin-left: auto;
  font-weight: 500;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.15);
  padding: 0.3rem 0.5rem;
  border-radius: 8px;
  box-shadow: none;
}

.total-bet i {
  font-size: 14px;
  color: var(--accent-color);
}

.bet-input {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.bet-input input {
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  color: var(--text-color);
  font-size: 14px;
  box-shadow: none;
  transition: all 0.2s ease;
  -moz-appearance: textfield;
  height: 40px;
  font-weight: 500;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.bet-input input::-webkit-outer-spin-button,
.bet-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bet-input input:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 1px var(--accent-color);
  background: rgba(0, 0, 0, 0.25);
}

.bet-input input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
  text-align: center;
}

.quick-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.quick-actions button {
  flex: 1;
  padding: 0.6rem 0.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
}

.quick-actions button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quick-actions button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.place-bet-btn {
  padding: 0.7rem;
  background: var(--accent-color);
  border: none;
  border-radius: 10px;
  color: #000;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.75rem;
  height: 42px;
}

.place-bet-btn:hover {
  background: #ffa726;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(255, 144, 0, 0.25);
}

.active-bets {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  max-height: none;
  overflow-y: auto;
  padding-top: 0.25rem;
}

.bet-count {
  color: var(--text-secondary);
  font-size: 12px;
  margin-bottom: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  display: inline-block;
}

.betters-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  max-height: 200px;
  padding-right: 0.5rem;
}

.betters-list::-webkit-scrollbar {
  width: 4px;
}

.betters-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.betters-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.better {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  transition: all 0.2s;
}

.better:hover {
  background: rgba(255, 255, 255, 0.05);
}

.better.current-user {
  background: rgba(255, 144, 0, 0.1);
  border: 1px solid rgba(255, 144, 0, 0.2);
}

.better img {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  object-fit: cover;
}

.better .name {
  flex: 1;
  font-size: 14px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.better .amount {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.better .amount i {
  font-size: 12px;
  color: var(--accent-color);
}

.bet-count {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eos-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(6px);
  border-radius: 16px;
}

.eos-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.eos-overlay i {
  font-size: 36px;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  animation: spin 2s linear infinite;
  background: rgba(255, 144, 0, 0.1);
  padding: 1rem;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 144, 0, 0.3);
}

.eos-text {
  color: var(--text-color);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.eos-subtext {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 300px;
  text-align: center;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.bet-container.disabled {
  opacity: 0.7;
  pointer-events: none;
}

.bet-container.disabled .place-bet-btn {
  background: #666;
  cursor: not-allowed;
  box-shadow: none;
}

.winning-flash {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
  opacity: 0;
  border-radius: 16px;
  z-index: 5;
}

.winning-flash.red {
  background: rgba(255, 68, 68, 0.2);
}
.winning-flash.black {
  background: rgba(44, 62, 80, 0.2);
}
.winning-flash.green {
  background: rgba(76, 217, 100, 0.2);
}
.winning-flash.blue {
  background: rgba(52, 152, 219, 0.2);
}

.winning-flash.active {
  animation: flash 1s ease-out;
}

@keyframes flash {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.spinner-item.red {
  background: linear-gradient(135deg, #ff4444, #cc3333);
}
.spinner-item.black {
  background: linear-gradient(135deg, #34495e, #2c3e50);
}
.spinner-item.green {
  background: linear-gradient(135deg, #4caf50, #388e3c);
}
.spinner-item.blue {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 1400px) {
  .betting-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 1200px) {
  .better .name {
    max-width: 100px;
  }

  .better .amount {
    font-size: 12px;
  }

  .betters-list {
    grid-template-rows: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .betting-options {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .better .name {
    max-width: 150px;
  }

  .betters-list {
    grid-template-rows: repeat(2, 1fr);
  }

  .roulette-game {
    padding: 1rem;
  }

  .history-item {
    width: 24px;
    height: 24px;
  }

  .spinner-container {
    height: 100px;
  }

  .spinner-item {
    width: 100px;
    height: 100px;
  }

  .spinner-item i {
    font-size: 50px;
  }

  .timer {
    top: 5px;
    right: 5px;
  }

  .timer-circle {
    width: 50px;
    height: 50px;
  }

  .timer-container .timer-circle {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 768px) {
  .betting-options {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .betters-list {
    grid-template-rows: 1fr;
    max-height: 100px;
  }

  .better .name {
    max-width: 120px;
  }
}

@media (max-width: 576px) {
  .roulette-container {
    padding: 0.5rem;
    gap: 0.75rem;
  }

  .history-item {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .bet-container {
    padding: 0.75rem;
  }

  .bet-header .icon-container {
    width: 28px;
    height: 28px;
  }

  .multiplier {
    font-size: 20px;
  }

  .total-bet {
    font-size: 14px;
    padding: 0.3rem 0.5rem;
  }

  .quick-actions {
    gap: 0.25rem;
  }

  .quick-actions button {
    padding: 0.4rem 0.25rem;
    font-size: 11px;
  }

  .place-bet-btn {
    padding: 0.6rem;
    font-size: 13px;
  }

  .timer {
    top: 5px;
    right: 5px;
  }

  .timer-circle {
    width: 40px;
    height: 40px;
  }

  .timer-circle span {
    font-size: 16px;
  }

  .timer-container .timer-circle {
    width: 40px;
    height: 40px;
  }

  .timer-container .timer-circle span {
    font-size: 16px;
  }

  .better .name {
    max-width: 80px;
  }
}
