:root {
  --ink: #2a1a2e;
  --cream: #fff6ef;
  --rose: #ff6b8b;
  --rose-deep: #e2456a;
  --gold: #ffd28a;
  --glass: rgba(255, 255, 255, 0.16);
  --glass-strong: rgba(255, 255, 255, 0.28);
  --shadow: 0 20px 60px rgba(40, 15, 40, 0.35);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
  color: var(--cream);
  background: #1c1020 url("https://assets.friendortrend.dedyn.io/signbackground.png") center / cover no-repeat fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  transition: background-image 0.9s ease-in-out;
}

body.stage-login {
  background-image: url("https://assets.friendortrend.dedyn.io/signbackground2.png");
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 107, 139, 0.28), transparent 55%),
    linear-gradient(160deg, rgba(28, 16, 32, 0.72), rgba(28, 16, 32, 0.85));
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(92vw, 440px);
  padding: 24px;
  text-align: center;
}

.logo {
  width: 108px;
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
  animation: floaty 4s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Splash */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: fadeUp 0.9s ease both;
}

.splash h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, var(--gold), var(--rose));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3s ease infinite;
  background-size: 200% auto;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

.splash .sub {
  opacity: 0.82;
  font-size: 0.95rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Login card */
.card {
  background: var(--glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-strong);
  border-radius: 26px;
  padding: 34px 28px 30px;
  box-shadow: var(--shadow);
  animation: fadeUp 0.7s ease both;
}

.card h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.8rem;
  margin: 14px 0 6px;
}

.card p.lead {
  opacity: 0.85;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.btn {
  width: 100%;
  border: none;
  border-radius: 16px;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-google {
  background: #ffffff;
  color: #3c3c43;
  margin-bottom: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.btn-google:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
}

.btn-finb {
  background: linear-gradient(120deg, var(--rose), var(--rose-deep));
  color: #fff;
  box-shadow: 0 12px 30px rgba(226, 69, 106, 0.45);
}

.btn-finb:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn img,
.btn svg {
  width: 22px;
  height: 22px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  opacity: 0.6;
  font-size: 0.78rem;
  letter-spacing: 1px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}

.status {
  margin-top: 18px;
  min-height: 20px;
  font-size: 0.85rem;
  opacity: 0.9;
}

.hidden {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
