* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  margin: 0;
  min-height: 100vh;
  background: #1a1a1a;
  color: #e0e0e0;
}

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

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: 0.02em;
}

.tagline {
  color: #888;
  margin: 0 0 2rem;
  font-size: 0.95rem;
}

.form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field label {
  font-size: 0.85rem;
  color: #aaa;
}

.field input[type="file"],
.field select {
  padding: 0.5rem 0.75rem;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.9rem;
  min-width: 160px;
}

.field input[type="number"] {
  width: 5rem;
  padding: 0.5rem 0.5rem;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.9rem;
}

.size-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.size-row .size-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.size-inputs span {
  color: #666;
}

.field .hint {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.35;
}

.optional .field {
  margin: 0;
}

.btn {
  padding: 0.6rem 1.25rem;
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  color: #e0e0e0;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover {
  background: #404040;
  border-color: #666;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.message.error {
  background: rgba(180, 60, 60, 0.2);
  border: 1px solid #a04040;
  color: #f0a0a0;
}

.message.success {
  background: rgba(60, 120, 60, 0.2);
  border: 1px solid #408040;
  color: #a0d0a0;
}

.preview-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 600px) {
  .preview-section {
    grid-template-columns: 1fr;
  }
}

.preview-box {
  background: #252525;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 1rem;
}

.preview-label {
  font-size: 0.8rem;
  color: #777;
  margin: 0 0 0.75rem;
}

.preview-area {
  min-height: 160px;
  background: #1a1a1a;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-area img {
  max-width: 100%;
  max-height: 320px;
  display: block;
}

.preview-area .placeholder {
  color: #555;
  font-size: 0.9rem;
}

.download-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: #6a9eff;
  font-size: 0.9rem;
  text-decoration: none;
}

.download-link:hover {
  text-decoration: underline;
}
