/* Inspiré de Casino-Activity — écran de connexion & fond vivant */

body.auth-pending {
  overflow: hidden;
}

.living-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #03040a;
}

.living-halo {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: haloDrift 28s ease-in-out infinite alternate;
}

.living-halo-a {
  width: 48vw;
  height: 48vw;
  left: -10%;
  top: -15%;
  background: rgba(88, 101, 242, 0.18);
}

.living-halo-b {
  width: 40vw;
  height: 40vw;
  right: -8%;
  top: 20%;
  background: rgba(114, 137, 218, 0.14);
  animation-delay: -10s;
}

.living-halo-c {
  width: 36vw;
  height: 36vw;
  left: 30%;
  bottom: -18%;
  background: rgba(155, 89, 182, 0.1);
  animation-delay: -18s;
}

@keyframes haloDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(3%, 4%) scale(1.06); }
}

.living-lines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, transparent 40%, rgba(88, 101, 242, 0.04) 50%, transparent 60%),
    linear-gradient(0deg, transparent 48%, rgba(255, 255, 255, 0.02) 50%, transparent 52%);
  background-size: 200% 100%, 100% 80px;
  animation: linesSlide 40s linear infinite;
  opacity: 0.7;
}

@keyframes linesSlide {
  from { background-position: 0 0, 0 0; }
  to { background-position: 200% 0, 0 0; }
}

.living-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
  opacity: 0.35;
}

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(3, 4, 10, 0.88);
  backdrop-filter: blur(8px);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s;
}

.boot-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-overlay.is-leaving {
  opacity: 0;
}

.boot-aura {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.22), transparent 65%);
  filter: blur(12px);
  animation: auraBreath 3s ease-in-out infinite;
}

@keyframes auraBreath {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.neon-boot {
  position: relative;
  max-width: min(92vw, 400px);
  width: 100%;
}

.boot-inner {
  position: relative;
  padding: 2rem 1.75rem 1.85rem;
  border-radius: 16px;
  background: rgba(8, 10, 18, 0.96);
  text-align: center;
  border: 1px solid rgba(88, 101, 242, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.auth-logo {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 0 20px rgba(88, 101, 242, 0.45));
}

.boot-title {
  font-family: Orbitron, "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 1rem;
  margin: 0.75rem 0 1rem;
  color: #eef2ff;
}

.boot-status {
  color: #8b97b8;
  font-size: 0.92rem;
  margin: 0.5rem 0 0;
  min-height: 1.4em;
}

.auth-loader-visual {
  margin: 0.5rem auto 0.85rem;
  width: min(220px, 70vw);
}

.auth-loader-visual.hidden {
  display: none;
}

.auth-loader-orbit {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
}

.auth-loader-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  animation: authCorePulse 2s ease-in-out infinite;
}

@keyframes authCorePulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(88, 101, 242, 0.4)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.55)); }
}

.auth-loader-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5865f2;
  box-shadow: 0 0 14px rgba(88, 101, 242, 0.8);
  top: 50%;
  left: 50%;
  margin: -5px 0 0 -5px;
  animation: authOrbit 1.8s linear infinite;
}

.auth-loader-dot--b { animation-delay: -0.6s; background: #a855f7; box-shadow: 0 0 14px rgba(168, 85, 247, 0.7); }
.auth-loader-dot--c { animation-delay: -1.2s; background: #7289da; }

@keyframes authOrbit {
  from { transform: rotate(0deg) translateX(42px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(42px) rotate(-360deg); }
}

.auth-loader-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.auth-loader-fill {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #5865f2, #a855f7, transparent);
  animation: authLoaderSweep 1.35s ease-in-out infinite;
}

@keyframes authLoaderSweep {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.auth-login-actions {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #5865f2, #4752c4);
  box-shadow: 0 12px 32px rgba(88, 101, 242, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-discord:hover {
  box-shadow: 0 16px 40px rgba(88, 101, 242, 0.45);
  transform: translateY(-1px);
}

.btn-discord:active {
  transform: scale(0.98);
}

.auth-hint {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 0;
  line-height: 1.45;
}

.boot-error {
  margin-top: 1rem;
}

.boot-error p {
  color: #ed4245;
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
}

.app {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .living-halo,
  .living-lines,
  .boot-aura,
  .auth-loader-dot,
  .auth-loader-fill,
  .auth-loader-core {
    animation: none !important;
  }
}
