@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-gradient: radial-gradient(circle at 20% 20%, #1e1e2d 0%, #0f0f17 100%);
  --card-bg: rgba(26, 26, 38, 0.75);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(99, 102, 241, 0.35);
  --accent-primary: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --accent-glow: rgba(99, 102, 241, 0.35);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background: #09090d;
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.8) 0px, transparent 100%);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  width: 100%;
  max-width: 1120px;
  height: 94vh;
  max-height: 740px;
  background: rgba(18, 18, 26, 0.85);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 
    0 30px 60px -12px rgba(0, 0, 0, 0.56),
    0 18px 36px -18px rgba(0, 0, 0, 0.7),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-header {
  height: 52px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  user-select: none;
}

.app-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
}

.app-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.privacy-badge {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 5px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

.pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px 18px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.card h2 {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.84rem;
  color: var(--text-primary);
}

input[type="number"] {
  width: 70px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  outline: none;
  transition: all 0.2s ease;
}

input[type="number"]:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  user-select: none;
}

.checkbox-container input {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
}

.drop-card {
  display: flex;
  flex-direction: column;
}

.drop-zone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  min-height: 110px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.drop-zone:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
  transform: translateY(-1px);
}

.drop-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  transition: transform 0.2s ease;
}

.drop-zone:hover .drop-icon {
  transform: scale(1.1);
}

.drop-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.btn {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 12px;
  width: 100%;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  filter: brightness(1.08);
}

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

.btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  border: 1px solid var(--card-border);
}

.status-card {
  padding: 12px 16px;
  background: rgba(15, 15, 23, 0.9);
  border-color: rgba(99, 102, 241, 0.2);
}

.status-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-gradient);
  box-shadow: 0 0 10px var(--accent-primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.instructions-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(20, 20, 30, 0.7);
}

.instruction-lead {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.ocr-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.ocr-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.step-num {
  background: var(--accent-gradient);
  color: #ffffff;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.instruction-thumbnails {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 0;
}

.thumb-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.thumb-container img {
  width: 100%;
  flex: 1;
  object-fit: contain;
  background: #0d0d14;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 6px;
}

.thumb-container figcaption {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 8px;
}
