body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
}

#videoData {
  display: none;
  flex-direction: column;
  align-items: center;
  margin-top: 20px;
  /* position: relative; Set the videoData div to a relative position */
}

.container,
.video-container,
#dataDisplay {
  width: 100%;
  max-width: 640px;
  /* Adjust this value based on your design */
  margin: 20px auto;
}

#video,
#overlay {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  position: relative;
  z-index: 1;
  -webkit-transform: scaleX(-1);
  /* Safari and Chrome */
  -moz-transform: scaleX(-1);
  /* Firefox */
  -ms-transform: scaleX(-1);
  /* IE 9 */
  -o-transform: scaleX(-1);
  /* Opera */
  transform: scaleX(-1);
  /* Standard syntax */
}

#video {
  z-index: 1;
  /* Ensure video is behind the overlay canvas */
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  margin-bottom: 20px;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

#userInfoForm {
  display: flex;
  flex-direction: column;
  margin: auto;
  padding: 20px;
  gap: 10px;
  /* Consistent spacing between form elements */
}

input,
select,
button {
  padding: 15px;
  /* More padding for a larger touch area */
  border-radius: 4px;
  border: 1px solid #ccc;
  /* Softer border color */
  width: 100%;
  /* Full width inputs */
  box-sizing: border-box;
  /* Include padding in the width */
}

button {
  background-color: #4caf50;
  color: white;
  font-size: 1em;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  /* Smooth background color transition */
}

button:hover {
  background-color: #45a049;
  /* Slightly darker on hover */
}

button:disabled {
  background-color: #ccc;
  color: #666;
}

#progressContainer {
  width: 100%;
  background-color: #ddd;
  border-radius: 4px;
  margin: 20px 0;
}

#progressBar {
  height: 20px;
  background-color: #4caf50;
  width: 0%;
  border-radius: 4px;
}

#dataDisplay {
  width: 100%;
  margin-top: 20px;
}

.data-point {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.data-point:last-child {
  border-bottom: none;
}

.data-point span:first-child {
  font-weight: bold;
}

.data-point span:last-child {
  margin-left: auto;
}

#restartButton {
  background: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  text-transform: uppercase;
  border-radius: 5px;
  cursor: pointer;
  outline: none;
  margin-top: 20px;
}

.container {
  max-width: 700px;
  /* Adjusted for a better fit */
  margin: auto;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header {
  text-align: center;
  padding: 10px;
  background-color: #e8f4f8;
  /* Soft color for the header background */
  border-radius: 8px;
  margin-bottom: 30px;
  /* Space between header and form */
}

.header p {
  color: #555;
  font-size: 1.2em;
  /* Slightly larger font size for the subtitle */
}

#countdownContainer {
  text-align: center;
  /* Center the text horizontally */
  font-size: 1.5em;
  /* Increase the font size */
  margin: 20px 0;
  /* Add some margin above and below for spacing */
  padding: 10px;
  /* Add some padding inside the container */
  background-color: #f8f8f8;
  /* A light background color for contrast */
  max-width: 700px;
  /* Adjusted for a better fit */
  border-radius: 5px;
  /* Rounded corners */
  display: inline-block;
  /* Make the container fit the content width */
  width: 100%;
  /* Full width to center the text properly */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Optional: adds depth */
}

#countdownContainer span {
  font-weight: bold;
  /* Make the countdown number bold */
  color: #4caf50;
  /* A distinct color for the number */
}

#heartContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  /* Adjust height as necessary */
}

.heart {
  position: relative;
  width: 50px;
  height: 50px;
  background-color: red;
  display: inline-block;
  margin: 0 10px;
  transform: rotate(-45deg);
  animation: beat 1s infinite;
}

.heart:before,
.heart:after {
  content: "";
  width: 50px;
  height: 50px;
  background-color: red;
  border-radius: 50%;
  position: absolute;
}

.heart:before {
  top: -25px;
  left: 0;
}

.heart:after {
  top: 0;
  left: 25px;
}

@keyframes beat {
  0% {
    transform: scale(1) rotate(-45deg);
  }

  50% {
    transform: scale(0.9) rotate(-45deg);
  }

  100% {
    transform: scale(1) rotate(-45deg);
  }
}

.info-icon-container {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
}

.info-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
  /* Increased width for better readability */
  max-width: 800px;
  /* Larger maximum width for desktop */
  background: white;
  padding: 30px;
  /* Increased padding for more space inside */
  border-radius: 10px;
  /* Slightly larger border radius for aesthetics */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  /* Enhanced shadow for depth */
  z-index: 100;
  overflow-y: auto;
  /* Allows scrolling if the content exceeds the dialog height */
  margin-left: 5px;
  margin-right: 5px;
  max-height: 80vh;
  /* Limits the height to 80% of the viewport height */
}

/* Enhanced styles for the close button */
#closeDialog {
  background-color: #007bff;
  /* A pleasant blue color for the button */
  color: white;
  /* White text color for contrast */
  border: none;
  /* No border for a modern look */
  padding: 10px 20px;
  /* Adequate padding for a comfortable click area */
  font-size: 16px;
  /* Slightly larger font size for readability */
  border-radius: 5px;
  /* Rounded corners for a modern appearance */
  cursor: pointer;
  /* Cursor change to indicate clickable */
  float: right;
  /* Positions the button to the right for a standard dialog layout */
  margin-top: 20px;
  /* Space above the button */
}

#closeDialog:hover {
  background-color: #0056b3;
  /* Darker blue on hover for interactivity */
}

#nextScreen {
  background-color: #007bff;
  /* A pleasant blue color for the button */
  color: white;
  /* White text color for contrast */
  border: none;
  /* No border for a modern look */
  padding: 10px 20px;
  /* Adequate padding for a comfortable click area */
  font-size: 16px;
  /* Slightly larger font size for readability */
  border-radius: 5px;
  /* Rounded corners for a modern appearance */
  cursor: pointer;
  /* Cursor change to indicate clickable */
  float: right;
  /* Positions the button to the right for a standard dialog layout */
  margin-top: 20px;
  /* Space above the button */
  display: none;
}

#nextScreen:hover {
  background-color: #0056b3;
  /* Darker blue on hover for interactivity */
}

.info-dialog h2 {
  margin-top: 0;
}

.error-message {
  color: red;
  font-size: 0.8em;
  display: none;
  /* Initially hide error messages */
}

@media screen and (max-width: 640px) {
  .container {
    width: 95%;
    height: 100vh;
  }

  .header p {
    color: #555;
    font-size: 0.9em;
    /* Slightly larger font size for the subtitle */
  }

  .header {
    text-align: center;
    font-size: 0.9em;
    /* Slightly larger font size for the subtitle */
    margin-bottom: 10px;
  }
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  /* Semi-transparent black */
  z-index: 99;
  /* Ensures it's below the dialog but above everything else */
  display: none;
  /* Hidden by default */
}

.no-scroll {
  overflow: hidden;
  /* Prevent scrolling on the body */
  height: 100%;
  /* Full height to cover all scrollable content */
}
