* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #1a1a2e;
  color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

#gameCanvas {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
}

#home-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  padding: 40px 50px;
  border-radius: 20px;
  border: 2px solid #e94560;
  min-width: 420px;
}

#home-screen h1 {
  font-size: 3em;
  color: #e94560;
  text-shadow: 0 0 20px rgba(233, 69, 96, 0.5);
  margin-bottom: 5px;
  letter-spacing: 4px;
}

.subtitle {
  color: #aaa;
  margin-bottom: 20px;
  font-size: 0.95em;
}

.easter-egg-tip {
  color: #666;
  font-size: 0.8em;
  margin-top: 15px;
  font-style: italic;
}

#username {
  display: block;
  width: 100%;
  padding: 12px 16px;
  font-size: 1.1em;
  border: 2px solid #333;
  border-radius: 10px;
  background: #16213e;
  color: #fff;
  outline: none;
  margin-bottom: 20px;
  text-align: center;
}

#username:focus {
  border-color: #e94560;
}

#skin-selector {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.skin-option {
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.2s;
  text-align: center;
}

.skin-option:hover {
  border-color: #555;
  background: rgba(255, 255, 255, 0.05);
}

.skin-option.selected {
  border-color: #e94560;
  background: rgba(233, 69, 96, 0.15);
}

.skin-option span {
  display: block;
  font-size: 0.75em;
  margin-top: 4px;
  color: #ccc;
}

.skin-preview {
  border-radius: 8px;
}

#play-btn, #respawn-btn, #home-btn {
  padding: 14px 40px;
  font-size: 1.2em;
  font-weight: bold;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 2px;
}

#play-btn {
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  width: 100%;
}

#play-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(233, 69, 96, 0.4);
}

#death-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  padding: 40px 50px;
  border-radius: 20px;
  border: 2px solid #e94560;
}

#death-screen h2 {
  font-size: 2.5em;
  color: #e94560;
  margin-bottom: 15px;
}

#death-stats {
  font-size: 1.1em;
  margin-bottom: 25px;
  color: #ccc;
  line-height: 1.8;
}

#respawn-btn {
  background: linear-gradient(135deg, #e94560, #c23152);
  color: #fff;
  margin-right: 10px;
}

#home-btn {
  background: #333;
  color: #fff;
}

#respawn-btn:hover, #home-btn:hover {
  transform: scale(1.03);
}

#scoreboard {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 18px;
  border-radius: 12px;
  z-index: 50;
  min-width: 180px;
  border: 1px solid rgba(233, 69, 96, 0.3);
}

#scoreboard h3 {
  text-align: center;
  color: #e94560;
  margin-bottom: 8px;
  font-size: 0.9em;
  letter-spacing: 2px;
}

#scoreboard-list {
  list-style: none;
  padding: 0;
  font-size: 0.85em;
}

#scoreboard-list li {
  padding: 2px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

#scoreboard-list li .name {
  color: #ddd;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}

#scoreboard-list li .score {
  color: #e94560;
  font-weight: bold;
}

#scoreboard-list li.me {
  color: #ffdd57;
}

#scoreboard-list li.me .name,
#scoreboard-list li.me .score {
  color: #ffdd57;
}

#minimap-container {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 50;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(233, 69, 96, 0.4);
}

#minimap {
  background: rgba(0, 0, 0, 0.6);
}

#my-score {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 1.1em;
  border: 1px solid rgba(233, 69, 96, 0.3);
}

#my-length {
  color: #e94560;
  font-weight: bold;
}

#kill-feed {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 50;
  max-width: 350px;
}

.kill-msg {
  background: rgba(0, 0, 0, 0.6);
  color: #ff69b4;
  padding: 4px 10px;
  margin-bottom: 4px;
  border-radius: 6px;
  font-size: 0.8em;
  border-left: 3px solid #e94560;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

#tip-display {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  background: rgba(0, 0, 0, 0.8);
  color: #ffdd57;
  padding: 10px 25px;
  border-radius: 20px;
  font-size: 0.9em;
  font-style: italic;
  transition: opacity 1s ease;
  white-space: nowrap;
  border: 1px solid rgba(255, 221, 87, 0.3);
}
