:root {
  --bg: #0a0a0f;
  --card: #14141c;
  --text: #e8e8ec;
  --muted: #8a8a9a;
  --accent: #7c5cff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid #22222e;
}
.logo { color: var(--text); font-weight: 700; text-decoration: none; font-size: 1.2rem; }
nav a { color: var(--muted); text-decoration: none; margin-left: 1.5rem; font-size: 0.9rem; }
nav a:hover { color: var(--accent); }
main { max-width: 900px; margin: 0 auto; padding: 3rem 1.5rem; }
.hero { text-align: center; margin-bottom: 3rem; }
.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero p { color: var(--muted); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.tool-card {
  background: var(--card);
  border: 1px solid #22222e;
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s;
}
.tool-card:hover { border-color: var(--accent); }
.tool-card h2 { font-size: 1.1rem; margin: 0 0 0.5rem; }
.tool-card p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.tool-page h1 { font-size: 2rem; }
.tool-page > p { color: var(--muted); }
form {
  background: var(--card);
  border: 1px solid #22222e;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  margin: 1.5rem 0;
}
input[type="file"], select {
  background: #1c1c26;
  border: 1px solid #2c2c3a;
  border-radius: 8px;
  padding: 0.6rem;
  color: var(--text);
}
button {
  background: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 0.75rem;
  color: white;
  font-weight: 600;
  cursor: pointer;
}
button:hover { opacity: 0.9; }
#result-area img { max-width: 100%; border-radius: 8px; margin-top: 1rem; }
#result-area a { color: var(--accent); display: inline-block; margin-top: 0.5rem; }
.error { color: #ff6b6b; }
.seo-copy { margin-top: 3rem; color: var(--muted); line-height: 1.6; }
.seo-copy h2 { color: var(--text); }
.site-footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid #22222e;
}

#result-area canvas { max-width: 100%; border-radius: 8px; display: block; }
.option-label { color: var(--muted); font-size: 0.85rem; margin: 1rem 0 0.5rem; }
.swatch-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #2c2c3a;
  cursor: pointer;
  padding: 0;
}
.swatch:hover { border-color: var(--accent); }
.checker-swatch {
  background-image:
    linear-gradient(45deg, #444 25%, transparent 25%),
    linear-gradient(-45deg, #444 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #444 75%),
    linear-gradient(-45deg, transparent 75%, #444 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
  background-color: #666;
}
#custom-color {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid #2c2c3a;
  padding: 0;
  cursor: pointer;
  background: none;
}
.checker-bg {
  display: inline-block;
  background-image:
    linear-gradient(45deg, #ccc 25%, transparent 25%),
    linear-gradient(-45deg, #ccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ccc 75%),
    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #fff;
  border-radius: 8px;
  margin-top: 1rem;
}
