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

h1 {
    color: #3c6b64;
    font-size: 1.5rem;
    margin: 0;
}

.container {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    background: linear-gradient(to bottom, #eef6f5, #a6d0cb);
    padding: 10px 20px 20px 20px;
    /* background-color: #5ea297; */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    /* min-height: 100vh; */
    justify-content: flex-start;
    align-items: center;
    margin: 0 auto;
}

.floating-buttons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* allow clicks through the wrapper */
}


.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 */
    z-index: 1;

  }
.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);
}

.popup-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 350px;
  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;
}

.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;
}

#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;
}

.popup-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(1px);
  z-index: 950;
  display: none;
}

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

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

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

#navList {
  margin: 0;
  padding: 0;
}

#navList li {
  margin: 0;
}

#navList li:nth-child(odd) .jump-link {
  background-color: #f7fbfa;
}

#navList li:nth-child(even) .jump-link {
  background-color: #e4f4f3;
}

.jump-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  border-radius: 6px;
  color: #2d5b54;
}

.nav-question-title {
  flex: 1;
  font-weight: 500;
}

.nav-question-score {
  color: #3c6b64;
  min-width: 2.5ch;
  text-align: right;
}

.nav-total {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid #c2e1dc;
}

.nav-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 6px;
  background-color: #cfe5e2;
  font-weight: 600;
  color: #24554f;
  pointer-events: none;
}

.nav-total-row .nav-question-score {
  color: #24554f;
}


.header-container {
  position: relative;
  width: 100%;
  height: 80px; /* or however tall you want the header */
  display: flex;
  align-items: center;
  justify-content: center; /* centers h1 horizontally */
}

.section-container {
  width: 100%;
 max-height: clamp(320px, 60vh, 560px);
 overflow: auto;
 padding-right: 2px;
 padding-bottom: 20px;
}

.question-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #3c6b64;
  margin-bottom: 10px;
}

/* Instructions Text */
.question-instructions {
  font-size: 1.1rem;
  font-style: bold;
  font-family: sans-serif;
  color: #3c6b64;
  margin-bottom: 30px;
}

/* Option Wrapper */
.options {
  margin-bottom: 20px;
}

/* Each Option Label */
.option-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-style:bold;
  font-family: sans-serif;
  font-size: 1rem;
  color: #3c6b64;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1.4;
}

.option-label:hover {
  background-color: #f0f0f0;
}

/* Radio Input */
.option-radio {
  margin-right: 4px;
  margin-top: 4px;
  transform: scale(1.2);
  flex-shrink: 0;
  accent-color: black;
}

.option-score {
  font-weight: bold;
  color: #3c6b64;
  min-width: 20px;
  padding-right: 20px;
  text-align: right;
}

/* Option Text */
.option-text {
  flex: 1;
  vertical-align: middle;
}

/* Navigation Buttons */
.buttons {
  margin-top: 25px;
}

.buttons button {
  background-color: #65b0a5;
  color: white;
  border: none;
  padding: 10px 18px;
  margin-right: 10px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.buttons button:hover {
  background-color: #4a9387;
}

.score-box {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  background-color: #e0f4f2;
  border: 2px solid #65b0a5;
  padding: 10px 15px;
  border-radius: 8px;
  margin-top: 30px;
  text-align: center;
}

.page-score-box {
  font-size: 1rem;
  font-weight: bold;
  color: #333;
  background-color: #f1f9f8;
  border: 1px solid #65b0a5;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 0px;
  text-align: center;
}


.time-input-row {
  margin: 12px 0 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.time-input-row label { min-width: 120px; }
.stopwatch-input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer; /* indicates tappable */
  background: #fff;
}
