/* FrameLens — Minimal dark theme */

:root {
  --bg: #0d0d0d;
  --surface: #141414;
  --border: #222;
  --text: #e0e0e0;
  --muted: #888;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --danger: #ef4444;
  --code-bg: #0a0a0a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--muted);
  font-size: 1rem;
  margin-top: 6px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--surface);
}

.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.05);
}

.drop-content .icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.drop-content p {
  color: var(--muted);
  margin-bottom: 8px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.link-btn:hover { color: var(--accent-hover); }

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.7;
}

/* Progress */
.progress-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.status-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 10px;
}

/* Result */
.result-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin-left: 10px;
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #333;
}

.json-output {
  background: var(--code-bg);
  color: #d4d4d4;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 16px;
  border-radius: 8px;
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* JSON Syntax Highlighting */
.json-output .key { color: #9cdcfe; }
.json-output .string { color: #ce9178; }
.json-output .number { color: #b5cea8; }
.json-output .boolean { color: #569cd6; }
.json-output .null { color: #569cd6; }

/* Error */
.error-section { margin-top: 16px; }
.error-box {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
}

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

/* Footer */
.footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.6;
  padding-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .header h1 { font-size: 2rem; }
  .dropzone { padding: 32px 16px; }
  .json-output { font-size: 0.8rem; }
}
