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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #0a0a0a;
  color: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* EULA Overlay */
.eula-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.eula-overlay.hidden {
  display: none;
}

.eula-modal {
  background-color: #1a1a1a;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.eula-modal h1 {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

.eula-scroll-container {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #444 #1a1a1a;
}

.eula-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.eula-scroll-container::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.eula-scroll-container::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

.eula-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.eula-text h2 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #fff;
}

.eula-text h3 {
  font-size: 16px;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #ccc;
}

.eula-text p {
  margin-bottom: 15px;
  color: #bbb;
  font-size: 14px;
}

.eula-text ul {
  margin-bottom: 15px;
  padding-left: 25px;
}

.eula-text li {
  margin-bottom: 8px;
  color: #bbb;
  font-size: 14px;
}

.eula-text strong {
  color: #fff;
}

.eula-footer {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #333;
  font-size: 14px;
}

.eula-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.eula-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.eula-btn-decline {
  background-color: #2a2a2a;
  color: #fff;
}

.eula-btn-decline:hover {
  background-color: #3a3a3a;
}

.eula-btn-accept {
  background-color: #0066cc;
  color: #fff;
}

.eula-btn-accept:hover:not(:disabled) {
  background-color: #0052a3;
}

.eula-btn-accept:disabled {
  background-color: #1a3a5a;
  color: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

.eula-hint {
  text-align: center;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

.eula-hint.hidden {
  display: none;
}

/* App Container */
.app-container {
  min-height: 100vh;
  padding: 20px;
}

.app-container.hidden {
  display: none;
}

.app-header {
  text-align: center;
  padding: 40px 20px;
}

.app-header h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.subtitle {
  color: #888;
  font-size: 16px;
}

.app-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .eula-modal {
    padding: 20px;
    max-height: 95vh;
  }
  
  .eula-modal h1 {
    font-size: 20px;
  }
  
  .eula-text h2 {
    font-size: 18px;
  }
  
  .eula-text h3 {
    font-size: 15px;
  }
  
  .eula-text p,
  .eula-text li {
    font-size: 13px;
  }
  
  .eula-btn {
    padding: 12px 16px;
    font-size: 15px;
  }
  
  .app-header h1 {
    font-size: 24px;
  }
}

/* Camera Interface */
.camera-error {
  background-color: #3a1a1a;
  color: #ff6b6b;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid #5a2a2a;
}

.camera-error.hidden {
  display: none;
}

.camera-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.camera-view {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Mirror effect */
}

.landmark-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.guide-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  aspect-ratio: 0.7 / 1;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
}

.detection-status {
  text-align: center;
  padding: 12px;
  background-color: #1a1a1a;
  border-radius: 8px;
  font-size: 14px;
  color: #ccc;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.capture-button {
  width: 100%;
  padding: 16px;
  background-color: #0066cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.capture-button:hover:not(:disabled) {
  background-color: #0052a3;
}

.capture-button:disabled {
  background-color: #1a3a5a;
  color: #666;
  cursor: not-allowed;
  opacity: 0.5;
}

/* Validation Indicators */
.validation-indicators {
  display: flex;
  justify-content: space-around;
  gap: 12px;
  padding: 12px;
  background-color: #1a1a1a;
  border-radius: 8px;
}

.validation-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.validation-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.validation-indicator {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  background-color: #2a2a2a;
  color: #666;
  transition: all 0.2s ease;
}

.validation-indicator.valid {
  background-color: #1a4a1a;
  color: #4ade80;
}

.validation-indicator.invalid {
  background-color: #4a1a1a;
  color: #f87171;
}

/* Mobile Camera Styles */
@media (max-width: 768px) {
  .camera-container {
    max-width: 100%;
  }

  .camera-view {
    border-radius: 8px;
  }

  .detection-status {
    font-size: 13px;
  }

  .capture-button {
    font-size: 16px;
    padding: 14px;
  }
}

/* Duplicate Warning Overlay */
.duplicate-warning-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.duplicate-warning-modal {
  background-color: #1a1a1a;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.duplicate-warning-modal h2 {
  font-size: 22px;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
  color: #fff;
}

.duplicate-warning-modal p {
  margin-bottom: 15px;
  color: #bbb;
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
}

.duplicate-warning-modal p:last-of-type {
  margin-bottom: 25px;
}

.duplicate-warning-buttons {
  display: flex;
  gap: 15px;
}

.duplicate-warning-buttons button {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.duplicate-cancel-btn {
  background-color: #2a2a2a;
  color: #fff;
}

.duplicate-cancel-btn:hover {
  background-color: #3a3a3a;
}

.duplicate-proceed-btn {
  background-color: #cc6600;
  color: #fff;
}

.duplicate-proceed-btn:hover {
  background-color: #a35200;
}

@media (max-width: 768px) {
  .duplicate-warning-modal {
    padding: 25px;
  }

  .duplicate-warning-modal h2 {
    font-size: 20px;
  }

  .duplicate-warning-modal p {
    font-size: 14px;
  }

  .duplicate-warning-buttons button {
    font-size: 15px;
    padding: 12px 16px;
  }
}
