/* styleRL.css — Login / Register pages */
:root {
  /* Three-layer background: dark overlay → bg image → CSS gradient fallback.
     If bg-3.jpg is missing the gradient still provides a vivid backdrop
     for the glassmorphism card. */
  --pc-bg:
    linear-gradient(rgba(11,15,20,0.55), rgba(11,15,20,0.55)),
    url('/images/bg-3.jpg') center center / cover no-repeat fixed,
    linear-gradient(135deg, #0d1b2a 0%, #1e3a6e 50%, #0d1b2a 100%);
  --pc-bg-color: #0b0f14;
  --font-family: "Segoe UI", Roboto, sans-serif;
  --text-color: #e7eef7;
  --border-radius: 18px;
  --accent-color: rgba(59,130,246,0.8);
  --error-color: #f87171;
  --message-color: #34d399;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text-color);
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Gradient fallback shown on mobile and before JS adds .pc-bg */
  background: linear-gradient(135deg, #0d1b2a 0%, #1a3060 50%, #0d1b2a 100%);
}

body.pc-bg       { background: var(--pc-bg); }
body.force-pc-bg { background: var(--pc-bg); }
body.force-pc-bg .mobile-bg { display: none !important; }

/* Mobile animated background */
.mobile-bg {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -1;
  pointer-events: none;
}

/* ── Auth card ─────────────────────────────────────────── */
.auth-card {
  background: rgba(15, 20, 30, 0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius);
  padding: 40px 50px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  text-align: center;
  width: 100%;
  max-width: 380px;
  animation: fadeIn 0.8s ease;
}

.auth-card header h1 {
  margin: 0 0 25px;
  font-weight: 600;
  font-size: 24px;
}

/* ── Form fields ───────────────────────────────────────── */
.form-field {
  margin: 10px 0 18px;
  text-align: left;
}

.form-field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-color);
}

.auth-card input[type="text"],
.auth-card input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus {
  border-color: var(--accent-color);
}

/* ── Submit button ─────────────────────────────────────── */
.auth-card button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  padding: 12px 18px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.auth-card button[type="submit"]:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

/* ── Links ─────────────────────────────────────────────── */
.auth-card a {
  color: #3b82f6;
  text-decoration: none;
}
.auth-card a:hover { text-decoration: underline; }

/* ── Flash messages ─────────────────────────────────────── */
.error   { color: var(--error-color);   margin-bottom: 12px; font-size: 14px; }
.message { color: var(--message-color); margin-bottom: 12px; font-size: 14px; }

/* ── Password hint ─────────────────────────────────────── */
.password-hint {
  font-size: 12px;
  color: rgba(149,162,179,0.8);
  text-align: left;
  margin: -10px 0 14px;
  line-height: 1.4;
}

/* ── Footer ────────────────────────────────────────────── */
.auth-footer {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(149,162,179,0.8);
}

/* ── Animation ─────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile ────────────────────────────────────────────── */
@media (max-width: 600px) {
  body {
    background: none;
    padding: 0;
  }
  .mobile-bg  { display: block; }
  .auth-card  {
    max-width: 360px;
    padding: 30px 25px;
    border-radius: 16px;
  }
  .auth-card header h1     { font-size: 22px; }
  .auth-card input,
  .auth-card button[type="submit"] { font-size: 15px; }
}
