/* ================== GAME CANVAS ================== */
#gameContainer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  z-index: 1000;
}

/* ================== PROGRESS MODAL ================== */
#progressModal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(20, 20, 30, 0.95);
  color: white;
  padding: 30px;
  border-radius: 15px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  z-index: 1010;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  min-width: 280px;
  max-width: 90%;
  text-align: center;
  animation: fadeInModal 0.4s ease-out;
}

#progressModal h2 {
  margin-top: 0;
  font-size: 1.6em;
  color: #ff9933;
}

#progressModal p {
  margin: 8px 0;
  line-height: 1.4;
}

/* Botões do modal */
#progressModal button {
  background: #555;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#progressModal .close-btn {
  background: #ff4444;
}
#progressModal .close-btn:hover {
  background: #ff0000;
}
#progressModal .menu-btn {
  background: #3399ff;
  margin-left: 10px;
}
#progressModal .menu-btn:hover {
  background: #0066cc;
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: translate(-50%, -55%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ================== GARAGE CARD ================== */
.garage-card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ================== SERVER LIST ================== */
.server-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.server-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  transition: background 0.2s ease;
}

.server-list li:hover {
  background: rgba(255, 255, 255, 0.12);
}

.server-list img {
  width: 46px;
  height: 34px;
  border-radius: 4px;
  flex-shrink: 0;
}

.server-list span {
  flex: 1;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.server-list input[type="radio"] {
  accent-color: #facc15;
  width: 16px;
  height: 16px;
}

/* ================== STORE LAYOUT ================== */
#mainContent {
  transition: all 0.3s ease-in-out;
}

.store-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.store-sidebar {
  width: 160px;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  flex-shrink: 0;
}

.store-main {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative; /* necessário para o cálculo interno */
}

/* grid dos carros */
#carListContainer {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  overflow-y: auto;
  padding: 4px;
}

/* Efeito suave de rolagem global */
html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

#gameContainer canvas {
  display: block;
  margin: auto;
  width: 100%;
  height: 100%;
}

@media (max-width: 600px) {
  /* Força orientação paisagem no mobile */
  body {
    writing-mode: horizontal-tb;
    /* Opcional: avisa o usuário para girar o dispositivo */
  }
}
