* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Roboto", system-ui, sans-serif;
  background-color: #f8f9fa;
  color: #2d3436;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 480px;
  width: 100%;
  padding: 32px;
}

.header {
  text-align: center;
  margin-bottom: 24px;
}

.header h1 {
  font-size: 28px;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 8px;
}

.header p {
  font-size: 14px;
  color: #666;
}

.form-group {
  margin-bottom: 20px;
}

.label-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

label {
  font-size: 14px;
  font-weight: 500;
  color: #2d3436;
}

.info-icon {
  width: 16px;
  height: 16px;
  color: #666;
  cursor: help;
  position: relative;
}

.tooltip {
  display: none;
  position: absolute;
  background: #2d3436;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  top: -35px;
  left: 0;
  z-index: 10;
}

.info-icon:hover .tooltip {
  display: block;
}

.input-wrapper {
  position: relative;
}

input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  transition: all 0.2s;
}

input:focus {
  outline: none;
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

input.valid {
  border-color: #00b894;
}

input.invalid {
  border-color: #e74c3c;
}

.checkmark {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: #00b894;
  display: none;
}

.checkmark.show {
  display: block;
}

.error-message {
  display: none;
  color: #e74c3c;
  font-size: 13px;
  margin-top: 6px;
  align-items: center;
  gap: 4px;
}

.error-message.show {
  display: flex;
}

.helper-text {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}

.btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background-color: #6c5ce7;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #5b4bc6;
}

.btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.btn-success {
  background-color: #00b894;
  color: white;
}

.btn-success:hover {
  background-color: #00a080;
}

.btn-outline {
  background-color: transparent;
  color: #00b894;
  border: 2px solid #00b894;
}

.btn-outline:hover {
  background-color: rgba(0, 184, 148, 0.1);
}

.qr-placeholder {
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 48px;
  text-align: center;
  background-color: rgba(220, 220, 220, 0.1);
  margin-top: 24px;
}

.qr-placeholder svg {
  width: 64px;
  height: 64px;
  color: #999;
  margin-bottom: 12px;
}

.qr-placeholder p {
  font-size: 14px;
  color: #999;
}

.qr-result {
  display: none;
  margin-top: 24px;
}

.qr-result.show {
  display: block;
}

.success-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #00b894;
  font-weight: 500;
  margin-bottom: 16px;
}

.success-message svg {
  width: 20px;
  height: 20px;
}

.qr-display {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.qr-container {
  padding: 16px;
  background: white;
  border: 2px solid #00b894;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#qrcode {
  display: flex;
  justify-content: center;
}

.button-group {
  display: flex;
  gap: 12px;
}

.button-group .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
}

.button-group .btn svg {
  width: 16px;
  height: 16px;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2d3436;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: all 0.3s;
  z-index: 1000;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .container {
    padding: 24px;
  }

  .header h1 {
    font-size: 24px;
  }

  .qr-container {
    padding: 12px;
  }

  #qrcode canvas {
    max-width: 240px !important;
    height: auto !important;
  }
}

textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  transition: all 0.2s;
  resize: vertical;
  min-height: 70px;
}

textarea:focus {
  outline: none;
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}
