body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

#container {
  width: 95%;
  max-width: 960px;
  margin: 0 auto;
  padding: 15px;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#header {    
  color: #333;
  padding: 0 15px 20px 15px;
  border-bottom: 1px solid #ddd;
  justify-content: space-between;
  align-items: center;
}

#header #title {
  align-items: center;
  display: flex; /* Enable flexbox for easier alignment */
}

#header img {
  width: 64px;
  height: 64px;
  margin-right: 10px;
}

#preview {
  align-items: center;
  display: flex; /* Enable flexbox for easier alignment */
}

#preview img {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

h1, h2, h3, h4, h5, h6, label {
  font-family: "Roboto Slab", sans-serif;
}

#logo {
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}

#content-wrapper {
  display: flex; 
  padding: 20px;
}

#content {
  flex: 1;
  padding-right: 30px; 
  margin-bottom: 0; 
}

#webcam {
  /* Removed fixed width and height */
  width: 100%; /* Make video responsive */
  max-width: 640px; /* Set a maximum width for larger screens */
  height: auto; /* Maintain aspect ratio */
  transform: scaleX(-1);
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.video-container {
  position: relative;
}

#recording-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  font-weight: bold;
  font-size: 1.2em;
  padding: 8px 12px;
  background-color: #e74c3c;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Preview Column */
#preview-column {
  display: flex;
  flex-direction: column;
  align-items: left;
  gap: 15px;
  flex: 0 0 360px; 
}

#snapshot-preview,
#recorded-video-preview {
  width: 100%;
  max-height: 600px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Controls */
.controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
  width: 100%;
  max-width: 400px;
}

.controls > div {
  display: flex;
  gap: 10px;
  align-items: center;
}

.controls label {
  font-weight: bold;
  color: #555;
}

.controls input[type="number"] {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 60px;
}

.controls button {
  background-color: #3498db;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.controls button:hover {
  background-color: #2980b9;
}

/* Download Link */
#download-link {
  background-color: #27ae60;
  color: #fff;
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

#download-link:hover {
  background-color: #1e8449;
}


#sidebar {
  width: 360px;
  padding: 0 20px;
  box-sizing: border-box;
}

#sidebar h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  color: #555;
}

#sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sidebar ul li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

#sidebar ul li:last-child {
  border-bottom: none;
}

#sidebar ul li a {
  text-decoration: none;
  color: #007bff;
}

.sidebar-module {
  margin-top: 20px;
  padding: 15px;
  background-color: #fff;
  border: 1px solid #eee;
}

.sidebar-module h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 14px;
  color: #555;
}

#footer {
  color: #777;
  text-align: center;
  padding: 15px 20px;
  border-top: 1px solid #ddd;
  font-size: 12px;
}

/* Media Query for screens smaller than 768px */
@media (max-width: 768px) {
  #container {
      width: 100%;
      margin: 0;
      border-left: none;
      border-right: none;
      box-shadow: none;
  }

  #header {
      flex-direction: column;
      align-items: flex-start;
  }

  #header nav {
      margin-top: 10px;
  }

  #content-wrapper {
      flex-direction: column; /* Stack content and sidebar */
      padding: 10px;
  }

  #content {
      padding-right: 0;
      margin-bottom: 15px; /* Add space when stacked */
  }

  #sidebar {
      width: 100%;
      max-width: 480px;
      padding: 10px;
  }
  #video-column { /* Added for mobile responsiveness */
    width: 100%;
  }
}

/* Further adjustments for very small screens (optional) */
@media (max-width: 480px) {
  #logo {
      font-size: 18px;
  }

  #content h2 {
      font-size: 16px;
  }

  #sidebar h3 {
      font-size: 14px;
  }
}
