* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: #0a0e1a;
  color: #fff;
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  overflow-x: hidden;
}

h1 {
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 4px;
  color: #4cc9f0;
  margin-bottom: 8px;
  text-shadow: 0 0 15px rgba(76,201,240,0.5);
}

#gameWrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(76,201,240,0.2);
}

canvas { display: block; max-width: 95vw; height: auto; }

#info, #fps, #mem {
  position: absolute;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
#info { bottom: 8px; right: 12px; }
#fps { bottom: 8px; left: 12px; }
#mem { top: 10px; left: 12px; }

#menuBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
#menuBtn:hover { background: rgba(0,0,0,0.7); }

#menu {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 14, 26, 0.95);
  z-index: 20;
  display: none;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(10px);
}
#menu.open { display: flex; }
#menu h2 {
  font-size: 13px;
  color: #4cc9f0;
  margin-bottom: 10px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
}
.section {
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 14px;
}
.section:last-child { border-bottom: none; }
.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.row label {
  font-size: 12px;
  color: #8b9bb4;
  min-width: 110px;
}
.chip {
  padding: 8px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s;
  user-select: none;
}
.chip:hover { background: rgba(76,201,240,0.15); border-color: #4cc9f0; }
.chip.active {
  background: rgba(76,201,240,0.3);
  border-color: #4cc9f0;
  color: #fff;
  font-weight: 600;
}
.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s;
}
.btn-primary { background: #2a9d8f; color: #fff; }
.btn-primary:hover { background: #35c4b3; }
.btn-danger { background: #e63946; color: #fff; }
.btn-danger:hover { background: #ff4d5e; }
.btn-ghost { background: rgba(255,255,255,0.1); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,0.2); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

input[type="number"], input[type="text"] {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  width: 90px;
}

/* ============================================
   FIX UNTUK DROPDOWN SELECT
   ============================================ */
select {
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
  padding-right: 30px;
}

select:hover {
  background-color: rgba(76, 201, 240, 0.15);
  border-color: #4cc9f0;
}

select option {
  background: #0a0e1a;
  color: #fff;
  padding: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 6px;
}