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

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --text: #e1e4ed;
  --text-muted: #8b8fa3;
  --accent: #6c8cff;
  --yes: #3ecf8e;
  --yes-bg: rgba(62, 207, 142, 0.1);
  --no: #f87171;
  --no-bg: rgba(248, 113, 113, 0.1);
  --skip: #8b8fa3;
  --diff: #fbbf24;
}

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

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

header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

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

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

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

/* States */
.state { text-align: center; }
.hidden { display: none !important; }

/* Spinner */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto 1rem;
}

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

/* Progress */
.progress {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* Card */
.card {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}

.card-side {
  flex: 1;
  padding: 1.5rem;
}

.card-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  background: var(--border);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-muted);
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail {
  font-size: 0.85rem;
}

.detail-label {
  color: var(--text-muted);
  display: inline-block;
  min-width: 80px;
}

/* Diff highlights */
.diff-hints {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--diff);
  min-height: 1.2em;
}

.diff-char {
  background: rgba(251, 191, 36, 0.2);
  border-radius: 2px;
  padding: 0 1px;
}

/* Buttons */
.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
  transition: all 0.15s ease;
  min-width: 140px;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-yes { border-color: var(--yes); color: var(--yes); }
.btn-yes:hover { background: var(--yes-bg); }

.btn-no { border-color: var(--no); color: var(--no); }
.btn-no:hover { background: var(--no-bg); }

.btn-skip { color: var(--skip); }
.btn-skip:hover { background: rgba(139, 143, 163, 0.1); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Toast */
.toast {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: 6px;
}

.toast.error {
  color: var(--no);
  background: var(--no-bg);
}

/* Queue stats */
.queue-stats {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
}

.error-message {
  color: var(--no);
}

/* Mobile */
@media (max-width: 600px) {
  .card {
    flex-direction: column;
  }
  .card-divider {
    width: 100%;
    height: 40px;
  }
  .actions {
    flex-direction: column;
  }
  .btn {
    min-width: unset;
    width: 100%;
  }
}
