body {
  background-color: #f4f4f4;
  color: #333;
  font-family: 'Arial', sans-serif;
  font-size: 20px;
  justify-content: center;
  text-align: center;
  margin: 0;
  padding: 0;
}

h1 {
  font-weight: bold;
  font-size: 42px;
  color: #222;
  margin-bottom: 15px;
}

h2 {
  font-weight: bold;
  font-size: 32px;
  margin-top: 10px;
}

h3 {
  font-weight: bold;
  font-size: 28px;
  margin-top: 30px;
  margin-bottom: 10px;
}

h4 {
  font-weight: bold;
  font-size: 24px;
  margin-top: 15px;
  margin-bottom: 5px;
}

#video-container {
  position: relative;
  width: 90%;
  max-width: 800px;
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  background: black;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

#video {
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
}

.fullscreen #video {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  border-radius: 0;
}

#fullscreen-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.statistics {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  margin-top: 5px;
  margin-bottom: 5px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
  width: fit-content;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}


.vertical-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.label-row > .data {
  text-align: right;
  flex-shrink: 0;
  min-width: 10px;
}

.input-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 18px;
  color: #444;
  font-weight: 400;
  border-bottom: 1px solid #eee;
  width: auto;
}

.stat-item span:first-child {
  font-weight: 600;
  color: #333;
}

.stat-item span {
  margin: 0px 2px 0px 2px;
}

.stat-item span:last-child {
  color: #008000;
  font-weight: 500;
}

span.data {
  color: #008000;
  font-weight: 500;
}

hr {
  width: 100%;
  height: 1px;
  border-width: 0;
  background-color: #e5e5e5;
  margin: 20px 0;
}

.active-button {
  background-color: #008000;
  color: white;
}

.chart-wrapper {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;

  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;

}

.chart-wrapper canvas {
  width: 100% !important;
  height: 40% !important;
  min-height: 200px;
}

input {
  width: 100px;
}

@media (max-width: 600px) {
  #video-container {
      width: 100%;
      max-width: none;
      border-radius: 0;
  }

  #fullscreen-btn {
      width: 40px;
      height: 40px;
      font-size: 22px;
  }
  .statistics {
      padding: 15px;
  }

  .stat-item {
      font-size: 16px;
  }

  .unit {
      font-size: 14px;
  }
}

button {
  background: #f9f9f9;
  min-height: 30px;
  border: 2px solid #4CAF50;
  border-radius: 5px;
  font-weight: bold;
}

button:hover {
  background: #008000;
  color: white;
}

.edit-btn {
  background: none;
  border: none;
  margin: 0px;
  font-size: 0.8em;
  cursor: pointer;
  color: #4CAF50;
  min-height: 18px;
}

/* Popup Styling */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: white;
  padding: 1em;
  border-radius: 10px;
  min-width: 300px;
  text-align: center;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.popup-buttons {
  margin-top: 1em;
  /* display: flex; */
  justify-content: right;
}

.popup-buttons:button {
  margin-left: 10px;
}

.status-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.status-title::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--status-color, gray);
}