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

body {
  font-family: Arial, sans-serif;
  background: #060b1a;
  color: white;
  height: 100vh;
  overflow: hidden;
}

/* ── Canvas stele — fundal ───────────────────────────────────── */
#star-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Login box ───────────────────────────────────────────────── */
#login-screen {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#login-box {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 48px 40px;
  min-width: 320px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

#login-logo {
  font-size: 48px;
  line-height: 1;
}

#login-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: white;
}

#login-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

/* ── Form ────────────────────────────────────────────────────── */
#login-form, #register-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
}

#login-form input, #register-form input {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: white;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
#login-form input::placeholder, #register-form input::placeholder { color: rgba(255,255,255,0.3); }
#login-form input:focus, #register-form input:focus { border-color: rgba(255,255,255,0.3); }

#register-btn {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: #2e7d32;
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#register-btn:hover:not(:disabled) { background: #388e3c; }
#register-btn:disabled { opacity: 0.7; cursor: default; }

#auth-toggle { margin-top: 14px; text-align: center; }
#auth-toggle a {
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
#auth-toggle a:hover { color: rgba(255,255,255,0.85); text-decoration: underline; }

#login-btn {
  width: 100%;
  height: 48px;
  padding: 0 22px;
  border: none;
  border-radius: 12px;
  background: #1565c0;
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
#login-btn:hover:not(:disabled) { background: #1976d2; }
#login-btn:disabled { opacity: 0.7; cursor: default; }

/* ── Spinner ─────────────────────────────────────────────────── */
.login-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Error text ──────────────────────────────────────────────── */
#login-error {
  font-size: 13px;
  color: #ff6b6b;
  min-height: 18px;
  text-align: center;
}

/* ── IG tag ──────────────────────────────────────────────────── */
#ig-tag {
  position: fixed;
  bottom: 14px;
  left: 18px;
  z-index: 10;
  opacity: 0.4;
  font-size: 12px;
  color: white;
}
#ig-tag a { color: white; text-decoration: none; font-weight: bold; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 480px) {
  #login-box { min-width: 0; width: calc(100vw - 32px); padding: 32px 20px; }
  #login-form { flex-direction: column; }
  #login-btn { width: 100%; justify-content: center; }
}