:root{ --bg:#ffffff; --fg:#0b1117; --muted:#4a5562; --accent:#1e90ff; }
*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0;
  font:14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:var(--bg); color:var(--fg);
}
.container{ max-width:920px; margin:32px auto; padding:0 16px; }
h1{ font-size:20px; margin:0 0 16px; }
h2{ font-size:16px; margin:16px 0 8px; color:var(--muted); font-weight:600; }

.panel{ background:#ffffff; border:1px solid #e5e7eb; border-radius:10px; padding:16px; }
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.field label{ font-weight:600; color:var(--fg); }
.field small{ color:var(--muted); }
.field input[type="text"],
.field input[type="color"],
.field input:not([type]){
  appearance:none; border:1px solid #d1d5db; background:#ffffff; color:var(--fg);
  border-radius:8px; padding:8px 10px; outline:none;
}
#charInput{ height:36px; }
.radios label, .sizes label{ margin-right:12px; cursor:pointer; }
.actions{ display:flex; gap:8px; margin-top:8px; }
button{ height:36px; padding:0 12px; border-radius:8px; border:1px solid #d1d5db; background:#f8fafc; color:#111827; cursor:pointer; }
button.primary{ background:var(--accent); border-color:#0e74cc; color:white; }
button:active{ transform:translateY(1px) }
button:hover{ filter:brightness(0.98); }
button:focus{ outline:none; box-shadow:0 0 0 2px rgba(14,116,204,0.15); }
button:disabled{ opacity:.6; cursor:not-allowed; }

.preview{ margin-top:16px; }
.previewBox{ display:inline-flex; align-items:center; justify-content:center; background:#ffffff; border:1px dashed #e5e7eb; border-radius:10px; padding:16px; min-width:120px; min-height:120px; }
.previewBox img{ image-rendering:auto; }

/* removed: .color-preview (no longer used) */

@media (max-width:640px){ .actions{ flex-direction:column; } }

.hidden{ display:none !important }
.inline{ display:flex; align-items:center; gap:12px }
.gradientRow{ display:flex; gap:12px; align-items:center }
.fontRow{ display:flex; gap:8px; align-items:center }
select#fontSelect{ height:36px; border-radius:8px; border:1px solid #d1d5db; background:#ffffff; color:#111827; padding:0 8px; }

/* Layout tightening */
.container{ max-width:840px; }
.panel{ padding:16px 16px; }
.field{ margin-bottom:14px; }
.gradientRow{ gap:10px; }
.sizes{ gap:10px; }

/* Ek stiller */
#previewSizes{ display:none }
.gradPreview{ width:48px; height:28px; border-radius:8px; border:1px solid #d1d5db; }
.codeRow{ display:flex; gap:8px; align-items:stretch }
#codeSnippet{ width:100%; resize:vertical; border-radius:8px; border:1px solid #d1d5db; padding:8px; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size:12px; }

/* PaceUI form styles */
.paceui{
  padding:10px 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  font-size:14px;
  background:#ffffff; color:var(--fg);
  transition:border-color .2s, box-shadow .2s;
}
.paceui:focus{
  outline:none;
  border-color:#0e74cc;
  box-shadow:0 0 0 2px rgba(14,116,204,0.15);
}
input[type="color"].paceui{
  width:28px;
  height:28px;
  padding:0;
  border-radius:6px;
  cursor:pointer;
}
select.paceui{ height:36px; }
input[type="number"].paceui{ height:36px; }

/* Nicer checkbox styling inside sizes */
.sizes{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap:10px;
}
.sizes label{
  display:flex; align-items:center; gap:10px;
  padding:10px 12px; border:1px solid #e5e7eb; border-radius:12px;
  background:#ffffff; cursor:pointer; user-select:none;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.sizes label:hover{ background:#f7fafc; }
.sizes label span{ font-weight:600; }
.sizes input[type="checkbox"]{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  width:18px; height:18px; border:2px solid #cbd5e1; border-radius:6px;
  background:#ffffff; display:inline-block; position:relative; flex:0 0 auto;
  transition: all .15s ease;
}
.sizes input[type="checkbox"]:hover{ border-color:#9db4cf; }
.sizes input[type="checkbox"]:focus{ outline:none; box-shadow:0 0 0 3px rgba(14,116,204,0.15); border-color:#0e74cc; }
.sizes input[type="checkbox"]:checked{
  border-color: var(--accent);
  background: var(--accent);
}
.sizes input[type="checkbox"]:checked::after{
  content:''; position:absolute; width:6px; height:10px; left:5px; top:1px;
  border:2px solid #fff; border-top:0; border-left:0; transform: rotate(45deg);
}

/* General spacing/mizanpaj tweaks */
.panel{ padding:18px; }
.field label{ margin-bottom:4px; }
.field{ gap:8px; }

.export-size{
  padding:0 !important; border:0 !important;
  background:transparent; cursor:pointer; user-select:none;
}