body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #121212;
  color: #fff;
}

.description {
  font-size: 1.1rem;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

.instructions {
  font-size: 0.9rem;
  color: #999;
  max-width: 800px;
  margin: 0 auto 20px;
  line-height: 1.4;
  font-style: italic;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  margin-bottom: 16px;
  font-size: 2rem;
}

.webcam-button {
  background: #6200ea;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.webcam-button:hover {
  background: #7f39fb;
}

.webcam-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.5);
}

.webcam-panel {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 20px;
}

.detected-objects-panel {
  background: #1e1e1e;
  border: 3px solid #6200ea;
  border-radius: 8px;
  width: 300px;
  height: 800px;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  order: 2;
}

.detected-objects-panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.detected-objects-panel h3 {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.detected-objects-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detection-item {
  background: #2e2e2e;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 10px;
}

.detection-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detection-label {
  font-weight: bold;
  color: #fff;
  flex: 1;
  text-align: left;
}

.webcam-container {
  margin-top: 0;
  width: 800px;
  height: 800px;
  border: 3px solid #6200ea;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  position: relative;
  order: 1;
}

#webcam-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.detection-settings {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
}

.slider-group {
  margin-bottom: 20px;
}

.slider-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
  color: #fff;
}

.slider-group input[type="range"] {
  width: 100%;
  margin-bottom: 6px;
}

.slider-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #bbb;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.checkbox-group input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 8px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type="range"]:focus {
  outline: none;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: #444;
  border-radius: 2px;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #6200ea;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: -6px;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #7f39fb;
}

input[type="range"]::-moz-range-track {
  height: 4px;
  background: #444;
  border-radius: 2px;
}

input[type="range"]::-moz-range-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: #6200ea;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:active {
  background: #7f39fb;
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb:active {
  background: #7f39fb;
  transform: scale(1.1);
}

.error {
  margin-top: 10px;
  color: #ff5252;
}

.icon svg {
  animation: rotate 2s linear infinite;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.coordinate-icon {
  vertical-align: middle;
  margin-right: 4px;
  fill: #bbb;
}

.detection-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #bbb;
}

.detection-confidence {
  font-weight: bold;
}

.ar-button {
  background: #6200ea;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  margin-bottom: 10px;
  text-align: center;
}

.ar-button:hover {
  background: #7f39fb;
}

.ar-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.5);
}

.ar-button.active {
  background: #f44336;
}

.ar-button.active:hover {
  background: #e53935;
}

.ar-effects-panel {
  background: #1e1e1e;
  border: 3px solid #6200ea;
  border-radius: 8px;
  width: 300px;
  height: 800px;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  order: 0;
  -ms-overflow-style: none;  
  scrollbar-width: none;  
}

.ar-effects-panel::-webkit-scrollbar {
  display: none;
}

.ar-effects-panel h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.panel-section {
  margin-bottom: 20px;
}

.ar-object-item {
  background: #2e2e2e;
  border-radius: 4px;
  padding: 8px;
  margin-bottom: 10px;
}

.ar-object-name {
  font-weight: bold;
  color: #6200ea;
  margin-bottom: 4px;
}

.ar-object-position {
  font-family: monospace;
  font-size: 0.8rem;
  color: #bbb;
  display: flex;
  align-items: center;
  gap: 4px;
}

.position-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.speech-text-input {
  background: #1e1e1e;
  border: 2px solid #6200ea;
  border-radius: 4px;
  padding: 8px 12px;
  color: #fff;
  width: 90%;
  margin: 10px auto;
  display: none;  
}

.speech-text-input:focus {
  outline: none;
  border-color: #7f39fb;
}

.speech-text-label {
  display: none;  
  color: #fff;
  font-size: 0.9rem;
  margin-bottom: 5px;
}