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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  padding: 3rem 0 1rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 1.1rem;
  color: #888;
  margin-top: 0.5rem;
}

/* Hero */
.hero {
  text-align: center;
  padding: 2rem 0 3rem;
}

.hero-examples {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-examples img {
  height: 280px;
  image-rendering: pixelated;
}

.hero-caption {
  margin-top: 1rem;
  color: #666;
  font-size: 0.9rem;
}

/* Sections */
section {
  margin-bottom: 3rem;
}

h2 {
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #222;
}

h3 {
  font-size: 1.1rem;
  color: #ccc;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  color: #aaa;
  margin-bottom: 0.75rem;
}

/* Code blocks */
.code-block {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  overflow-x: auto;
}

.code-block code {
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.95rem;
  color: #e0e0e0;
}

.hl {
  color: #58a6ff;
}

code {
  font-family: "SF Mono", "Fira Code", Consolas, monospace;
  font-size: 0.85rem;
  background: #1a1a1a;
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

/* Preset grids */
.preset-grid, .crop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}

.crop-grid {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.preset-card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  transition: border-color 0.2s;
}

.preset-card:hover {
  border-color: #444;
}

.preset-card img {
  height: 150px;
  image-rendering: pixelated;
  display: block;
  margin: 0 auto 0.5rem;
}

.preset-card span {
  font-family: "SF Mono", Consolas, monospace;
  font-size: 0.85rem;
  color: #58a6ff;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
}

th, td {
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #1a1a1a;
}

th {
  color: #888;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: #ccc;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem 0;
  color: #444;
  font-size: 0.85rem;
}

/* Playground */
.playground {
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  padding: 1.5rem;
}
.playground-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.playground-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #aaa;
}
.playground-controls label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}
.playground-controls label.full-width {
  grid-column: 1 / -1;
}
.pg-hide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.35rem 0.75rem;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.75rem;
}
.pg-hide-grid label {
  font-size: 0.85rem;
  margin: 0;
}
.pg-hide-empty {
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
  grid-column: 1 / -1;
}
.playground-controls input[type="text"],
.playground-controls select {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  color: #e0e0e0;
  font-family: inherit;
  font-size: 0.9rem;
}
.playground-controls input[type="text"]:focus,
.playground-controls select:focus {
  outline: none;
  border-color: #58a6ff;
}
.playground-controls input[type="checkbox"] {
  accent-color: #58a6ff;
  width: 1.1rem;
  height: 1.1rem;
}
.playground-notice {
  background: #2a1f00;
  border: 1px solid #5a4200;
  color: #ffd580;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
}
.playground-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.playground-preview {
  background: linear-gradient(135deg, #1a1a1a 25%, transparent 25%) -10px 0,
              linear-gradient(225deg, #1a1a1a 25%, transparent 25%) -10px 0,
              linear-gradient(315deg, #1a1a1a 25%, transparent 25%) 0 0,
              linear-gradient(45deg, #1a1a1a 25%, transparent 25%) 0 0;
  background-size: 20px 20px;
  background-color: #0a0a0a;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 1rem;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.playground-preview img {
  max-height: 400px;
  max-width: 100%;
  image-rendering: pixelated;
}
.playground-url {
  width: 100%;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}
.playground-url code {
  background: transparent;
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
}

@media (max-width: 600px) {
  header h1 { font-size: 1.8rem; }
  .hero-examples img { height: 180px; }
  .preset-grid, .crop-grid { grid-template-columns: repeat(3, 1fr); }
}
