
:root {
  --primary: #00f2ff;
  --primary-dark: #00c2cc;
  --accent: #ff00e5;
  --bg: #0a0a0f;
  --surface: #161621;
  --text: #ffffff;
  --text-muted: #a0a0b8;
  --border: rgba(255, 255, 255, 0.1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow: hidden; /* Prevent scrolling */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 900; text-transform: uppercase; letter-spacing: -1px; }
span { color: var(--primary); }

.btn-main {
  background: var(--primary);
  color: #000;
  border: none;
  padding: 1.2rem 2.5rem;
  font-size: 1rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
}
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 0 30px rgba(0, 242, 255, 0.5); }

.game-wrapper {
  max-width: 1000px;
  background: var(--surface);
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--border);
  position: relative;
  box-shadow: 0 0 50px rgba(0, 242, 255, 0.1);
}
.game-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  align-items: center;
}
.player-info { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.status-dot { width: 8px; height: 8px; background: #39ff14; border-radius: 50%; box-shadow: 0 0 10px #39ff14; }
canvas {
  width: 100%;
  height: 600px;
  background: #050508;
  border-radius: 12px;
  display: block; /* Remove extra space below canvas */
}
.leaderboard-mini {
  position: absolute;
  top: 100px;
  right: 40px;
  background: rgba(0,0,0,0.6);
  padding: 1rem;
  border-radius: 10px;
  backdrop-filter: blur(5px);
  min-width: 150px;
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.1);
}
.leaderboard-mini h3 { font-size: 0.8rem; margin-bottom: 0.5rem; color: var(--text-muted); }
.leaderboard-mini ul { list-style: none; }
.leaderboard-mini li { font-size: 0.9rem; margin-bottom: 0.3rem; display: flex; justify-content: space-between; }
.leaderboard-mini li span:last-child { color: var(--primary); font-weight: 600; }


.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex; /* Changed to flex to show by default */
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  background: var(--surface);
  padding: 3rem;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 0 50px rgba(0, 242, 255, 0.2);
}
.modal h2 { margin-bottom: 2rem; }
input {
  width: 100%;
  padding: 1rem;
  background: #0a0a0f;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  margin-bottom: 1.5rem;
  font-family: inherit;
}
.color-picker { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.color-opt {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: 0.2s;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.1);
}
.color-opt.active { border-color: #fff; transform: scale(1.2); box-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }

@media (max-width: 768px) {
  .game-wrapper {
    margin: 1rem;
    padding: 1rem;
  }
  .leaderboard-mini {
    position: static;
    margin-top: 1rem;
    width: 100%;
    text-align: left;
    backdrop-filter: none;
    background: rgba(0,0,0,0.3);
  }
  canvas { height: 400px; }
}
