/* =========================
   Merged Stylish Portal CSS
   (works with login.php markup)
   ========================= */

/* Base Reset */
:root{
  --bg:#000;                 /* deep black */
  --card:#0e1420;            /* subtle dark card */
  --muted:#8ea1b2;           /* soft gray-blue */
  --brand:#00d4ff;           /* cyan brand */
  --brand-soft: rgba(0,212,255,.15);
  --white:#fff;
  --danger:#ff4d4f;
}
*{
  margin:0; padding:0; box-sizing:border-box;
  font-family:'Poppins',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
html,body{height:100%}

/* Layout */
body{
  display:flex; justify-content:center; align-items:center;
  min-height:100vh;
  background: linear-gradient(135deg, #000000, #000000, #000000);
  color:var(--white);
  overflow:hidden;
  perspective:1000px;
}
#particles-js{
  position:fixed; inset:0; z-index:1;
}
.container{
  width:100%; max-width:420px; padding:20px;
  position:relative; z-index:10; perspective:1000px;
}

/* Card / Form Box */
.form-box{
  width:min(420px, 92vw);
  background: rgba(0,0,0,0.7);
  border-radius:24px;
  padding:40px 28px 28px;
  border:1px solid rgba(0,212,255,0.3);
  box-shadow:
    0 8px 24px rgba(0,212,255,0.40),
    inset 0 0 16px rgba(0,212,255,0.20),
    0 20px 40px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(255,255,255,.03);
  transform-style:preserve-3d;
  opacity:0;
  transform: rotateX(20deg) translateY(100px);
  animation: formEntrance 1.2s cubic-bezier(0.68,-0.55,0.27,1.55) forwards;
  position:relative; overflow:hidden;
}
.form-box::after{
  content:"";
  position:absolute; inset:-1px; pointer-events:none;
  background: radial-gradient(600px 220px at 50% -10%, var(--brand-soft), transparent 60%);
}
/* 3D hover for whole card */
.form-box:hover{
  transform: rotateX(5deg) rotateY(5deg);
  transition: transform .5s ease;
}

/* Entrance animation */
@keyframes formEntrance{
  0%{ opacity:0; transform: rotateX(20deg) translateY(100px); }
  50%{ opacity:1; }
  100%{ opacity:1; transform: rotateX(0deg) translateY(0); }
}

/* Headings / subtitle */
h2{
  font-family:'Cinzel',serif;
  letter-spacing:3px;
  margin:0 0 6px;
  font-weight:700;
  color:#00d4ff;
  text-align:center;
  text-shadow:0 0 10px rgba(0,212,255,0.5);
  animation: glow 2s infinite alternate;
  font-size:24px;
}
.subtitle{
  margin:0 0 22px; color:rgba(0,212,255,0.7);
  font-size:14px; text-align:center; letter-spacing:1px;
}
@keyframes glow{
  from{ text-shadow:0 0 5px rgba(0,212,255,0.5); }
  to{   text-shadow:0 0 15px rgba(0,212,255,0.8); }
}

/* Error banner */
.error-banner{
  background: rgba(255,77,79,.12);
  border:1px solid rgba(255,77,79,.35);
  color:#ffeaea;
  padding:10px 12px;
  border-radius:10px;
  margin:0 0 16px;
  font-size:13px;
}

/* =========================
   Inputs (matches login.php)
   Structure used:
   .input-group > input.input-field ~ label + .glow-line
   ========================= */
.input-group{
  position:relative;
  margin-bottom:25px;
  transform: translateZ(10px);
  opacity:0;
  animation: fadeInUp .5s forwards;
}
.input-group:nth-of-type(1){ animation-delay:.6s; }
.input-group:nth-of-type(2){ animation-delay:.8s; }

.input-field{
  width:100%;
  padding:12px 0;
  font-size:15px;
  color:#00d4ff;
  background:transparent;
  border:none;
  border-bottom:1px solid rgba(0,212,255,0.3);
  outline:none;
  transition:.3s;
  position:relative; z-index:2;
}
.input-field:focus{ border-bottom-color:transparent; }

/* animated underline */
.glow-line{
  position:absolute; bottom:0; left:0;
  width:0; height:2px; z-index:1;
  background: linear-gradient(90deg,
    transparent,
    rgba(0,212,255,0.5),
    #00d4ff,
    rgba(0,212,255,0.5),
    transparent);
  transition:.4s;
  background-size:200% 100%;
}
.input-field:focus ~ .glow-line{
  width:100%;
  box-shadow:0 0 10px rgba(0,212,255,0.7);
  animation: shimmer 2s infinite;
}
@keyframes shimmer{
  0%{ background-position:-100% 0; }
  100%{ background-position:200% 0; }
}

/* floating label */
.input-group label{
  position:absolute; top:12px; left:0;
  color:rgba(0,212,255,0.7);
  font-size:15px; pointer-events:none;
  transition:.4s cubic-bezier(0.68,-0.55,0.27,1.55);
  z-index:0;
}
.input-field:focus ~ label,
.input-field:valid ~ label{
  top:-12px; font-size:12px; color:#00d4ff;
  text-shadow:0 0 5px rgba(0,212,255,0.5);
  letter-spacing:1px;
}

/* Options row */
.remember-forgot{
  display:flex; justify-content:space-between; align-items:center;
  margin:8px 0 18px;
  font-size:13px; opacity:0;
  animation: fadeInUp .5s .95s forwards;
}
.remember{ display:flex; align-items:center; }
.remember input{ margin-right:5px; accent-color:#00d4ff; }
.remember label, .forgot{ color:rgba(0,212,255,0.8); font-size:13px; }
.forgot{ text-decoration:none; position:relative; transition:.3s; }
.forgot:hover{ color:#00d4ff; text-shadow:0 0 5px rgba(0,212,255,0.5); }
.forgot::after{
  content:""; position:absolute; left:0; bottom:-2px; height:1px; width:0;
  background:#00d4ff; transition:.3s;
}
.forgot:hover::after{ width:100%; box-shadow:0 0 5px rgba(0,212,255,0.7); }

/* Button */
.login-btn{
  width:100%;
  padding:12px 0;
  background:#000;
  border:1px solid #00d4ff;
  border-radius:25px;
  color:#00d4ff;
  font-size:15px; font-weight:700; letter-spacing:.6px;
  cursor:pointer;
  transition: all .5s;
  position:relative; overflow:hidden;
  transform: translateZ(20px);
  font-family:'Cinzel',serif;
  margin-bottom:10px;
  display:inline-grid; place-items:center;
  opacity:0; animation: fadeInUp .5s 1.15s forwards;
}
.login-btn span{ position:relative; z-index:1; transition:.3s; }
.btn-glow{
  position:absolute; inset:0;
  left:-100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(0,212,255,0.2),
    rgba(0,212,255,0.3),
    rgba(0,212,255,0.2),
    transparent);
  transition:.5s;
}
.login-btn:hover .btn-glow{ left:100%; }
.login-btn:hover{
  background: rgba(0,212,255,0.1);
  box-shadow: 0 0 20px rgba(0,212,255,0.5),
              inset 0 0 10px rgba(0,212,255,0.3);
  transform: translateZ(20px) scale(1.05);
}
.login-btn:hover span{ text-shadow:0 0 5px rgba(0,212,255,0.7); }
.login-btn:active{ transform: translateZ(20px) scale(.98); }

/* Signup link */
.signup-link{
  text-align:center; margin-top:14px; font-size:13px; color:rgba(0,212,255,0.7);
  opacity:0; animation: fadeInUp .5s 1.3s forwards;
}
.signup-link a{ color:#00d4ff; text-decoration:none; font-weight:500; position:relative; transition:.3s; }
.signup-link a:hover{ text-shadow:0 0 5px rgba(0,212,255,0.7); }
.signup-link a::after{
  content:""; position:absolute; left:0; bottom:-2px; width:0; height:1px;
  background:#00d4ff; transition:.3s;
}
.signup-link a:hover::after{ width:100%; box-shadow:0 0 5px rgba(0,212,255,0.7); }

/* Utility text (generic <p> in form) */
p{ color:rgba(0,212,255,0.7); text-align:center; margin-bottom:25px; font-size:14px; letter-spacing:1px; }

/* Fade-in up */
@keyframes fadeInUp{
  from{ opacity:0; transform: translateY(20px); }
  to{   opacity:1; transform: translateY(0); }
}

/* Responsive */
@media (max-width:420px){
  .form-box{ padding:28px 18px 20px; border-radius:20px; }
}
