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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  padding: 40px 20px;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 24px;
  color: #333;
  margin-bottom: 8px;
  text-align: center;
}

.description {
  color: #666;
  text-align: center;
  margin-bottom: 24px;
  font-size: 14px;
}

.upload-area {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  position: relative;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: #4a90d9;
  background: #f8fafc;
}

.upload-area.has-image {
  padding: 16px;
}

.upload-area.has-image .upload-content {
  display: none;
}

.upload-icon {
  font-size: 48px;
  color: #ccc;
  margin-bottom: 12px;
}

.upload-area p {
  color: #666;
  font-size: 14px;
}

.file-types {
  color: #999 !important;
  font-size: 12px !important;
  margin-top: 8px;
}

.preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  display: none;
}

.preview.visible {
  display: block;
}

.detect-btn {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  background: #4a90d9;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.detect-btn:hover:not(:disabled) {
  background: #3a7bc8;
}

.detect-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.result {
  margin-top: 24px;
  padding: 20px;
  border-radius: 8px;
  background: #f8f9fa;
}

.result.hidden {
  display: none;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.result-label {
  font-weight: 600;
  color: #333;
}

.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.safe {
  background: #d4edda;
  color: #155724;
}

.badge.warning {
  background: #fff3cd;
  color: #856404;
}

.badge.danger {
  background: #f8d7da;
  color: #721c24;
}

.score-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.score-label {
  color: #666;
  font-size: 14px;
}

.score-value {
  font-size: 24px;
  font-weight: 700;
}

.score-value.safe { color: #28a745; }
.score-value.warning { color: #ffc107; }
.score-value.danger { color: #dc3545; }

.progress-bar {
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.progress-fill.safe { background: #28a745; }
.progress-fill.warning { background: #ffc107; }
.progress-fill.danger { background: #dc3545; }

.result-message {
  color: #666;
  font-size: 14px;
}

.error {
  margin-top: 16px;
  padding: 12px;
  background: #f8d7da;
  color: #721c24;
  border-radius: 8px;
  font-size: 14px;
}

.error.hidden {
  display: none;
}

.loading {
  margin-top: 16px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.loading.hidden {
  display: none;
}
