.crash-container {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

.game-section {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 1400px;
  margin-bottom: 1rem;
}

.game-controls {
  width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem;
  background: var(--secondary-bg);
  border-radius: 16px;
  height: fit-content;
}

.mode-selector {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.5rem;
  border-radius: 10px;
  width: fit-content;
}

.mode-selector span {
  color: var(--text-color);
  font-weight: 500;
  font-size: 14px;
}

.bet-input {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.bet-input-field {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.75rem;
  border-radius: 10px;
  align-items: center;
}

.bet-input-field input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  padding: 0.25rem;
  width: 100%;
}

.bet-input-field input:focus {
  outline: none;
}

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

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

.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);
}

.total-earnings {
  margin-top: auto;
  padding-top: 1rem;
}

.total-earnings .input-label {
  margin-bottom: 0.5rem;
}

.earnings-display {
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  color: var(--text-color);
  font-size: 18px;
  font-weight: 500;
}

.action-button {
  width: 100%;
  padding: 1rem;
  border: none;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 16px;
  margin-top: 1rem;
  background: var(--accent-color);
  color: #000;
}

.action-button:hover {
  filter: brightness(1.1);
}

.action-button.cashout {
  background: #4caf50 !important;
  color: white !important;
}

.action-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.crash-game {
  background: var(--secondary-bg);
  border-radius: 16px;
  padding: 2rem;
  width: 900px;
  position: relative;
  height: 600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.crash-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.3;
}

.crash-bg-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crash-graph {
  flex: 1;
  position: relative;
  margin: 20px 30px;
  z-index: 1;
}

.grid-lines {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  grid-template-rows: repeat(10, 1fr);
}

.grid-lines::before {
  display: none;
}

.crash-line-container {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.crash-line {
  fill: none;
  stroke: var(--accent-color);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(255, 144, 0, 0.3));
}

.crash-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 15px var(--accent-color);
  animation: pulse 1s ease-in-out infinite;
  pointer-events: none;
}

.crash-tracker {
  position: absolute;
  width: 150px;
  height: 150px;
  transform-origin: center center;
  pointer-events: none;
  z-index: 2;
  margin-left: -75px;
  margin-top: -75px;
  transform: rotate(45deg);
  filter: drop-shadow(0 0 25px rgba(255, 71, 71, 0.6));
  animation: rocketGlow 2s ease-in-out infinite;
}

.crash-tracker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 15px var(--accent-color);
  }
  50% {
    box-shadow: 0 0 25px var(--accent-color);
  }
  100% {
    box-shadow: 0 0 15px var(--accent-color);
  }
}

@keyframes rocketGlow {
  0% {
    filter: drop-shadow(0 0 25px rgba(255, 71, 71, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 35px rgba(255, 71, 71, 0.8));
  }
  100% {
    filter: drop-shadow(0 0 25px rgba(255, 71, 71, 0.6));
  }
}

.y-axis {
  position: absolute;
  left: -40px;
  top: 20px;
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.y-axis-label {
  transform: translateX(-5px);
  transition: all 0.3s ease;
  opacity: 0.7;
  color: #9ca3af;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
  font-size: 12px;
}

.y-axis-label.active {
  color: var(--accent-color);
  opacity: 1;
  transform: translateX(-5px) scale(1.05);
  background: rgba(255, 144, 0, 0.1);
  border: 1px solid rgba(255, 144, 0, 0.2);
  box-shadow: 0 0 15px rgba(255, 144, 0, 0.1);
}

.x-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -35px;
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.x-axis-label {
  transform: translateY(5px);
  transition: all 0.3s ease;
  opacity: 0.7;
  color: #9ca3af;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: -0.2px;
  font-size: 12px;
}

.x-axis-label.active {
  color: var(--accent-color);
  opacity: 1;
  transform: translateY(5px) scale(1.05);
  background: rgba(255, 144, 0, 0.1);
  border: 1px solid rgba(255, 144, 0, 0.2);
  box-shadow: 0 0 15px rgba(255, 144, 0, 0.1);
}

.crash-multiplier {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 96px;
  font-weight: 600;
  color: var(--text-color);
  text-shadow: 0 0 30px rgba(255, 144, 0, 0.2);
  opacity: 0.1;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: baseline;
}

.crash-multiplier.active {
  opacity: 1;
}

.crash-multiplier .value {
  font-size: inherit;
}

.crash-multiplier .label {
  font-size: 48px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.players-container {
  width: 500px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--secondary-bg);
  border-radius: 16px;
  margin-top: 1rem;
}

.players-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  padding-right: 5px;
}

.players-list::-webkit-scrollbar {
  width: 6px;
}

.players-list::-webkit-scrollbar-track {
  background: transparent;
}

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

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  transition: background 0.2s;
  height: 58px;
  box-sizing: border-box;
  margin-bottom: 0.5rem;
}

.player-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.player-avatar {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-name {
  color: var(--text-color);
  font-weight: 500;
}

.player-bet {
  color: var(--text-secondary);
}

.player-multiplier {
  color: #4caf50;
  font-weight: 500;
}

.player-multiplier.waiting {
  color: var(--accent-color);
}

/* Crash Game Info Modal Styles */
#crash-game-info .modal-content {
  background: linear-gradient(135deg, #2a2d3f 0%, #3a3d54 100%);
  border: 1px solid #4a4d64;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  max-width: 580px;
  margin: 2rem auto;
}

#crash-game-info .modal-header {
  background: linear-gradient(135deg, #ff8f32 0%, #ff6b1a 100%);
  border-radius: 12px 12px 0 0;
  padding: 1.5rem 2rem;
  border-bottom: none;
}

#crash-game-info .modal-title {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#crash-game-info .modal-title i {
  font-size: 1.25rem;
}

#crash-game-info .modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#crash-game-info .modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

#crash-game-info .modal-body {
  padding: 2rem;
  color: var(--text-color);
}

.game-info-section {
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border-left: 4px solid #ff8f32;
}

.info-icon {
  background: linear-gradient(135deg, #ff8f32, #ff6b1a);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-content h3 {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.info-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

.strategy-section {
  background: rgba(255, 143, 50, 0.1);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 143, 50, 0.2);
}

.strategy-section h3 {
  color: #ff8f32;
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.strategy-section > p {
  color: var(--text-color);
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: 500;
}

.limits-section h4 {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid #ff8f32;
}

#crash-game-info .modal-footer {
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: center;
}

#crash-game-info .btn-primary {
  background: linear-gradient(135deg, #4CAF50, #45a049);
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#crash-game-info .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

@media screen and (max-width: 1024px) {
  .game-section {
    flex-direction: column;
  }
  .players-container {
    width: 100% !important;
  }
  .game-controls {
    width: 100% !important;
  }
  .crash-game {
    width: 100% !important;
  }
}

#livechat-container {
  width: 100% !important;
}

#footer-container {
  width: 100%;
  margin-top: 2rem;
}

.crash-history-container {
  position: absolute;
  top: 5px;
  left: 10px;
  right: 10px;
  height: 30px;
  z-index: 5;
  padding: 0 8px;
  display: flex;
  align-items: center;
}

#crash-history {
  display: flex;
  flex: 1;
  height: 100%;
  gap: 4px;
  overflow-x: hidden;
  background: transparent;
  border-radius: 6px;
  padding: 0 8px;
  align-items: center;
}

.crash-history-item {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.25px;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  background: none;
  min-width: 40px;
  text-align: center;
  opacity: 0.9;
}

.crash-history-item:hover {
  transform: none;
  opacity: 1;
  box-shadow: none;
}

.new-history-item {
  animation: historyPulse 0.8s ease-in-out;
}

@keyframes historyPulse {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}
