* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: Arial, sans-serif;
  position: relative;
  background-image: url(../assets/images/banner-4.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Add a semi-transparent overlay to improve text readability */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: -1;
}

.main-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 20px;
}

.video-container {
  position: relative;
  width: 640px;
  height: 480px;
  margin-bottom: 150px; /* Space for controls */
}

#video,
#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 640px;
  height: 480px;
}

#controls {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: white;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  max-height: 110px;
  overflow-y: auto;
  z-index: 1000;
  display: -webkit-inline-flex;
}

h1 {
  font-size: 16px;
  margin-bottom: 20px;
  color: #007bff;
}

.control-group {
  margin-bottom: 20px;
  display: inline-block;
  margin-right: 10px;
  margin-left: 10px;
}

.control-group label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: bold;
}

input[type="range"] {
  width: 200px;
  margin: 8px 0;
}

input[type="color"] {
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 4px;
}

.button-group {
  display: inline-flex;
  gap: 10px;
  margin-top: 20px;
}

button,
.button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

button:hover,
.button:hover {
  background-color: #0056b3;
}

#reset {
  background-color: #dc3545;
}

#reset:hover {
  background-color: #750f19;
}

#widthValue,
#heightValue {
  display: inline-block;
  min-width: 40px;
  text-align: center;
  background: #eee;
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: 10px;
}

@media screen and (max-width: 640px) {
  .video-container {
    width: 100%;
    max-width: 640px;
    height: auto;
    aspect-ratio: 4/3;
  }

  #video,
  #overlay {
    width: 100%;
    height: 100%;
  }

  .control-group {
    display: block;
    margin-right: 0;
  }

  input[type="range"] {
    width: 100%;
  }

  .button-group {
    display: flex;
    width: 100%;
  }
}
