* {
  box-sizing: border-box;
  font-family: Vazirmatn, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.35) inset !important;
  -webkit-text-fill-color: #f8fbff !important;
  transition: background-color 5000s ease-in-out 0s;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #e5eefc;
  background-color: #000;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.register-card {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 400px;
  height: 90%;
  padding: 35px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 15px rgba(0, 150, 255, 0.5),
    0 0 30px rgba(0, 100, 255, 0.2);
  z-index: 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-header {
  margin-bottom: 20px;
  flex-shrink: 0;
}

.card-header h1,
.card-header h3 {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}

.card-header p {
  margin: 0;
  color: #9fb0c9;
  font-size: 13px;
  line-height: 1.8;
}

.form-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 5px;
  display: flex;
  flex-direction: column;
}

.form-step {
  display: none;
}

.form-step.active {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: #dbe7f5;
}

.field input,
.field select {
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fbff;
  padding: 0 13px;
  font-size: 13px;
  outline: none;
  transition: 0.2s ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(255, 255, 255, 0.09);
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.14),
    0 8px 24px rgba(37, 99, 235, 0.12);
}

.error {
  min-height: 18px;
  color: #fca5a5;
  font-size: 11px;
}

.actions {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
}

.btn {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  font-family: Vazirmatn, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #eaf4ff;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.2);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #2b6fff 0%, #12c2e9 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.12);
}

.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #fff;
}

.btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.card-footer {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
  flex-shrink: 0;
}

.card-footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 700;
  margin-right: 5px;
}

.global-message {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

.hidden {
  display: none !important;
}

#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(92vw, 420px);
  pointer-events: none;
}

.toast {
  position: relative;
  overflow: hidden;
  padding: 14px 18px;
  margin-bottom: 12px;
  border-radius: 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.2px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.35),
    0 8px 20px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation:
    slideInDown 0.45s cubic-bezier(.22,1,.36,1),
    fadeOut 0.45s ease 3.1s forwards;
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03));
  pointer-events: none;
}

.toast.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.30), rgba(22, 163, 74, 0.18));
  border-color: rgba(74, 222, 128, 0.28);
  box-shadow:
    0 18px 40px rgba(22, 163, 74, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.toast.error {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.30), rgba(220, 38, 38, 0.18));
  border-color: rgba(252, 165, 165, 0.28);
  box-shadow:
    0 18px 40px rgba(220, 38, 38, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.toast.warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.30), rgba(217, 119, 6, 0.18));
  border-color: rgba(253, 186, 116, 0.28);
  box-shadow:
    0 18px 40px rgba(217, 119, 6, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

.toast.info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.30), rgba(37, 99, 235, 0.18));
  border-color: rgba(147, 197, 253, 0.28);
  box-shadow:
    0 18px 40px rgba(37, 99, 235, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.18);
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

@media (max-width: 768px) {
  .register-card {
    width:90%;
    max-width:400px;
    height:80%;
    padding:20px;
    border-radius:14px;
  }
}
