body {
  font-family: system-ui, sans-serif;
  background-color: #333333;
}

h1 {
  font-size: 3em;
  margin-bottom: 20px;
  font-weight: bolder;
  color: #ffffff;
}

h2, h3 {
  color: #ffffff;
}

h3 {
  font-size: 1em;
  margin-bottom: 10px;
  font-weight: bold;
}

#time {
  font-size: 2em;
  margin-bottom: 10px;
  color: #ffffff;
}

ul {
  margin-top: 10px;
  list-style: none;
  padding-left: 0;
  color: #ffffff;
}

li.Purple {
  background-image: url('./Splits textures/greensplit.png');
  background-color: #00ff2f;
  padding: 4px;
  border-radius: 4px;
}

li.Red {
  background-image: url('./Splits textures/redsplit.png');
  background-color: #ff0000;
  padding: 4px;
  border-radius: 4px;
}

li.Grey {
  background-color: #cdcdcd;
  padding: 4px;
  border-radius: 4px;
}

#bestRunDisplay {
  color: #ffffff;
}

.best-run {
  font-weight: bold;
  color: rgb(0, 196, 0);
}

@media all and (max-width: 365px) {
  #controls {
    flex-direction: column;
    gap: 0.5rem;
  }
}

#controls,
#bottomcontrols {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

button {
  background-color: rgb(117, 195, 255);
  font-weight: bold;
  font-size: 1.1rem;
  border-radius: 0.2rem;
  border: none;
  color: rgb(15, 52, 91);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
}

main {
  max-width: 600px;
  padding: 2rem;
}

.bottombutton {
  width: 40%;
}

#currentRunList > li {
  margin-bottom: 0.2rem;
}

.card {
  background-color: #4a4a4a;
  padding: 0.7rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.card > h3,
.card > ul {
  margin: 0;
}

/* New: Add/remove split buttons */
#splitControls {
  display: flex;
  justify-content: space-between;
  margin-top: 0.7rem;
}

.splitBtn {
  background-color: rgb(117, 195, 255);
  color: rgb(15, 52, 91);
  font-size: 0.9rem;
  padding: 0.5rem;
  border-radius: 0.3rem;
  border: none;
  cursor: pointer;
  flex: 1;
  margin: 0 0.25rem;
}

.edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.edit-btn::before {
  content: '✎';
  color: #ffffff;
  font-size: 0.9rem;
}
/* ===== Modal Styling ===== */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: #4a4a4a;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 500px;
  color: white;
}

.close-button {
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

#splitEditList {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

#splitEditList li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

#splitEditList input {
  flex: 1;
  padding: 0.4rem;
  font-size: 1rem;
  margin-right: 0.5rem;
  border-radius: 4px;
  border: none;
}

#splitEditList button {
  padding: 0.4rem;
  font-size: 0.9rem;
  background-color: crimson;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.modal-controls {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.modal-controls button {
  flex: 1;
  padding: 0.7rem;
  background-color: #75c3ff;
  color: rgb(15, 52, 91);
  font-weight: bold;
  font-size: 1rem;
  border-radius: 0.4rem;
  border: none;
  cursor: pointer;
}
