body {
  font-family: Arial, sans-serif;
  text-align: center;
  background-color: #f4f4f4;
  margin: 0;
  padding: 50px;
  overflow-x: hidden;
}
.container {
  margin: 4rem auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: inline-block;
}
.stopwatch {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
}
button {
  font-size: 1rem;
  padding: 10px 20px;
  margin: 5px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  transition: background 0.3s;
}
.start {
  background-color: #4caf50;
  color: white;
}
.start:hover {
  background-color: #45a049;
}
.stop {
  background-color: #f44336;
  color: white;
}
.stop:hover {
  background-color: #d32f2f;
}
.reset {
  background-color: #008cba;
  color: white;
}
.reset:hover {
  background-color: #007bb5;
}
.lap {
  background-color: #ff9800;
  color: white;
}
.lap:hover {
  background-color: #e68900;
}
.laps {
  margin-top: 20px;
  text-align: left;
}
.laps ul {
  list-style-type: none;
  padding: 0;
}
.laps li {
  background: #ddd;
  margin: 5px 0;
  padding: 5px 10px;
  border-radius: 5px;
}

.navbar {
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  display: flex;
  justify-content: flex-start;
}

.back-button {
  background: #2867f0;
  color: white;
  border: none;
  padding: 0.8rem 20px;
  width: 4rem;
  height: 2.5rem;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: #0190f6;
  transform: scale(1.05);
}

.toggle-dark-mode {
  position: absolute;
  top: 14px;
  right: 50px;
  cursor: pointer;
  transition: 0.3s;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode {
  background-color: #212529;
  color: white;
  padding: 50px;
}

.dark-mode .container {
  background: #4b5259;
  color: white;
}

.dark-mode button {
  background: #495057;
}
.dark-mode h1 {
  color: goldenrod;
}
.dark-mode .laps li {
  background: #333;
}
.dark-mode h3 {
  color: goldenrod;
}

.dark-mode button:hover {
  background: #6c757d;
}
