body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 20px;
  color: #333;
}

.header {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background-color: #0074D9;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}

button:hover {
  background-color: #005bb5;
}

#bgSelector {
  padding: 6px;
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(10, 60px);
  gap: 6px;
  justify-content: center;
  margin: 20px auto;
  max-width: 660px;
}

.element-btn {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 6px;
  border: 2px solid #333;
  color: #000;
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px;
}

.element-btn:hover {
  outline: 3px solid #FFD700;
}

.element-btn .num {
  font-size: 10px;
  align-self: flex-start;
}

.element-btn .symbol {
  font-size: 18px;
  margin: auto 0;
}

.element-btn .weight {
  font-size: 10px;
  align-self: flex-end;
}

.selected-box {
  display: flex;
  gap: 10px;
  padding: 10px;
  flex-wrap: wrap;
  border: 1px solid #ccc;
  background: #fff;
  margin-bottom: 20px;
  min-height: 40px;
  justify-content: center;
}

.selected-tile {
  padding: 10px 14px;
  font-weight: bold;
  color: #fff;
  border-radius: 5px;
  text-align: center;
  min-width: 40px;
}

canvas {
  display: block;
  margin: 0 auto 30px;
  border: 2px solid #aaa;
  background-color: #fff;
}

#saved-combos {
  padding: 10px;
  border: 1px solid #ccc;
  background: #fff;
  min-height: 100px;
}
