/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #071026 80%);
  color: #f8fafc;
  overflow: hidden;
}

/* Container */
.container {
  width: 100%;
  max-width: 400px;
  padding: 1.5rem;
}

/* Form Box */
.form-box {
  background: rgba(15, 23, 42, 0.95);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.6);
  text-align: center;
  position: relative;
}

.form-box h1 {
  margin-bottom: 1.25rem;
  font-size: 2rem;
  font-weight: 700;
  color: #f8fafc;
  transform-origin: center;
  animation: headingPop 800ms cubic-bezier(.2,.9,.3,1) both;
}

@keyframes headingPop {
  0%   { opacity: 0; transform: translateY(14px) scale(.98); }
  60%  { opacity: 1; transform: translateY(-6px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
  0%   { transform: translateX(-30%); opacity: 0; }
  50%  { transform: translateX(0%); opacity: 1; }
  100% { transform: translateX(30%); opacity: 0; }
}

@keyframes inputPop {
  0%   { opacity: 0; transform: translateY(10px) scale(.995); }
  60%  { opacity: 1; transform: translateY(-4px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

#email,
#password {
  animation: inputPop 700ms cubic-bezier(.2,.9,.3,1) both;
  transform-origin: center;
}

#email { animation-delay: 150ms; }
#password { animation-delay: 300ms; }

#google-login {
  animation: inputPop 700ms cubic-bezier(.2,.9,.3,1) both;
  animation-delay: 450ms;
}

.form-box .btn {
  animation: inputPop 700ms cubic-bezier(.2,.9,.3,1) both;
  animation-delay: 600ms;
  transform-origin: center;
}

@media (prefers-reduced-motion: reduce) {
  .form-box h1,
  #email, #password, #google-login, .form-box .btn {
    animation: none !important;
  }
}

/* Input Group */
.input-group {
  margin-bottom: 1rem;
  text-align: left;
}

.input-group label {
  display: block;
  margin-bottom: 0.3rem;
  color: #94a3b8;
  font-size: 0.9rem;
}

.input-group input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1rem;
  transition: background 0.2s ease, outline 0.2s ease;
}

.input-group input::placeholder {
  color: #94a3b8;
}

.input-group input:focus {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn, .btn-google {
  width: 100%;
  padding: 0.75rem 1rem;
  margin-top: 0.8rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: transform 0.15s ease, background 0.2s ease;
}

/* Normal login/signup button */
.btn {
  background: linear-gradient(90deg, #4f46e5, #8b5cf6);
  color: #fff;
}

.btn:hover {
  background: linear-gradient(90deg, #5b46e6, #7b49f3);
  transform: translateY(-2px);
}

/* Google button */
.btn-google {
  background: #fff;
  color: #000;
  border: 1px solid #d1d5db;
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.btn-google:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* OR Divider */
.or-divider {
  margin: 1.2rem 0;
  text-align: center;
  position: relative;
}

.or-divider span {
  background: rgba(15, 23, 42, 0.95);
  padding: 0 0.6rem;
  color: #94a3b8;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.or-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 0;
}

/* Redirect Text */
.redirect-text {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.redirect-text a {
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
}

.redirect-text a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 450px) {
  .form-box {
    padding: 1.5rem;
  }

  .btn, .btn-google {
    padding: 0.65rem;
    font-size: 0.95rem;
  }
}
/* Escape Button */
.escape {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #f8fafc;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.escape:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.splash {
  position: absolute;
  top: -25px;
  right: -25px;
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.15rem;
  transform: rotate(13deg);
  box-shadow: 0 8px 20px rgba(2,6,23,0.45);
  cursor: pointer;
  pointer-events: auto; 
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .splash { transition: none; transform: none; }
}