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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 40px;
  max-width: 480px;
  width: 100%;
}

h1 {
  text-align: center;
  color: #333;
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.subtitle {
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

#qr-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  outline: none;
}

#qr-input:focus {
  border-color: #667eea;
}

.options {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.option-group {
  flex: 1;
  min-width: 100px;
}

.option-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

.option-group select {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  background: #fff;
  cursor: pointer;
}

.option-group select:focus {
  border-color: #667eea;
}

.option-group input[type="color"] {
  width: 100%;
  height: 38px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 2px;
  cursor: pointer;
  background: #fff;
}

#generate-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

#generate-btn:hover {
  opacity: 0.9;
}

#generate-btn:active {
  transform: scale(0.98);
}

.qr-result {
  margin-top: 28px;
  text-align: center;
}

.qr-result.hidden {
  display: none;
}

#qr-canvas {
  display: inline-block;
  padding: 16px;
  background: #fff;
  border: 2px solid #eee;
  border-radius: 12px;
  margin-bottom: 16px;
}

#qr-canvas img {
  display: block;
}

#download-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

#download-btn:hover {
  background: #555;
}

@media (max-width: 500px) {
  .container {
    padding: 24px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .options {
    flex-direction: column;
    gap: 12px;
  }
}
