* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #0b120d;
  font-family: 'Courier New', Courier, monospace, system-ui, sans-serif;
  color: #e6f7ff;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* Minimap container */
#minimapContainer {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 180px;
  height: 105px;
  border: 2px solid rgba(82, 196, 26, 0.6);
  border-radius: 6px;
  background: rgba(14, 22, 16, 0.85);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  z-index: 10;
}

#minimapCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Top Action Controls in HUD */
.hud-btn {
  position: absolute;
  background: rgba(14, 24, 18, 0.85);
  border: 1px solid #52c41a;
  color: #52c41a;
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  z-index: 20;
  transition: all 0.2s ease;
}

.hud-btn:hover {
  background: rgba(82, 196, 26, 0.25);
  border-color: #73d13d;
  color: #ffffff;
}

#hudCopyRoomBtn {
  top: 20px;
  right: 215px;
  display: none;
}

#hudAudioBtn {
  top: 20px;
  left: 345px;
}

/* Start / Menu Modal */
#menuOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(16, 28, 20, 0.95) 0%, rgba(8, 14, 10, 0.98) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(5px);
  padding: 20px;
}

.menu-card {
  width: 620px;
  max-width: 95vw;
  max-height: 94vh;
  overflow-y: auto;
  background: #131c15;
  border: 2px solid #52c41a;
  border-radius: 12px;
  padding: 28px 28px;
  text-align: center;
  box-shadow: 0 0 40px rgba(82, 196, 26, 0.3), inset 0 0 20px rgba(0, 0, 0, 0.8);
  position: relative;
}

.menu-title {
  font-size: 32px;
  font-weight: 900;
  color: #ffec3d;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 14px rgba(255, 236, 61, 0.5), 2px 2px 0px #000;
  margin-bottom: 4px;
}

.menu-subtitle {
  font-size: 12px;
  color: #73d13d;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Player Customization Profile Bar */
.profile-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(82, 196, 26, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  gap: 16px;
  text-align: left;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-field label {
  font-size: 11px;
  color: #faad14;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.text-input {
  background: #0d1610;
  border: 1px solid #52c41a;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  font-weight: bold;
  outline: none;
}

.text-input:focus {
  border-color: #ffec3d;
  box-shadow: 0 0 8px rgba(255, 236, 61, 0.4);
}

.camo-picker {
  display: flex;
  gap: 6px;
}

.camo-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #333;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.camo-dot:hover {
  transform: scale(1.15);
}

.camo-dot.selected {
  border-color: #ffffff;
  box-shadow: 0 0 8px #ffffff;
  transform: scale(1.2);
}

/* Mode Tabs */
.tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(82, 196, 26, 0.3);
  padding-bottom: 8px;
}

.tab-btn {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(82, 196, 26, 0.3);
  color: #8c8c8c;
  padding: 10px 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #ffffff;
  border-color: #52c41a;
}

.tab-btn.active {
  background: #52c41a;
  color: #0d1610;
  border-color: #73d13d;
  box-shadow: 0 0 12px rgba(82, 196, 26, 0.4);
}

/* Tab Panels */
.tab-panel {
  display: none;
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(82, 196, 26, 0.35);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 18px;
  text-align: left;
}

.tab-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  color: #faad14;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.select-input {
  width: 100%;
  background: #0d1610;
  border: 1px solid #52c41a;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

/* Custom Checkbox / Toggle */
.toggle-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #e6f7ff;
}

.toggle-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #52c41a;
  cursor: pointer;
}

.badge-unlimited {
  color: #13c2c2;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(19, 194, 194, 0.5);
}

/* Action Buttons */
.play-btn {
  width: 100%;
  background: linear-gradient(180deg, #52c41a 0%, #389e0d 100%);
  color: #ffffff;
  border: none;
  font-size: 17px;
  font-weight: bold;
  padding: 14px 24px;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 4px 15px rgba(82, 196, 26, 0.4);
  transition: all 0.2s ease;
  font-family: inherit;
  margin-top: 6px;
}

.play-btn:hover {
  background: linear-gradient(180deg, #73d13d 0%, #52c41a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(82, 196, 26, 0.6);
}

.play-btn:active {
  transform: translateY(1px);
}

.play-btn.secondary {
  background: linear-gradient(180deg, #1890ff 0%, #096dd9 100%);
  box-shadow: 0 4px 15px rgba(24, 144, 255, 0.4);
}

.play-btn.secondary:hover {
  background: linear-gradient(180deg, #40a9ff 0%, #1890ff 100%);
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.6);
}

/* Game Over Modal */
#gameOverModal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 120;
  backdrop-filter: blur(6px);
}

.gameover-card {
  width: 520px;
  max-width: 90vw;
  background: #141f17;
  border: 2px solid #faad14;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 0 35px rgba(250, 173, 20, 0.35);
}

.gameover-title {
  font-size: 32px;
  font-weight: 900;
  color: #ff4d4f;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.gameover-mvp {
  font-size: 18px;
  font-weight: bold;
  color: #ffec3d;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(255, 236, 61, 0.4);
}

.leaderboard-list {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(82, 196, 26, 0.3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 24px;
  max-height: 200px;
  overflow-y: auto;
}

.leaderboard-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.leaderboard-row .rank {
  color: #faad14;
  font-weight: bold;
  width: 40px;
  text-align: left;
}

.leaderboard-row .name {
  flex: 1;
  text-align: left;
  color: #ffffff;
}

.leaderboard-row .score {
  color: #52c41a;
  font-weight: bold;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions button {
  flex: 1;
}

.footer-note {
  margin-top: 14px;
  font-size: 11px;
  color: #8c8c8c;
}
