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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

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

header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
}

header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.upload-section {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.api-selector {
  margin-bottom: 20px;
  text-align: center;
}

.api-selector label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.api-dropdown {
  padding: 12px 20px;
  border: 2px solid #667eea;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 300px;
}

.api-dropdown:hover {
  border-color: #764ba2;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.api-dropdown:focus {
  outline: none;
  border-color: #764ba2;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.upload-area {
  border: 3px dashed #667eea;
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9ff;
}

.upload-area:hover {
  border-color: #764ba2;
  background: #f0f2ff;
  transform: translateY(-2px);
}

.upload-area.drag-over {
  border-color: #764ba2;
  background: #e8ebff;
  transform: scale(1.02);
}

.upload-content svg {
  color: #667eea;
  margin-bottom: 20px;
}

.upload-content h3 {
  color: #333;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.upload-content p {
  color: #666;
  font-size: 0.9rem;
}

.preview {
  margin: 20px 0;
  text-align: center;
}

.preview img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn {
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  margin: 10px 5px;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-secondary:hover {
  background: #667eea;
  color: white;
}

.loading {
  text-align: center;
  padding: 40px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

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

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

.results {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.vendor-info {
  background: #f0f2ff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 25px;
  border-left: 4px solid #667eea;
}

.vendor-info h3 {
  color: #667eea;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.vendor-info p {
  color: #666;
  margin: 5px 0;
  font-size: 0.95rem;
}

.provider-badge {
  display: inline-block;
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 10px;
}

.results h2 {
  color: #667eea;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.menu-items {
  margin-bottom: 30px;
}

.menu-item {
  padding: 20px;
  border: 2px solid #e8ebff;
  border-radius: 10px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  background: #f8f9ff;
}

.menu-item:hover {
  border-color: #667eea;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.menu-item-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  flex: 1;
}

.menu-item-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #667eea;
  margin-left: 15px;
}

.menu-item-description {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 5px;
}

.menu-item-meta {
  color: #999;
  font-size: 0.85rem;
  margin-top: 8px;
  font-style: italic;
}

.raw-text-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e8ebff;
}

.raw-text {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #333;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.error {
  background: #fee;
  color: #c33;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #c33;
  margin: 20px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }
  
  .upload-area {
    padding: 40px 15px;
  }
  
  .menu-item-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .menu-item-price {
    margin-left: 0;
    margin-top: 5px;
  }
}
