* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f4f7;
  font-family: -apple-system, "Segoe UI", "Microsoft JhengHei", sans-serif;
  color: #1f2933;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 32px 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  max-width: 480px;
  width: 90%;
  text-align: center;
}

h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

p.subtitle {
  color: #52606d;
  margin-bottom: 24px;
}

.button-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  border: none;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
}

.btn-secondary {
  background: #e4e7eb;
  color: #1f2933;
}

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

form.profile-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}

form.profile-form label {
  font-size: 13px;
  color: #52606d;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

form.profile-form input {
  padding: 8px 10px;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-size: 14px;
}

.spinner-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.spinner-overlay.active {
  display: flex;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #dde2e8;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result {
  margin-top: 20px;
  display: none;
  text-align: left;
}

.result.active {
  display: block;
}

.result-error {
  color: #e12d39;
  font-weight: bold;
  text-align: center;
}

.result-success dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
}

.result-success dt {
  color: #52606d;
}

.result-success dd {
  margin: 0;
  word-break: break-all;
}

.hidden {
  display: none !important;
}
