:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --primary-purple: #8B5CF0;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-light: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #f3f4f6;
    --text-secondary: #d1d5db;
    --border-light: #374151;
  }
}

body {
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1rem;
  line-height: 1.6;
  color: var(--text-primary);
}

header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 2rem;
}

.logo {
  display: block;
  margin-bottom: 1rem;
}

header p {
  margin: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

section {
  margin: 1.5rem 0;
}

.status {
  opacity: 0.8;
  font-size: 0.9rem;
}

.warning {
  border: 1px solid var(--border-light);
  background: rgba(139, 92, 240, 0.05);
  padding: 0.75rem;
  border-radius: 6px;
  border-left: 3px solid var(--primary-purple);
}

.hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--primary-purple);
}

button {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 1.4rem;
  cursor: pointer;
  background: var(--primary-purple);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
}

button:hover:not(:disabled) {
  background: #7c3aed;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 92, 240, 0.3);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

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

progress {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: var(--border-light);
}

progress::-webkit-progress-bar {
  background: var(--border-light);
  border-radius: 2px;
}

progress::-webkit-progress-value {
  background: var(--primary-purple);
  border-radius: 2px;
  transition: width 0.1s ease;
}

progress::-moz-progress-bar {
  background: var(--primary-purple);
  border-radius: 2px;
}

#log {
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 0.75rem;
  min-height: 10rem;
  max-height: 22rem;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.85rem;
  font-family: "Monaco", "Courier New", monospace;
  color: var(--text-primary);
}

code {
  font-family: inherit;
}

summary {
  cursor: pointer;
  padding: 0.5rem 0;
  color: var(--primary-purple);
  font-weight: 500;
  transition: color 0.2s ease;
}

summary:hover {
  color: #7c3aed;
}

details {
  margin-top: 0.5rem;
}

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

a:hover {
  text-decoration: underline;
}
