/* v1.5.0: Auth Pages (register.php, login.php) */
.auth-page {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 50% 30%, rgba(15,25,50,0.98) 0%, #050510 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
}

.auth-container {
  width: 100%;
  max-width: 430px;
}

.auth-card {
  background: rgba(15,20,35,0.95);
  border: 1px solid rgba(78,205,196,0.15);
  border-radius: 16px;
  padding: 24px 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(0,212,255,0.05);
  backdrop-filter: blur(10px);
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-header img {
  max-width: 200px;
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(0,212,255,0.3));
}
.auth-header h1 {
  color: #fff;
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: 1px;
}
.auth-subtitle {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  margin: 0;
}

/* Form Fields */
.auth-form { display: flex; flex-direction: column; gap: 13px; }

.form-field label {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
  overflow: hidden;
}
.input-wrap:focus-within {
  border-color: rgba(78,205,196,0.5);
  box-shadow: 0 0 12px rgba(0,212,255,0.1);
}

.input-icon {
  padding: 0 10px;
  font-size: 16px;
  flex-shrink: 0;
  opacity: 0.5;
}

.input-wrap input,
.input-wrap select {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 11px 12px 11px 0;
  outline: none;
  min-width: 0;
}
.input-wrap select {
  padding-left: 12px;
  cursor: pointer;
}
.input-wrap select option {
  background: #1a1a2e;
  color: #fff;
}
.input-wrap input::placeholder { color: rgba(255,255,255,0.25); }

.toggle-pw {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 8px 10px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.toggle-pw:hover { opacity: 1; }

.field-status {
  padding: 0 10px;
  font-size: 14px;
  flex-shrink: 0;
}

.field-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
  min-height: 14px;
}
.field-hint.error { color: #e94560; }
.field-hint.success { color: #4ecdc4; }

/* Phone field */
.phone-wrap { gap: 0; }
.country-code-select {
  flex: 0 0 auto !important;
  width: 100px !important;
  padding: 11px 8px !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  font-size: 13px !important;
  background: rgba(255,255,255,0.02) !important;
}

/* Password strength */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.pw-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}
.pw-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s, background 0.3s;
}
.pw-label {
  font-size: 11px;
  font-weight: 600;
  min-width: 60px;
  text-align: right;
}

/* Captcha */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.captcha-question {
  flex: 1;
  background: rgba(255,215,0,0.06);
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: 8px;
  padding: 10px 14px;
  color: #FFD700;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.captcha-input-wrap {
  width: 100px;
  flex-shrink: 0;
}
.captcha-input-wrap input {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 10px !important;
}
.captcha-refresh {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  padding: 8px 10px;
  transition: background 0.2s;
}
.captcha-refresh:hover { background: rgba(255,255,255,0.1); }

/* Error */
.auth-error {
  background: rgba(233,69,96,0.1);
  border: 1px solid rgba(233,69,96,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #e94560;
  font-size: 13px;
  text-align: center;
}

/* Submit */
.auth-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #00ffc8, #00aaff);
  border: none;
  border-radius: 10px;
  color: #0a0a1a;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}
.auth-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.3);
}
.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer */
.auth-footer {
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.8;
}
.auth-footer a {
  color: #4ecdc4;
  text-decoration: none;
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 640px) {
  .auth-page {
    align-items: flex-start;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .auth-card {
    margin-top: 6px;
    border-radius: 14px;
    padding: 20px 16px;
  }
  .auth-header {
    margin-bottom: 18px;
  }
  .auth-header h1 { font-size: 20px; }
  .auth-header img { max-width: 148px; margin-bottom: 8px; }
  .form-field label { margin-bottom: 5px; }
  .input-wrap input,
  .input-wrap select {
    font-size: 16px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .captcha-row { flex-wrap: wrap; gap: 8px; }
  .captcha-question {
    min-width: 100%;
    min-height: 36px;
    font-size: 14px;
    padding: 8px 10px;
  }
  .captcha-input-wrap {
    flex: 1;
    width: auto;
  }
  .captcha-refresh {
    min-height: 40px;
    min-width: 44px;
  }
  .auth-submit {
    padding: 12px;
    min-height: 44px;
  }
}

@media (max-width: 420px) {
  .auth-card {
    padding: 16px 12px;
  }
  .auth-language-selector {
    top: 8px;
    right: 8px;
  }
}

/* v1.6.0: Auth page language selector */
.auth-language-selector {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}
.auth-language-selector select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(78,205,196,0.3);
  color: #ccc;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  outline: none;
}
.auth-language-selector select:hover {
  border-color: rgba(78,205,196,0.6);
}
.auth-language-selector select option {
  background: #1a1a2e;
  color: #eee;
}
.auth-card {
  position: relative;
}