* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.container {
  background: white;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 700px;
  width: 100%;
}
h1 {
  color: #333;
  margin-bottom: 10px;
  font-size: 28px;
}
.subtitle {
  color: #666;
  margin-bottom: 30px;
  font-size: 14px;
}
input[type="file"] { display: none; }
.upload-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s;
  display: inline-block;
}
.upload-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
#preview {
  margin: 30px 0;
  text-align: center;
}
#preview img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.loading {
  text-align: center;
  padding: 30px;
  display: none;
}
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#result {
  background: #f9fafb;
  padding: 25px;
  border-radius: 10px;
  margin-top: 30px;
  display: none;
  border-left: 4px solid #667eea;
}
.result-section {
  margin-bottom: 20px;
}
.result-section:last-child {
  margin-bottom: 0;
}
.result-label {
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.result-content {
  color: #555;
  line-height: 1.6;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.highlight {
  background: #f0f4ff;
  border: 1px solid #d0d9ff;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  color: #3730a3;
  font-weight: 500;
  display: inline-block;
}
.schema-block {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 16px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
}
.meta {
  font-size: 12px;
  color: #999;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}
.error {
  background: #fee;
  border-left-color: #f44;
}
