@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Serif+Display&display=swap');

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

:root {
  --bg: #0a0a0a;
  --surface: #111;
  --border: #222;
  --border-light: #2a2a2a;
  --accent: #e8ff47;
  --text: #f0f0f0;
  --muted: #555;
  --label: #444;
  --preview-bg: #000;
  --mono: 'Space Mono', monospace;
  --serif: 'DM Serif Display', serif;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
}

/* ── HEADER ── */
.header {
  height: 48px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.header-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* ── WORKSPACE ── */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  flex: 1;
  overflow: hidden;
}

/* ── PANELS ── */
.panel {
  overflow-y: auto;
  height: 100%;
}

.panel::-webkit-scrollbar {
  width: 4px;
}
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.controls-panel {
  border-right: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ── SECTIONS ── */
.section-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* ── DROP ZONE ── */
.drop-zone {
  border: 1px dashed var(--border-light);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  border-radius: 2px;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(232, 255, 71, 0.03);
}

.drop-icon {
  font-size: 24px;
  color: var(--muted);
  margin-bottom: 8px;
}

.drop-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.drop-text span {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.image-preview-wrap {
  position: relative;
  border: 1px solid var(--border-light);
  border-radius: 2px;
  overflow: hidden;
}

.image-preview-wrap img {
  width: 100%;
  display: block;
  max-height: 180px;
  object-fit: cover;
}

.remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--border-light);
  color: var(--text);
  width: 24px;
  height: 24px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  transition: background 0.15s;
}
.remove-btn:hover { background: rgba(255,0,0,0.4); }

/* ── STATUS GRID ── */
.status-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.status-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.group-label {
  width: 100%;
  font-size: 10px;
  color: var(--label);
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.status-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
}

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

.status-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

/* ── EXPORT BUTTONS ── */
.export-btns {
  display: flex;
  gap: 8px;
}

.export-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  padding: 10px 8px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.export-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.export-btn.primary {
  border-color: var(--accent);
  color: var(--accent);
}
.export-btn.primary:hover {
  background: var(--accent);
  color: #000;
}

.btn-icon {
  font-size: 14px;
}

/* ── PREVIEW PANEL ── */
.preview-panel {
  background: #050505;
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 16px;
}

.preview-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--label);
}

.preview-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-screen {
  background: #000;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 680px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

/* ── OUTPUT (matches user's style) ── */
.container {
  text-align: center;
  color: white;
  font-family: serif;
  padding: 20px;
}

.frame {
  display: inline-block;
  border: 3px solid white;
  padding: 5px;
}

.frame img {
  display: block;
  width: 320px;
  max-height: 220px;
  object-fit: cover;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 320px;
  height: 220px;
  color: #333;
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  border: 1px dashed #333;
}

.code {
  font-size: 80px;
  margin-top: 10px;
  line-height: 1;
}

.text {
  font-size: 20px;
  color: #ccc;
  margin-top: 4px;
}
