.photo-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px;
}

.camera-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 3 / 4;
  margin: 20px auto;
  background-color: #000;
  overflow: hidden;
}

@media (max-width: 768px) {
  .camera-wrapper {
    width: 95%;
    max-width: 100%;
    margin: 10px auto;
  }
}

.photo-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.photo-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.photo-preview-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  border: 2px solid #dee2e6;
  border-radius: 4px;
  z-index: 2;
}

.guide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.guide-ellipse {
  width: 75%;
  aspect-ratio: 5 / 6;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3);
}

.button-group {
  text-align: center;
  margin: 20px 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 10px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  min-width: 120px;
  touch-action: manipulation;
}

.btn-capture {
  background-color: #28a745;
  color: white;
}

.btn-retake {
  background-color: #ffc107;
  color: black;
}

.btn-high-quality {
  background-color: #007bff;
  color: white;
}

.btn-back {
  padding: 12px 24px;
  background-color: #6c757d;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  display: inline-block;
  font-size: 16px;
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.photo-container h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .photo-container {
    padding: 5px;
  }

  .photo-container h1 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .btn {
    font-size: 14px;
    padding: 10px 20px;
    min-width: 100px;
  }

  .btn-back {
    font-size: 14px;
    padding: 10px 20px;
  }

  .button-group {
    margin: 15px 0;
  }
}

.processing-state {
  text-align: center;
  padding: 20px;
}

.processing-message {
  margin-bottom: 20px;
}

.processing-message p {
  margin: 10px 0;
  font-size: 16px;
}

.processing-hint {
  color: #6c757d;
  font-size: 14px !important;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

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

#processed_avatar {
  max-width: 354px;
  margin: 0 auto;
}

#processed_avatar .avatar-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 2px solid #dee2e6;
}

.avatar-placeholder {
  width: 354px;
  height: 472px;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 48px;
  color: #6c757d;
}

.completed-state .processing-message {
  display: none;
}

.completed-state .completed-message {
  display: block;
  color: #28a745;
  font-size: 18px;
  margin-bottom: 20px;
}

.completed-message {
  display: none;
}

.hidden {
  display: none;
}

.debug-toggle-btn {
  padding: 8px 16px;
  background-color: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.debug-toggle-btn.active {
  background-color: #28a745;
}

.debug-info {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 15px;
  border-radius: 8px;
  margin: 20px auto;
  max-width: 640px;
  font-family: monospace;
  font-size: 11px;
}

.debug-info-header {
  margin-bottom: 10px;
}

.debug-info-label {
  font-size: 10px;
  color: #aaa;
}

.debug-info-label.with-margin {
  margin-bottom: 5px;
}

.debug-info-highlight {
  margin-top: 8px;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.debug-info-value {
  font-size: 16px;
  font-weight: bold;
}

.debug-info-hint {
  font-size: 11px;
  color: #aaa;
}

.debug-info-row {
  margin-top: 8px;
}

.debug-info-row.small {
  margin-top: 5px;
}

.text-center {
  text-align: center;
}

.mt-10 {
  margin-top: 10px;
}

.mt-30 {
  margin-top: 30px;
}

.text-success {
  color: #28a745;
}

.text-danger {
  color: #dc3545;
}
