body {
  font-family: Arial, sans-serif;
  background-color: #ffffff;
  color: #000000;
  text-align: center;
  margin: 0;
  padding: 0;
}

h1 { background-color: #ff9191; padding: 15px; border-bottom: 2px solid #30363d; }

#legend { display: flex; justify-content: center; flex-wrap: wrap; margin: 10px 0; }
.legend-item { padding: 5px 10px; margin: 2px; color: #000; font-weight: bold; border-radius: 4px; }

#periodic-table {
  display: grid;
  grid-template-columns: repeat(18, 50px);
  grid-auto-rows: 50px;
  grid-gap: 4px;
  justify-content: center;
  margin: 20px auto;
}

.element {
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  color: rgb(0, 0, 0);
  transition: transform 0.2s, box-shadow 0.2s;
}

.element:hover { transform: scale(1.1); box-shadow: 0 0 10px rgba(255,255,255,0.3); }

#workspace { display: flex; justify-content: space-around; margin-top: 20px; flex-wrap: wrap; }
#calculator, #lewisDiagram {
  background-color: #b9d6ff; border-radius: 10px; padding: 15px; width: 45%; min-width: 300px;
  box-shadow: 0 0 10px #30363d; margin-bottom: 20px;
}
input, select { padding: 5px; margin: 5px; }
button { padding: 5px 10px; margin: 5px; background: #238636; color: white; border: none; border-radius: 5px; cursor: pointer; }

#diagramArea { margin-top: 10px; }
.diagram-circle {
  position: relative; width: 80px; height: 80px; margin: 10px auto; border-radius: 50%;
  border: 2px solid white; display: flex; justify-content: center; align-items: center; font-weight: bold;
}
.dot {
  position: absolute; width: 10px; height: 10px; background-color: white; border-radius: 50%;
}
