:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1c2026;
  --border: #262a31;
  --text: #e8eaed;
  --muted: #8a8f99;
  --accent: #c8e150;
  --accent-2: #16a34a;
  --danger: #ef4444;
  --radius: 14px;
  --gap: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif; font-size: 15px; line-height: 1.45; min-height: 100vh; }
a { color: var(--accent); }
.hidden { display: none !important; }

header {
  display: flex; justify-content: space-between; align-between: center;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(11,13,16,0.92); backdrop-filter: blur(8px); z-index: 10;
}
header .brand { display: flex; align-items: center; gap: 8px; }
header .logo-mark { font-size: 22px; color: var(--accent); }
header .brand-name { font-weight: 700; letter-spacing: 0.5px; font-size: 17px; }
header .brand-sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
header .upload-logo-btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); padding: 8px 14px; border-radius: 10px; font-size: 13px; cursor: pointer; }

main { max-width: 720px; margin: 0 auto; padding: 18px; display: flex; flex-direction: column; gap: var(--gap); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card h1 { font-size: 16px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; }

.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 22px; min-height: 200px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.15s; background: var(--surface-2); }
.dropzone.dragover { border-color: var(--accent); background: rgba(200, 225, 80, 0.04); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); }
.dz-icon { font-size: 32px; }
.preview { max-width: 100%; max-height: 320px; border-radius: 8px; }

.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; margin-bottom: 14px; }
.tab { flex: 1; background: transparent; color: var(--muted); border: 0; padding: 10px 8px; font-size: 13px; font-weight: 500; border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 500; }
.field input[type=number] { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 10px 12px; border-radius: 8px; font-size: 15px; }
.field em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 4px; }

.slider-row { display: flex; align-items: center; gap: 12px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--accent); }
.slider-row output { min-width: 70px; text-align: right; font-weight: 600; color: var(--accent); font-size: 16px; }

.unit-toggle { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; margin-bottom: 12px; width: fit-content; }
.unit-btn { background: transparent; color: var(--muted); border: 0; padding: 6px 14px; font-size: 12px; border-radius: 6px; cursor: pointer; }
.unit-btn.active { background: var(--surface); color: var(--text); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; }
.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 8px; }
.seg-btn { background: transparent; color: var(--muted); border: 0; padding: 6px 12px; font-size: 12px; border-radius: 6px; cursor: pointer; }
.seg-btn.active { background: var(--surface); color: var(--text); }

.generate-btn { width: 100%; background: linear-gradient(135deg, var(--accent) 0%, #a8c440 100%); color: #0b0d10; border: 0; padding: 16px; font-size: 16px; font-weight: 700; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.generate-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.generate-btn .g-icon { font-size: 18px; }
.status { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); min-height: 18px; }
.status.error { color: var(--danger); }
.status.working { color: var(--accent); }

.result-card { background: var(--surface); }
.result-wrap { margin: 12px 0; border-radius: 10px; overflow: hidden; background: #000; }
.result-wrap img { display: block; width: 100%; height: auto; }

.download-row { display: flex; flex-direction: column; gap: 8px; }
.dl-btn { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); padding: 12px; border-radius: 10px; text-align: center; text-decoration: none; font-weight: 600; font-size: 14px; }
.dl-btn.primary { background: var(--accent); color: #0b0d10; border-color: var(--accent); }

footer { text-align: center; padding: 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); margin-top: 18px; }

@media (min-width: 600px) {
  .download-row { flex-direction: row; }
  .dl-btn { flex: 1; }
}