body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f6f7f9;
  color: #222;
}

header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: white;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 600;
  color: #222;
}

/* Controls layout */
header .controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

header .controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  color: #333;
}

header .controls input,
header .controls select {
  padding: 6px 10px;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9f9f9;
  color: #222;
  outline: none;
  transition: all 0.15s ease-in-out;
}

header .controls input:focus,
header .controls select:focus {
  border-color: #888;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
  background: #fff;
}


input, select {
  padding: 8px;
  font-size: 14px;
}

#gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  padding: 16px;
}

.icon-card {
  background: white;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: transform 0.1s ease;
}

.icon-card:hover {
  transform: translateY(-2px);
}

.icon-card img {
  display: block;
  margin: 0 auto 8px;
}

.icon-name {
  font-size: 12px;
  word-break: break-word;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background: #1e1e1e;
    color: #eee;
  }
  
  header {
    background: #2a2a2a;
    border-bottom: 1px solid #444;
  }

  header h1,
  header .controls label {
    color: #eee;
  }

  header .controls input,
  header .controls select {
    background: #333;
    color: #eee;
    border: 1px solid #555;
  }

  header .controls input:focus,
  header .controls select:focus {
    background: #444;
    border-color: #888;
    box-shadow: 0 0 4px rgba(255,255,255,0.1);
  }

  input, select {
    background: #333;
    color: #eee;
    border: 1px solid #555;
  }

  .icon-card {
    background: #2a2a2a;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  }
}