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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #1a1a2e;
}

.container {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 24px;
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
}

.container:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

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

.subtitle {
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.input-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.375rem;
}

input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #f8f9fa;
}

input:focus {
  border-color: #1a1a2e;
  box-shadow: 0 0 0 4px rgba(26, 26, 46, 0.08);
  background: #fff;
}

input::placeholder {
  color: #adb5bd;
}

.color-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.color-group {
  flex: 1;
}

.color-group label {
  margin-bottom: 0.25rem;
}

.color-group input[type="color"] {
  width: 100%;
  height: 44px;
  padding: 2px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  cursor: pointer;
  background: #f8f9fa;
}

.color-group input[type="color"]:focus {
  border-color: #1a1a2e;
}

.btn {
  width: 100%;
  padding: 0.8125rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #1a1a2e;
  color: #fff;
}

.btn-primary:hover {
  background: #2d2d4e;
  box-shadow: 0 4px 16px rgba(26, 26, 46, 0.25);
}

.btn-secondary {
  background: #e9ecef;
  color: #495057;
}

.btn-secondary:hover {
  background: #dee2e6;
}

.qr-wrapper {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
  text-align: center;
}

.qr-wrapper.show {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#qrcode {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 1rem;
}

#qrcode img {
  border-radius: 8px;
  image-rendering: pixelated;
}

.btn-group {
  display: flex;
  gap: 0.75rem;
}

.btn-group .btn {
  flex: 1;
}

.footer {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: #adb5bd;
  text-align: center;
}

@media (min-width: 480px) {
  .container {
    padding: 2.5rem 2rem;
  }
  h1 { font-size: 1.75rem; }
}
