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

:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #666;
  --border: #ddd;
  --accent: #333;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

/* Drop zone */
#drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--muted);
}

#drop-zone:hover,
#drop-zone.dragover {
  border-color: var(--accent);
  background: #f0f0f0;
}

#drop-zone svg {
  margin-bottom: 0.75rem;
  opacity: 0.5;
}

#drop-zone p {
  margin: 0.25rem 0;
}

.hint {
  font-size: 0.8rem;
  opacity: 0.7;
}

/* Controls */
#controls {
  margin-top: 1rem;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

label {
  font-weight: 500;
}

select {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  background: #fff;
}

button {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

button:hover {
  opacity: 0.85;
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Progress */
#progress-section {
  margin-top: 1.5rem;
  text-align: center;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

#progress-text {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Results */
#results {
  margin-top: 1.5rem;
}

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.comparison-panel h3 {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.comparison-panel canvas {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

#try-another {
  background: transparent;
  color: var(--accent);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

footer a {
  color: var(--fg);
}

/* Utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }

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

  #drop-zone {
    padding: 2rem 1rem;
  }
}
