:root {
  --bg: #0a0a0a;
  --bg-elevated: #161616;
  --text: #f5f5f5;
  --text-muted: #999;
  --accent: #d62828;
  --accent-hover: #b51f1f;
  --border: #2a2a2a;
  --error: #ff5252;
  --success: #4caf50;
}

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

body {
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px;
}

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

h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.tagline {
  color: var(--text-muted);
  font-size: 16px;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 64px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-elevated);
  transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover {
  border-color: var(--accent);
}

.dropzone:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.3);
}

.dropzone.dragover {
  border-color: var(--accent);
  background: rgba(214, 40, 40, 0.05);
}

.format-list {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 8px;
}

.separator {
  text-align: center;
  margin: 24px 0;
  color: var(--text-muted);
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 40, 40, 0.4);
}

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

.limits, .privacy {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 16px;
}

#processing-section {
  text-align: center;
  padding: 64px 24px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 1s linear infinite;
}

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

#results-section h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

#summary {
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-headline {
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
}

.summary-warning {
  color: var(--text-muted);
  font-size: 13px;
}

#rejected-section {
  margin-top: 24px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: 12px;
}

#rejected-section h3 {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 16px;
}

#rejected-explanation {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

#downloadDroppedBtn {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

#downloadDroppedBtn:hover {
  background: var(--accent);
  color: var(--text);
}

.instructions {
  margin-top: 32px;
  padding: 24px;
  background: var(--bg-elevated);
  border-radius: 12px;
}

.instructions h3 {
  margin-bottom: 16px;
}

.instructions ol {
  padding-left: 24px;
}

.instructions li {
  margin-bottom: 8px;
}

#error-section {
  text-align: center;
  padding: 64px 24px;
}

#errorMessage {
  color: var(--error);
  margin-bottom: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
  * {
    transition: none !important;
  }
}

/* Mobile responsive */
@media (max-width: 600px) {
  main {
    padding: 24px 16px;
  }

  h1 {
    font-size: 24px;
  }

  .dropzone {
    padding: 40px 16px;
  }

  textarea {
    min-height: 120px;
  }

  button {
    padding: 14px;
    font-size: 15px;
  }

  .instructions {
    padding: 16px;
  }
}
