/* face scan */
body {
    margin: 0;
    font-family: Arial, sans-serif;
  }
  .container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }
  #loading-indicator {
    position: fixed; /* Changed to fixed to ensure it stays in the center */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the indicator */
    width: 100px; /* Width adjusted for the loading circle container */
    height: 100px; /* Height adjusted for the loading circle container */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
  }
  .loading-circle {
    width: 50px;
    height: 50px;
    border: 5px solid #DC7D57;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  #loading-indicator p {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #DC7D57;
  }
  @keyframes spin {
    100% {
      transform: rotate(360deg);
    }
  }
  .input_video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Ensure the video is visible */
  }
  
  .output_canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 2; /* Canvas overlay above the video */
  }
  .color-display {
    position: absolute;
    background: transparent;
    color: white;
    margin-left: 75%;
    margin-top: 50px;
    z-index: 4; /* Ensure it's on top */
  }
  .progress-box-1,
  .progress-box-2 {
    width: 27%;
    height: auto;
    padding: 15px;
    flex-direction: column;
    justify-content: center;
    color: black;
    font-family: Arial, sans-serif;
    position: fixed;
    bottom: 5%;
    background-color: white;
    border-radius: 20px;
    gap: 0;
    z-index: 3;
    
    /* Improved horizontal centering */
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    margin-right: 0;
  }
  
  .progress-box-1 {
    align-items: center; /* Center contents horizontally */
    text-align: center; /* Center text horizontally */
  }
  .progress-box-1 p {
    color: #213d68b2;
  }
  .progress-box-2 {
    display: none; /* Hide initially */
    align-items: center; /* Center contents horizontally */
    text-align: center; /* Center text horizontally */
  }
  .progress-box-2 p {
    margin-top: -10px;
  }
  .progress-indicator {
    display: flex;
    justify-content: flex-start; /* Align content to the start (left) */
    align-items: center; /* Align items vertically */
    width: 100%; /* Full width to push content left */
  }
  .progress-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(#3ac0a0 0%, #3ac0a0 0%, #ccc 0%, #ccc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    margin-right: 10px; /* Add margin for spacing between circle and text */
  }
  .progress-value {
    background-color: white;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
  }
  .buttons-container {
    display: flex;
    justify-content: space-between;
    gap: 8%;
    text-wrap: nowrap;
    margin-top: 20px;
    width: 100%; /* Full width to align buttons */
  }
  .start-scan-button {
    padding: 10px;
    border: black solid;
    color: #f01717;
    font-size: 16px;
    font-weight: 600;
    background-color: white;
    border-radius: 30px;
    width: 180px;
  }
  #scan-progress-message {
    text-align: left; /* Align text to the left */
    width: 100%; /* Ensure the element spans the full width of the parent */
  }
  .homepage-button {
    color: #213d68;
    font-size: 16px;
    font-weight: 600;
    border: none;
    background: transparent;
    margin-right: 40px;
  }
  /* Media Queries for Responsiveness */
  @media (max-width: 1200px) {
    .progress-box-1, .progress-box-2 {
      width: 35%;
    }
  }
  @media (max-width: 992px) {
    .progress-box-1, .progress-box-2 {
      width: 45%;
    }
  }
  @media (max-width: 768px) {
    .progress-box-1, .progress-box-2 {
      width: 60%;
    }
  }
  
  @media (max-width: 576px) {
    .progress-box-1, .progress-box-2 {
      width: 80%;
    }
  }
  #error-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it stays above all other content */
  }
  
  .error-dialog-content {
    position: relative;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    /* Center the dialog box */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 300px;
    width: 80%;
  }
  
  .error-dialog-close {
    display: none;
  }
  
  .error-dialog-message {
    margin-bottom: 20px;
    font-size: 16px; /* Standard font size for the error message */
    color: #444; /* Slightly darker text color */
  }
  
  .camera-switch-button {
    position: fixed;
    top: 20px;
    right: 20px;
    height: 56px;
    width: 56px;
    z-index: 3;
    border: none;
    display: none; /* Hidden by default */
    cursor: pointer;
    background: transparent;
    justify-content: center;
    align-items: center;
  }
  
  /* Show button only on mobile and tablet */
  @media (max-width: 700px) {
    .camera-switch-button {
      display: flex;
    }
  }
  #network-error-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
  }
  
  .network-error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px;
    max-width: 400px;
    border-radius: 20px;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  
  .network-error-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    fill: #DC7D57;
    animation: pulse 2s infinite ease-in-out;
  }
  
  .network-error-title {
    color: #213d68;
    font-size: 24px;
    margin-bottom: 15px;
  }
  
  .network-error-message {
    color: #213d68b2;
    font-size: 16px;
    margin-bottom: 25px;
    line-height: 1.5;
  }
  
  .network-error-button {
    padding: 10px 20px;
    border-radius: 30px;
    background-color: #DC7D57;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  
  .network-error-button:hover {
    background-color: #c56a46;
  }
  
  @keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
  }
  
  /* Make sure the overlay is responsive */
  @media (max-width: 576px) {
    .network-error-content {
      width: 85%;
      padding: 20px;
    }
    
    .network-error-icon {
      width: 60px;
      height: 60px;
    }
    
    .network-error-title {
      font-size: 20px;
    }
    
    .network-error-message {
      font-size: 14px;
    }
  }