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

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  --background: #f8fafc;
  --card-background: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.card h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  color: var(--text-primary);
}

.info-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.info-text a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-text a:hover {
  text-decoration: underline;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

.upload-area:hover {
  border-color: var(--primary-color);
  background: #f8fafc;
}

.upload-area.drag-over {
  border-color: var(--primary-color);
  background: #eff6ff;
}

.upload-area.has-file {
  border-color: var(--success-color);
  background: #f0fdf4;
}

.upload-icon {
  width: 64px;
  height: 64px;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.upload-text {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.upload-subtext {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Buttons */
.btn {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  background: var(--border-color);
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--text-secondary);
  color: white;
}

.btn-secondary:hover {
  background: var(--text-primary);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
  box-shadow: var(--shadow-lg);
}

.btn-success:disabled {
  background: var(--border-color);
  cursor: not-allowed;
}

/* Progress */
.progress-section {
  margin-top: 1.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  width: 0;
  transition: width 0.3s ease;
  animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

.progress-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Status Banner */
.status-banner {
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-weight: 500;
  text-align: center;
  font-size: 1.125rem;
}

.status-banner.pass {
  background: #f0fdf4;
  color: #15803d;
  border: 2px solid var(--success-color);
}

.status-banner.fail {
  background: #fef2f2;
  color: #b91c1c;
  border: 2px solid var(--error-color);
}

/* Fix Section */
.fix-section {
  background: #f0fdf4;
  border: 2px solid var(--success-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.fix-info {
  color: #15803d;
  font-weight: 500;
  margin-bottom: 1rem;
}

.fixable-issues-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.fixable-issues-list li {
  background: #dcfce7;
  color: #166534;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Fixable Badge */
.fixable-badge {
  display: inline-block;
  background: var(--success-color);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Image Comparison */
.image-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.image-container {
  text-align: center;
}

.image-container img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-top: 0.5rem;
}

/* Measurements Grid */
.measurements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.measurement-item {
  background: var(--background);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.measurement-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.measurement-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Checks List */
.checks-list {
  margin-bottom: 2rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-color);
}

.check-item.pass {
  background: #f0fdf4;
  border-color: var(--success-color);
}

.check-item.fail {
  background: #fef2f2;
  border-color: var(--error-color);
}

.check-item.warning {
  background: #fffbeb;
  border-color: var(--warning-color);
}

.check-icon {
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.check-content {
  flex: 1;
}

.check-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.check-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Manual Review */
.manual-review-list {
  margin-top: 1rem;
}

.manual-review-item {
  background: var(--background);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--warning-color);
}

.manual-review-item h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.manual-review-requirement {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.manual-review-instruction {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-text a {
  color: var(--primary-color);
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  header h1 {
    font-size: 2rem;
  }

  .image-comparison {
    grid-template-columns: 1fr;
  }

  .measurements-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.5rem;
  }
}
