/* L2 Pearl — Register page styles */

.register-card {
  background: linear-gradient(180deg, rgba(19, 21, 30, 0.97), rgba(11, 13, 20, 0.97));
  border: 1px solid rgba(214, 207, 224, 0.25);
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 30px 60px -30px rgba(107, 63, 142, 0.4);
}
.register-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #d6cfe0, transparent);
}
.register-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #6b3f8e, transparent);
  opacity: 0.6;
}

/* Corner brackets */
.register-card > form::before,
.register-card > form::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid #d6cfe0;
  opacity: 0.7;
  pointer-events: none;
}
.register-card > form::before {
  top: 8px; left: 8px;
  border-right: none; border-bottom: none;
}
.register-card > form::after {
  bottom: 8px; right: 8px;
  border-left: none; border-top: none;
}

@media (min-width: 640px) {
  .register-card { padding: 3rem 3rem; }
}

/* Form labels */
.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d6cfe0;
  margin-bottom: 0.5rem;
}

/* Input wrapper */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(5, 6, 10, 0.6);
  border: 1px solid rgba(214, 207, 224, 0.2);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.input-wrap:focus-within {
  border-color: rgba(214, 207, 224, 0.7);
  background: rgba(5, 6, 10, 0.85);
  box-shadow: 0 0 0 3px rgba(153, 102, 204, 0.15);
}
.input-wrap.error {
  border-color: #ef4444;
}

.input-icon {
  width: 18px;
  height: 18px;
  margin: 0 0.875rem 0 1rem;
  color: rgba(214, 207, 224, 0.6);
  flex-shrink: 0;
}

.input-wrap input,
.input-wrap select {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 0.875rem 1rem 0.875rem 0;
  color: #f0eaf7;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  outline: none;
  width: 100%;
}
.input-wrap input::placeholder {
  color: rgba(154, 154, 168, 0.5);
}
.input-wrap select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d6cfe0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.input-wrap select option {
  background: #0b0d14;
  color: #f0eaf7;
}

/* Show/hide password toggle */
.toggle-pw {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0 1rem;
  color: rgba(214, 207, 224, 0.6);
  display: flex;
  align-items: center;
}
.toggle-pw:hover { color: #d6cfe0; }
.toggle-pw svg {
  width: 18px;
  height: 18px;
}
.toggle-pw .hidden { display: none; }

/* Form hints + errors */
.form-hint {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: rgba(154, 154, 168, 0.85);
}
.form-error {
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #f87171;
  min-height: 1em;
}

/* Strength meter */
.strength-meter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.strength-bar {
  flex: 1;
  height: 4px;
  background: rgba(214, 207, 224, 0.1);
  position: relative;
  overflow: hidden;
}
.strength-bar > span {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.3s ease, background 0.3s ease;
}
.strength-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(154, 154, 168, 0.85);
  min-width: 80px;
  text-align: right;
}

/* Checkboxes */
.checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
}
.checkbox-wrap input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.checkbox-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid rgba(214, 207, 224, 0.4);
  position: relative;
  margin-top: 2px;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.checkbox-wrap input:checked + .checkbox-box {
  background: linear-gradient(135deg, #6b3f8e, #9966cc);
  border-color: #d6cfe0;
}
.checkbox-wrap input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-wrap input:focus-visible + .checkbox-box {
  box-shadow: 0 0 0 3px rgba(153, 102, 204, 0.3);
}

/* Submit button */
.register-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, #6b3f8e, rgba(107, 63, 142, 0.7));
  border: 1px solid #9966cc;
  color: #fff;
  padding: 1rem 2rem;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 0 30px rgba(153, 102, 204, 0.4);
  position: relative;
}
.register-submit:hover:not(:disabled) {
  background: linear-gradient(180deg, #9966cc, #6b3f8e);
  box-shadow: 0 0 40px rgba(153, 102, 204, 0.6);
  transform: translateY(-1px);
}
.register-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.submit-spinner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.submit-spinner svg {
  width: 18px;
  height: 18px;
}
.submit-spinner.hidden,
.submit-text.hidden {
  display: none;
}

/* Form messages */
#form-message {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border: 1px solid;
}
#form-message.success {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
  color: #86efac;
}
#form-message.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Info pills */
.info-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(19, 21, 30, 0.6);
  border: 1px solid rgba(214, 207, 224, 0.15);
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(154, 154, 168, 0.95);
  font-family: 'Cinzel', serif;
}

@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 0.8s linear infinite; }
