:root{
  --bg:#0b0f14;
  --card: rgba(255,255,255,0.06);
  --glass: rgba(255,255,255,0.04);
  --muted: rgba(255,255,255,0.6);
  --accent:#007aff;
  --radius:14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial;
}

*{box-sizing:border-box}
html, body, #root {
  height: 100%;
  background: var(--bg);
}

body{
  min-height:100vh;
  background:linear-gradient(180deg,#071018 0%, #071018 60%);
  color:#fff;
  display:flex;
  flex-direction:column;
  padding:28px;
  overflow-x:hidden;
}

.app{
  width:100%;
  max-width:1200px;
  margin:0 auto;
}

.app-header{
  display:flex;
  flex-direction:column;
  gap:2px; /* reduced gap */
  margin-bottom:18px;
}

.title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:20px;
  letter-spacing:-0.02em;
  flex-wrap:wrap;
}

.subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;      /* small gap from title */
  margin-bottom: 10px;   /* small gap before the panel */
}

.version-tag {
  font-size: 0.7em;       
  color: rgba(255,255,255,0.7); 
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 6px;
  display: inline-block;
}

.panel{
  display:grid;
  grid-template-columns:360px 1fr;
  gap:20px;
}

.controls{
  background:var(--card);
  padding:18px;
  border-radius:var(--radius);
  backdrop-filter: blur(8px);
  box-shadow:0 6px 30px rgba(2,6,12,0.6);
}

.controls .row,
.colors .color {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
  width:100%;
}

.controls label,
.color label {
  width:90px;
  font-size:13px;
  color:var(--muted);
  text-align:left;
}

.select {
  flex:1;
  background:transparent;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.06);
  color:#fff;
  padding:0 10px;
  height:36px;
  display:inline-flex;
  align-items:center;
}

.colors {
  display:flex;
  flex-direction:column;
  gap:0;
}

.color input[type=color],
.color-hex {
  height:36px;
  border-radius:6px;
  border:none;
  cursor:pointer;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.color input[type=color] {
  width:50px;
  -webkit-appearance:none;
}

.color input[type=color]::-webkit-color-swatch-wrapper { padding:0; }
.color input[type=color]::-webkit-color-swatch { border:none; border-radius:6px; }

.color-hex {
  width:70px;
  font-size:12px;
  padding:4px 6px;
  background: rgba(255,255,255,0.08);
  color:#fff;
}

#noiseRange, #angleRange, #softnessRange { flex:1; height:36px; }
#noiseValue, #angleValue, #softnessValue { width:40px; text-align:right; font-size:12px; color:var(--muted); }

#customResolutionRow input {
  flex:1;
  height:36px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.08);
  color:#fff;
  padding:0 10px;
  font-size:13px;
}
#customResolutionRow input::placeholder { color: var(--muted); }

.btn{
  background:var(--accent);
  border:none;
  color:#fff;
  border-radius:10px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  cursor:pointer;
}

.btn.ghost{background:transparent;border:1px solid rgba(255,255,255,0.06)}
.btn.small{padding:0 8px;font-size:13px}

.preview{display:flex;flex-direction:column;gap:8px}
.canvas-wrap{
  background:var(--glass);
  border-radius:12px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:420px;
  max-height:420px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.02);
}
canvas{max-width:100%;height:auto;border-radius:8px;display:block}

.hint{font-size:12px;color:var(--muted)}

.footer {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

/* Links stay white */
.footer a {
  color: #fff;
  text-decoration: underline;
}

.footer .heart {
  color: #ff6b81; /* optional accent for heart */
  margin: 0 2px;
}

/* Responsive adjustments */
@media (max-width:880px){
  body{padding:12px;}
  .panel{grid-template-columns:1fr; gap:12px;}
  .controls{order:2;width:100%;}
  .preview{order:1;width:100%;}
  .canvas-wrap{min-height:320px; max-height:320px;}
  .title{font-size:18px;}
  .subtitle{font-size:12px;}
  .app-header {
    align-items: center;
    text-align: center;
  }
  .footer {
    text-align: center;
    padding: 20px 0;
  }
}

@media (max-width:480px){
  .canvas-wrap{min-height:280px; max-height:280px;}
  .title{font-size:16px;}
  .subtitle{font-size:11px;}
}