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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #fff;
  min-height: 100vh;
  line-height: 1.6;
}

a { color: #667eea; text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  padding: 16px 24px;
  border-bottom: 1px solid #1a1a1a;
}

nav {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-small { padding: 8px 16px; font-size: 0.85rem; }
.btn-secondary { background: #1a1a1a; border: 1px solid #333; }
.btn-secondary:hover { background: #222; }
.btn-large { padding: 16px 32px; font-size: 1.1rem; width: 100%; margin-top: 24px; }

.app-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 24px;
}

.upload-section { text-align: center; }
.upload-section h1 { font-size: 2.5rem; margin-bottom: 8px; }
.subtitle { color: #888; font-size: 1.1rem; margin-bottom: 40px; }

.upload-card {
  background: #141414;
  border: 1px solid #222;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.upload-card.full-width { display: block; }
.upload-card h3 { margin-bottom: 16px; font-size: 1.2rem; text-align: left; }

.drop-zone {
  border: 2px dashed #333;
  border-radius: 12px;
  padding: 60px 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
}

.drop-content { text-align: center; color: #888; }
.drop-content svg { margin-bottom: 16px; opacity: 0.4; }
.drop-content .link { color: #667eea; text-decoration: underline; cursor: pointer; }
.drop-hint { font-size: 0.85rem; margin-top: 8px; color: #666; }

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1a1a1a;
  border-radius: 8px;
  margin-top: 16px;
}

.file-info span { font-size: 0.9rem; color: #ccc; }

.clear-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
}

.clear-btn:hover { color: #fff; }

.fields-section {
  background: #141414;
  border: 1px solid #222;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
  text-align: left;
}

.fields-section h3 { font-size: 1.3rem; margin-bottom: 8px; }
.fields-hint { color: #888; font-size: 0.95rem; margin-bottom: 24px; }

.fields-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  align-items: center;
}

.field-label {
  font-size: 0.95rem;
  color: #ccc;
  font-weight: 500;
}

.field-item input[type="text"],
.field-item select {
  width: 100%;
  padding: 12px 14px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
}

.field-item input[type="text"]:focus,
.field-item select:focus {
  outline: none;
  border-color: #667eea;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #ccc;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #667eea;
}

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

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

@keyframes spin { to { transform: rotate(360deg); } }

.success-section {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 24px;
}

.success-section h3 { font-size: 1.8rem; margin-bottom: 8px; }
.success-section p { color: #888; margin-bottom: 32px; }

.error-section {
  background: #2a1a1a;
  border: 1px solid #5a2a2a;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 32px;
}

.error-section p { color: #ff6b6b; margin-bottom: 16px; }

.limits-notice {
  background: #141414;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

.limits-notice p { color: #888; font-size: 0.95rem; }
.limits-notice a { color: #667eea; }

@media (max-width: 600px) {
  .upload-section h1 { font-size: 2rem; }
  .field-item { grid-template-columns: 1fr; gap: 8px; }
  .field-label { font-size: 0.9rem; }
}