.wp-keycloak-registration {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 10;
  background: #f3f4f6;
  padding: 32px 16px;
  background-image: var(--wpkc-background, none);
  background-size: cover;
  background-position: center;
}

.wp-keycloak-registration::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.wp-keycloak-registration > * {
  position: relative;
  z-index: 11;
}

.wpkc-card {
  width: min(480px, 100%);
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.15);
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.wpkc-card__logo {
  height: 48px;
  width: auto;
}

.wpkc-card__title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.wpkc-card__text {
  margin: 0;
  color: #4b5563;
}

.wpkc-card__form {
  display: grid;
  gap: 14px;
}

.wpkc-card__footer {
  display: flex;
  justify-content: flex-end;
}

.wpkc-field {
  display: grid;
  gap: 6px;
}

.wpkc-field label {
  font-weight: 600;
  color: #111827;
}

.wpkc-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
}

.wpkc-field input:focus {
  outline: 2px solid #2563eb;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.wpkc-help {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.wpkc-submit {
  padding: 12px 16px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.wpkc-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.wpkc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.wpkc-button--ghost {
  border-color: #d1d5db;
  color: #111827;
  background: #fff;
}

.wpkc-button--ghost:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.wpkc-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

.wpkc-alert--success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.wpkc-alert--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.wpkc-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  z-index: 20;
  text-align: center;
  padding: 16px;
}

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

.wpkc-card__overlay-text {
  font-weight: 700;
  color: #1f2937;
}

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

@media (max-width: 480px) {
  .wpkc-card {
    padding: 24px;
  }
}