/* =========================
   PREMIUM LIGHTWEIGHT REGISTER (UPDATED v4.1) — VISIBLE COLOR BOOST
   ✅ Only COLORS updated (sizes/positions unchanged)
   ✅ Background + card now visibly premium
   ========================= */

:root {
  /* Premium “royal blue + violet” */
  --primary: #3B82F6;
  --primary-dark: #1D4ED8;
  --secondary: #7C3AED;
  --accent: #EC4899;

  /* ✅ More visible, still premium (not harsh) */
  --bg1:#660000 ;   /* slightly deeper */
  --bg2: #00BFFF;   /* slightly deeper */

  --dark: #0F172A;
  --gray: #64748B;

  --border-radius: 8px;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --transition: all 0.26s ease;

  --ring: 0 0 0 3px rgba(59, 130, 246, 0.20);
  --ring-ok: 0 0 0 3px rgba(16, 185, 129, 0.18);
  --ring-bad: 0 0 0 3px rgba(244, 63, 94, 0.18);

  --control-h: 42px;
  --control-font: 14px;
  --control-pad-x: 14px;

  --control-w: 84%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  /* ✅ Noticeable premium background */
  background:
    radial-gradient(950px 520px at 12% 10%, rgba(59, 130, 246, 0.18), transparent 62%),
    radial-gradient(900px 520px at 90% 85%, rgba(124, 58, 237, 0.16), transparent 60%),
    radial-gradient(700px 420px at 55% 45%, rgba(236, 72, 153, 0.06), transparent 60%),
    linear-gradient(135deg, var(--bg1) 0%, var(--bg2) 100%);

  color: var(--dark);
  line-height: 1.5;
  min-height: 100vh;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
}

/* ✅ Card: tinted glass so it doesn’t look “same white” */
.card {
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.92) 0%,
      rgba(243,246,255,0.90) 100%);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 26px 20px 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);

  border: 1px solid rgba(99, 102, 241, 0.14); /* subtle indigo border */
  backdrop-filter: blur(12px);
}

.card:before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Header styles */
.header { margin-bottom: 14px; }

/* Logo */
.logo {
  width: 58px;
  height: 58px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.45), transparent 45%),
    linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  color: white;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.2px;
  box-shadow: 0 16px 34px rgba(59, 130, 246, 0.30);
  border: 1px solid rgba(255,255,255,0.45);
}

h2 {
  font-size: 20px;
  color: var(--dark);
  margin-bottom: 7px;
  font-weight: 900;
  letter-spacing: 0.15px;
}

.subtitle {
  color: rgba(124, 58, 237, 0.92);
  font-size: 12px;
  margin-bottom: 2px;
  line-height: 1.45;
  opacity: 0.98;
}

.form-group {
  margin-bottom: 10px;
  text-align: left;
  position: relative;
}

.control-wrap {
  width: var(--control-w);
  margin: 0 auto;
  position: relative;
}

/* Input */
input {
  width: 80%;
  height: var(--control-h);
  line-height: var(--control-h);
  padding: 0 var(--control-pad-x);

  border: 1.7px solid rgba(148, 163, 184, 0.58);
  border-radius: 14px;
  font-size: var(--control-font);
  font-weight: 750;
  transition: var(--transition);

  background:
    radial-gradient(120% 140% at 20% 0%,
      rgba(255,255,255,0.98),
      rgba(248,250,252,0.93) 55%,
      rgba(239,246,255,0.95) 100%);

  text-align: center;
  letter-spacing: 0.2px;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 8px 18px rgba(15, 23, 42, 0.07);

  -webkit-appearance: none;
  appearance: none;
}

#registerForm .control-wrap input {
  height: var(--control-h) !important;
  line-height: var(--control-h) !important;
  width: 100% !important;
  text-align: center !important;
}

input::placeholder {
  color: rgba(100, 116, 139, 0.62);
  text-align: center;
  font-weight: 650;
  font-size: 12px;
  line-height: var(--control-h);
}

input:hover {
  border-color: rgba(59, 130, 246, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 10px 22px rgba(15, 23, 42, 0.09);
}

input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 1);
  background: #fff;
  box-shadow:
    var(--ring),
    0 14px 26px rgba(59, 130, 246, 0.16);
}

input.valid {
  border-color: rgba(16, 185, 129, 1);
  box-shadow:
    var(--ring-ok),
    0 12px 24px rgba(16, 185, 129, 0.14);
}

input.invalid {
  border-color: rgba(244, 63, 94, 1);
  box-shadow:
    var(--ring-bad),
    0 12px 24px rgba(244, 63, 94, 0.14);
}

.input-status {
  position: absolute;
  right: 12px;
  top: calc(var(--control-h) / 2);
  transform: translateY(-50%);
  font-size: 13px;
  color: rgba(244, 63, 94, 0.95);
  pointer-events: none;
}

/* Password strength bar */
.password-strength {
  height: 4px;
  background: rgba(226, 232, 240, 0.98);
  border-radius: 999px;
  margin-top: 7px;
  overflow: hidden;
  position: relative;
}

.strength-meter {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--secondary));
  border-radius: 999px;
  transition: var(--transition);
}

.hint {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.80;
  color: rgba(71, 85, 105, 0.95);
  text-align: center;
  width: var(--control-w);
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   REGISTER BUTTON (FINAL)
   ========================= */

button{
  width: 100%;
  height: var(--control-h);

  /* ✅ Perfect center */
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 14px;
  line-height: normal;

  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border: none;
  border-radius: 12px;
  color: #ffffff;

  font-size: 14.8px;
  font-weight: 850;
  letter-spacing: 0.35px;

  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
  position: relative;
  overflow: hidden;

  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.24);
}

#registerForm .control-wrap button[type="submit"]{
  width: 100% !important;
  height: var(--control-h) !important;
}

/* Hover */
button:hover{
  background: linear-gradient(90deg, var(--primary-dark), #6D28D9);
  transform: translateY(-1px);
  box-shadow: 0 20px 38px rgba(59, 130, 246, 0.28);
}

button:active{
  transform: translateY(0);
}

/* =========================
   LOGIN BUTTON (FINAL)
   ========================= */

.login-link{
  margin-top: 12px;
  width: 100%;
  text-align: center;
}

.login-link a{
  /* ✅ Same size as register */
  width: var(--control-w);
  height: var(--control-h);
  margin: 0 auto;

  /* ✅ Perfect center */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: normal;

  background: linear-gradient(90deg, #00B894, #00D9A6);
  color: #ffffff !important;

  font-size: 14.8px;
  font-weight: 850;
  letter-spacing: 0.35px;

  border-radius: 12px;
  text-decoration: none !important;

  transition: var(--transition);
  box-shadow: 0 12px 24px rgba(0,184,148,0.35);
}

/* Hover */
.login-link a:hover{
  background: linear-gradient(90deg, #00A884, #00C897);
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(0,184,148,0.45);
}

/* Remove underline */
.login-link a:after{
  display:none;
}
/* Decorative elements */
.decoration {
  position: absolute;
  opacity: 0.14; /* slightly more visible */
  z-index: -1;
}

.circle-1 {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 55%),
              linear-gradient(135deg, var(--primary), rgba(124, 58, 237, 0.85));
  top: -78px;
  right: -78px;
}

.circle-2 {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.20), transparent 55%),
              linear-gradient(135deg, var(--secondary), rgba(236, 72, 153, 0.55));
  bottom: -66px;
  left: -66px;
}

/* Toast container */
#toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 320px;
}

.toast {
  min-width: 240px;
  padding: 11px 16px;
  border-radius: 10px;
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateX(100%);
  animation: slideIn 0.5s forwards, fadeOut 0.5s 3.5s forwards;
  cursor: pointer;
  user-select: none;
  font-size: 13px;
}

.toast-success { background-color: #10B981; }
.toast-error { background-color: #F43F5E; }

@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

@media (max-width: 576px) {
  body { padding: 14px; }
  .container { max-width: 380px; }
  .card { padding: 22px 18px 16px; }
  h2 { font-size: 19px; }

  :root {
    --control-h: 38px;
    --control-font: 13.8px;
    --control-pad-x: 13px;
    --control-w: 77%;
  }

  .logo { width: 56px; height: 56px; font-size: 26px; }
}