:root {
  --accent: #4bb8ef;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
}

* {
  box-sizing: border-box;
  font-family: "TikTok Sans", sans-serif;
}

body {
  margin: 0;
  height: 100vh;
  background: white;
  overflow: hidden;
}

.container {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* blobs */
.bg-blur {
  position: absolute;
  width: 420px;
  height: 420px;
  background: var(--accent);
  filter: blur(120px);
  opacity: 0.35;
  animation: spinFloat 0.8s ease-out forwards;
}

.blur-1 { top: -140px; left: -140px; }
.blur-2 { bottom: -160px; right: -160px; }

@keyframes spinFloat {
  to { transform: rotate(120deg) scale(0.9); opacity: 0; }
}

/* card */
.login-card {
  width: 380px;
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  opacity: 0;
  animation: cardEnter 0.45s cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: 0.8s;
}

@keyframes cardEnter {
  to { opacity: 1; transform: none; }
}

.title {
  margin-bottom: 30px;
  font-weight: 500;
}

/* fields */
.field {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 34px;
}

.field input {
  padding: 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(75,184,239,0.18);
}

/* button */
.submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #6fd1ff);
  color: white;
  border: none;
}

/* logo */
.logo {
  position: fixed;
  bottom: 24px;
  left: 28px;
  height: 42px;
}

/* overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.hidden { display: none; }

.popup {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 32px;
  width: 320px;
  text-align: center;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0,0,0,0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* avatar */
.popup-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* retry */
.retry-btn {
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #6fd1ff);
  color: white;
}
