@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(145deg, #0f2b1a 0%, #1a4a2e 50%, #0a1f12 100%);
  font-family: 'DM Sans', sans-serif;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Decorative background blobs */
body::before {
  content: '';
  position: fixed;
  top: -200px;
  left: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(84,182,102,0.12) 0%, transparent 70%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  bottom: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,112,60,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Center buttons */
.center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.center button {
  padding: 13px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
}

#signup-btn {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.35) !important;
  color: #fff;
}

#signup-btn:hover {
  border-color: rgba(255,255,255,0.7) !important;
  background: rgba(255,255,255,0.08);
}

#login-btn {
  background: #54b666;
  color: #fff;
  box-shadow: 0 6px 20px rgba(84,182,102,0.4);
}

#login-btn:hover {
  background: #00703C;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(84,182,102,0.45);
}

/* ── POPUP ── */
.popup {
  position: fixed;
  top: -160%;
  left: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.05);
  width: 420px;
  max-width: 92vw;
  padding: 36px 32px 28px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(0,112,60,0.08);
  transition:
    top 0ms ease-in-out 200ms,
    opacity 220ms ease-in-out 0ms,
    transform 220ms ease-in-out 0ms;
  z-index: 200;
}

.popup.active {
  top: 50%;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition:
    top 0ms ease-in-out 0ms,
    opacity 220ms ease-in-out 0ms,
    transform 220ms ease-in-out 0ms;
}

/* Close button */
.popup .close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  background: #f0f0f0;
  color: #555;
  text-align: center;
  line-height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s, color 0.2s;
}

.popup .close-btn:hover {
  background: #e0e0e0;
  color: #111;
}

/* ── FORM ── */
.form {
  display: none;
}

.form.active {
  display: block;
}

.popup .form h2 {
  font-family: 'Playfair Display', serif;
  text-align: center;
  color: #111;
  font-size: 1.7rem;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.popup .form .form-element {
  margin-bottom: 16px;
}

.popup .form .form-element label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 6px;
}

.popup .form .form-element input[type="text"],
.popup .form .form-element input[type="password"] {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: #222;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafafa;
}

.popup .form .form-element input:focus {
  border-color: #54b666;
  box-shadow: 0 0 0 3px rgba(84,182,102,0.15);
  background: #fff;
}

.popup .form .form-element input.error {
  border-color: #e05555;
  box-shadow: 0 0 0 3px rgba(224,85,85,0.12);
}

.error-msg {
  color: #e05555;
  font-size: 11.5px;
  display: block;
  margin-top: 5px;
}

.popup .form .form-element button {
  width: 100%;
  height: 44px;
  border: none;
  outline: none;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  background: #00703C;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.3px;
}

.popup .form .form-element button:hover {
  background: #54b666;
  transform: translateY(-1px);
}

/* Switch links */
.popup .form .form-element a {
  color: #00703C;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.popup .form .form-element a:hover {
  color: #54b666;
  text-decoration: underline;
}

.form-element p {
  font-size: 0.87rem;
  text-align: center;
  margin-top: 8px;
  color: #666;
}

#show-login, #show-signup {
  display: none;
}

#show-login.active, #show-signup.active {
  display: block;
}