/* =========================================================================
   sopslop login · cinematic full-bleed entry screen
   ------------------------------------------------------------------------- */

.login-body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: var(--font-sans);
  color: var(--text);
  background: #04040a;
}

.login-body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.65) 100%);
}

/* ---------- Background ------------------------------------------------- */

.login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.login-bg-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140vmax;
  height: 140vmax;
  margin: -70vmax 0 0 -70vmax;
  background: conic-gradient(from 0deg,
    rgba(124, 92, 255, 0.18),
    rgba(34, 211, 238, 0.08),
    rgba(244, 114, 182, 0.16),
    rgba(124, 92, 255, 0.18));
  filter: blur(120px);
  animation: halo-spin 60s linear infinite;
  opacity: 0.85;
}
@keyframes halo-spin {
  to { transform: rotate(360deg); }
}

.login-bg .bg-blob {
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.65;
  mix-blend-mode: screen;
}
.login-bg .bg-blob-1 { background: radial-gradient(circle, #7c5cff, transparent 60%); top: -25%; left: -10%; animation: blob-drift-a 22s ease-in-out infinite alternate; }
.login-bg .bg-blob-2 { background: radial-gradient(circle, #22d3ee, transparent 60%); top: 10%;  right: -20%; animation: blob-drift-b 26s ease-in-out infinite alternate; }
.login-bg .bg-blob-3 { background: radial-gradient(circle, #f472b6, transparent 60%); bottom: -25%; left: 30%;  animation: blob-drift-c 30s ease-in-out infinite alternate; }

@keyframes blob-drift-a { to { transform: translate(8vw, 6vh) scale(1.1); } }
@keyframes blob-drift-b { to { transform: translate(-6vw, 8vh) scale(0.95); } }
@keyframes blob-drift-c { to { transform: translate(4vw, -6vh) scale(1.08); } }

.login-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

.login-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0 1px,
    transparent 1px 4px
  );
  mix-blend-mode: overlay;
  opacity: 0.4;
  z-index: 2;
}

.login-bg .bg-grain {
  z-index: 3;
}

/* ---------- Stage / brand --------------------------------------------- */

.login-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 48px 24px 64px;
  position: relative;
  z-index: 5;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: translateY(8px);
  animation: brand-in 1.2s cubic-bezier(.22,1,.36,1) 0.1s forwards;
  filter: blur(8px);
}

.login-mark {
  display: inline-flex;
  filter: drop-shadow(0 12px 36px rgba(124, 92, 255, 0.55));
  animation: mark-breath 6s ease-in-out infinite;
}
@keyframes mark-breath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

.login-wordmark {
  font-family: var(--font-display);
  font-size: clamp(64px, 11vw, 132px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0;
  text-shadow: 0 6px 80px rgba(124, 92, 255, 0.45);
}
.login-wordmark .grad-text {
  background: linear-gradient(120deg, #c4b5fd, #67e8f9 45%, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 200%;
  animation: grad-pan 9s ease-in-out infinite;
}

.login-tagline {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b6b8cc;
  margin: 0;
  height: 1.4em;
  text-shadow: 0 0 18px rgba(124, 92, 255, 0.3);
}
.tagline-caret {
  display: inline-block;
  margin-left: 2px;
  color: var(--accent-2);
  animation: caret-blink 1s steps(2) infinite;
}
@keyframes caret-blink {
  to { opacity: 0; }
}

@keyframes brand-in {
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* ---------- Card ------------------------------------------------------- */

.login-card {
  width: min(440px, 92vw);
  padding: 28px 30px 24px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 26, 0.62);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 80px -10px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(124, 92, 255, 0.18),
    0 0 60px rgba(124, 92, 255, 0.18);
  position: relative;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  animation: card-in 1s cubic-bezier(.22,1,.36,1) 0.55s forwards;
}
.login-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.6), rgba(34, 211, 238, 0.5), rgba(244, 114, 182, 0.55));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
}
.login-card.is-error {
  animation: card-in 1s cubic-bezier(.22,1,.36,1) 0.55s forwards, card-rumble 0.45s ease 1.6s 1;
}
@keyframes card-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes card-rumble {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-4px, 0, 0); }
  40% { transform: translate3d(5px, 0, 0); }
  60% { transform: translate3d(-3px, 0, 0); }
  80% { transform: translate3d(2px, 0, 0); }
}

.login-card-title {
  margin: 4px 0 6px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.022em;
}

.login-card-sub {
  margin: 0 0 22px;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}
.login-card-sub code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ---------- Banner ----------------------------------------------------- */

.login-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  margin: 0 0 18px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.login-banner strong { font-weight: 600; }
.login-banner code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
}
.login-banner-error {
  background: rgba(248, 113, 113, 0.10);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
}
.login-banner-info {
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.30);
  color: #a5f3fc;
}

/* ---------- Google button --------------------------------------------- */

.google-btn {
  display: block;
  position: relative;
  width: 100%;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.18s ease;
}
.google-btn:hover { transform: translateY(-1px); }
.google-btn:active { transform: translateY(0); }

.google-btn-glow {
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(120deg, #7c5cff, #22d3ee, #f472b6);
  filter: blur(14px);
  opacity: 0.45;
  transition: opacity 0.2s ease;
  z-index: -1;
}
.google-btn:hover .google-btn-glow { opacity: 0.85; }

.google-btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 245, 250, 0.92));
  color: #1a1d2c;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 8px 30px -8px rgba(0,0,0,0.4);
}
.google-btn:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 4px;
}

/* ---------- Card meta -------------------------------------------------- */

.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--text-mute);
  font-size: 12px;
}

.sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.sound-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sound-toggle-track {
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.sound-toggle-knob {
  position: absolute;
  top: 1px;
  left: 1px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #cbd5f5, #8b8fb0);
  transition: transform 0.2s cubic-bezier(.22,1,.36,1), background 0.2s ease;
}
.sound-toggle input:checked + .sound-toggle-track {
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.6), rgba(34, 211, 238, 0.5));
  border-color: rgba(124, 92, 255, 0.55);
}
.sound-toggle input:checked + .sound-toggle-track .sound-toggle-knob {
  transform: translateX(12px);
  background: linear-gradient(180deg, #ffffff, #c4b5fd);
}
.sound-toggle-label { color: var(--text-soft); font-weight: 500; }

.login-shortcut kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
}

.login-footer {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  z-index: 5;
}
.login-footer-sep { margin: 0 8px; opacity: 0.5; }

@media (max-width: 480px) {
  .login-card { padding: 22px; }
  .login-meta { flex-direction: column; align-items: flex-start; }
  .login-shortcut { display: none; }
  .login-footer { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg-halo, .bg-blob, .login-mark, .login-wordmark .grad-text { animation: none !important; }
  .login-brand, .login-card { animation-duration: 0.001s !important; opacity: 1; transform: none; filter: none; }
}
