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

body {
  font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background-color: #f5f7fa;
}

.container {
  background: white;
  border-radius: 12px;
  padding: 48px;
  max-width: 960px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

header {
  text-align: center;
  margin-bottom: 32px;
}

h1 {
  color: #1a1a1a;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.subtitle {
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
}

.beta-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  text-align: center;
  margin-bottom: 24px;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

.upload-area {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 48px 24px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  background: #fafbfc;
  text-align: center;
}

.upload-area.highlight {
  border-color: #2563eb;
  background: #eff6ff;
}

.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: block;
}

.upload-icon path {
  fill: #9ca3af;
}

.upload-text {
  color: #374151;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.upload-or {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.browse-btn {
  display: inline-block;
  background: #2563eb;
  color: white;
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.browse-btn:hover {
  background: #1d4ed8;
}

.file-info {
  margin-top: 16px;
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 500;
}

.anonymize-btn {
  width: 100%;
  padding: 14px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.anonymize-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

.anonymize-btn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.privacy-notice,
.upload-section {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.upload-section {
  justify-content: center;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  background: #fafbfc;
  min-height: 200px;
}

.spinner {
  border: 3px solid #e5e7eb;
  border-top: 3px solid #2563eb;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

.loading p {
  color: #374151;
  font-size: 0.95rem;
  font-weight: 500;
}

.loading-time {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 8px;
}

.privacy-notice {
  padding: 24px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.privacy-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  display: block;
}

.privacy-icon path,
.privacy-icon rect {
  stroke: #2563eb;
}

.privacy-notice h3 {
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.privacy-notice > p {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 16px;
  text-align: center;
}

.redacted-items {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.redacted-items li {
  color: #374151;
  font-size: 0.875rem;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  text-align: center;
}

.error-message {
  margin-top: 16px;
  padding: 12px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 6px;
  font-size: 0.875rem;
  display: none;
  border: 1px solid #fecaca;
}

.download-ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fafbfc;
  min-height: 200px;
}

.download-message {
  color: #374151;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.download-btn {
  display: inline-block;
  background: #2563eb;
  color: white;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
  cursor: pointer;
}

.download-btn:hover {
  background: #1d4ed8;
}

.new-doc-btn {
  margin-top: 12px;
  background: transparent;
  color: #6b7280;
  border: 1px solid #d1d5db;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.new-doc-btn:hover {
  background: #f3f4f6;
  color: #374151;
  border-color: #9ca3af;
}

.site-footer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.footer-logo {
  max-height: 95px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
  transition: opacity 0.2s ease;
}

.footer-logo:hover {
  opacity: 1;
}

/* Responsive mobile */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .container {
    padding: 24px;
  }

  .main-content {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.875rem;
  }

  .upload-area {
    padding: 56px 24px;
  }

  .redacted-items {
    grid-template-columns: 1fr;
  }

  .site-footer {
    margin-top: 32px;
    padding-top: 24px;
  }

  .footer-logos {
    gap: 24px;
    flex-direction: column;
  }

  .footer-logo {
    max-height: 56px;
  }
}
