html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}
body {
  background-color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.container {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  background: linear-gradient(to bottom, #eef6f5, #a6d0cb);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.floating-buttons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.back-button,
.menu-button {
    width: 10%;
    aspect-ratio: 1 / 1;
    position: absolute;
    border-radius: 50%;
    background-color: #ffffff92;
    border: none;
    display: flex;
    justify-content: center;
    cursor: pointer;
    pointer-events: all; /* allow these buttons to be clickable */
}
.back-button {
    top: 3%;
    left: 3%;
    align-items: center;
}
.back-button::before {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 5px solid rgb(254, 153, 0);
    border-left: 5px solid rgb(254, 153, 0);
    transform: rotate(-45deg);
    /* move to the right 2px */
    margin-left: 3px;
}
.menu-button {
    bottom: 5%;
    right: 5%;
    align-items: center;
}
.menu-button::before {
    content: '';
    width: 20px;
    height: 3px;
    border-radius: 1px;
    background-color: rgb(254, 153, 0);
    box-shadow:
    0 8px 0 0 rgb(254, 153, 0),
    0 -8px 0 0 rgb(254, 153, 0);
}

h1 {
  color: #3c6b64;
  font-size: 2rem;
  text-align: center;
  margin: 0;
}

hr {
  width: 85%;
  height: 3px;
  background-color: #3c6b64;
  border: none;
  margin: 10px 0;
}

.instructions {
  width: 90%;
  color: #3c6b64;
}

.instructions a {
  font-weight: bold;
  text-decoration: underline;
  color: #3c6b64;
}

.instructions p {
  font-style: italic;
  font-size: 1rem;
  margin-top: 5px;
}

.input-section {
  background-color: #3c6b64;
  padding: 20px;
  border-radius: 20px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: white;
  margin-top: 20px;
}

.input-pair {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-pair input {
  padding: 5px;
  font-size: 1.2rem;
  border-radius: 5px;
  border: none;
  text-align: center;
}

.average {
  font-weight: bold;
  font-size: 1.2rem;
}

.submit-container {
  margin-top: 20px;
}

.submit-button {
  background-color: #65b0a5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.5rem;
  font-weight: bold;
  padding: 10px 30px;
  cursor: pointer;
}

#stopwatchToggle {
  font-size: 1rem;
  border-radius: 10px;
  /*left: 100px;*/
  top: 50%;
  transform: translateY(-50%);
  width: 90px;
  height: 40px;
  border-radius: 10px;
  background-color: #3c6b64; 
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: sans-serif;
}

.popup-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 15px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease-in-out;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 10px;
  color:black;
  cursor: move;
  padding: 5px;
  border-radius: 6px 6px 0 0;
}

.popup-close {
  font-size: 1.3rem;
  cursor: pointer;
  color: #c0392b;
}

#popupStopwatch {
  font-size: 2rem;
  margin-bottom: 15px;
  text-align: center;
  color: black;
}

.popup-controls button {
  margin: 5px;
  padding: 8px 16px;
  background-color: #3c6b64;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.menu-popup {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.menu-popup-content {
  background-color: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.menu-popup-content button {
  margin: 1rem;
  font-size: 1.2rem;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
}

.menu-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 1em 0;
}

.menu-list li {
  margin: 0.5em 0;
  font-size: 1.2em;
}

.menu-list a {
  color: #333;
  text-decoration: none;
}