:root {
  --fx-bg: #06050c;
  --fx-bg-elevated: #0c0a17;
  --fx-card: #111022;
  --fx-glass: rgba(17, 14, 34, 0.82);
  --fx-text: #f8f7ff;
  --fx-muted: #9992b5;
  --fx-accent: #a86cff;
  --fx-accent-soft: rgba(168, 108, 255, 0.18);
  --fx-accent-secondary: #4ad8ff;
  --fx-accent-glow: rgba(108, 126, 255, 0.46);
  --fx-border: rgba(183, 151, 255, 0.18);
  --fx-border-strong: rgba(93, 181, 255, 0.46);
  --fx-accent-contrast: #080713;
  --primary: #a86cff;
  --primary-glow: rgba(108, 126, 255, 0.46);
  --bg-dark: #06050c;
  --bg-sidebar: #0c0a17;
  --text-muted: #9992b5;
  --fx-canvas-top: #0a0713;
  --fx-canvas-mid: #090714;
  --fx-canvas-bottom: #05040b;
  --fx-particle-a: rgba(168, 108, 255, 0.16);
  --fx-particle-b: rgba(74, 216, 255, 0.11);
}

html, body { min-height: 100%; }
body {
  background: #06050c;
  overflow-x: hidden;
}

#gradient-canvas {
  opacity: 1 !important;
  visibility: visible !important;
  background:
    radial-gradient(ellipse 85% 65% at 10% 8%, rgba(168,108,255,.20), transparent 56%),
    radial-gradient(ellipse 75% 65% at 90% 92%, rgba(74,216,255,.15), transparent 58%),
    radial-gradient(ellipse 70% 60% at 50% 52%, rgba(21,17,46,.78), transparent 68%),
    linear-gradient(180deg,#080611 0%,#04040a 100%) !important;
}

.dm-login-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  isolation: isolate;
}

.dm-login-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 44%, #000 0 34%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 44%, #000 0 34%, transparent 72%);
}

.dm-login-wrap {
  width: min(100%, 460px);
  position: relative;
}

.dm-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px 4px;
  color: var(--fx-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 10px;
  font-weight: 900;
  transition: color .2s ease, transform .2s ease;
}
.dm-back-link:hover { color: #4ad8ff; transform: translateX(-2px); }

.dm-auth-particle-wrap { position: relative; }
.dm-auth-particles {
  pointer-events: none;
  position: absolute;
  inset: -28px;
  border-radius: 40px;
  opacity: .52;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.10) 0 1px, transparent 2px),
    radial-gradient(circle at 88% 30%, rgba(74,216,255,.24) 0 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,.08) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 70%, rgba(168,108,255,.22) 0 1px, transparent 2px);
  background-size: 120% 120%;
  animation: dmParticles 30s linear infinite;
}
@keyframes dmParticles { to { transform: translate(-4%,-3%); } }

.dm-auth-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
  padding: clamp(38px,8vw,58px) clamp(22px,6vw,40px) 32px;
  text-align: center;
  border-radius: 30px;
  border: 1px solid var(--fx-border);
  background: linear-gradient(165deg, rgba(24,19,48,.90), rgba(12,10,27,.96));
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 30px 90px rgba(0,0,0,.62), 0 0 70px rgba(116,105,255,.15);
}
.dm-auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, rgba(255,255,255,.08), transparent 21%, transparent 76%, rgba(74,216,255,.06)),
    radial-gradient(420px circle at 50% -10%, rgba(168,108,255,.24), transparent 60%);
}
.dm-auth-card::after {
  content: "";
  position: absolute;
  height: 2px;
  top: 0;
  left: 13%;
  right: 13%;
  background: linear-gradient(90deg, transparent, #a86cff, #4ad8ff, transparent);
  box-shadow: 0 0 20px rgba(103,158,255,.65);
}
.dm-auth-content { position: relative; z-index: 1; }

.dm-logo {
  display: block;
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 22px;
  border: 1px solid rgba(148,126,255,.42);
  box-shadow: 0 0 0 7px rgba(255,255,255,.025), 0 0 38px rgba(116,105,255,.35);
}
.dm-eyebrow {
  color: #a86cff;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: 10px;
  font-weight: 950;
}
.dm-title {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: clamp(30px,8vw,40px);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 950;
}
.dm-caret {
  width: 3px;
  height: .92em;
  margin-left: 7px;
  border-radius: 2px;
  background: linear-gradient(180deg,#a86cff,#4ad8ff);
  box-shadow: 0 0 13px #4ad8ff;
  animation: dmBlink 1s step-end infinite;
}
@keyframes dmBlink { 50% { opacity: 0; } }
.dm-subtitle {
  max-width: 340px;
  margin: 16px auto 30px;
  color: var(--fx-muted);
  font-size: 14px;
  line-height: 1.68;
}

.dm-auth-alert {
  margin: -12px 0 22px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 110, 130, .35);
  border-radius: 12px;
  color: #ffd9df;
  background: rgba(134, 25, 45, .22);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.dm-discord-btn {
  width: 100%;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  color: #080713;
  background: linear-gradient(135deg,#a86cff,#4ad8ff);
  box-shadow: 0 16px 42px rgba(76,118,255,.24), 0 0 30px rgba(168,108,255,.18);
  text-transform: uppercase;
  letter-spacing: .075em;
  font-size: 12px;
  font-weight: 950;
  transition: transform .22s var(--fx-motion-ease), filter .22s ease, box-shadow .22s ease;
}
.dm-discord-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.08);
  box-shadow: 0 20px 50px rgba(76,118,255,.34), 0 0 38px rgba(168,108,255,.26);
}
.dm-discord-btn:active { transform: scale(.985); }
.dm-discord-btn:focus-visible { outline: 2px solid #4ad8ff; outline-offset: 4px; }

.dm-oauth-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  color: #665f80;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 9px;
  font-weight: 850;
}
.dm-oauth-line::before,.dm-oauth-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.10));
}
.dm-oauth-line::after { transform: scaleX(-1); }

.dm-benefits {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin-top: 24px;
}
.dm-benefit {
  padding: 10px 7px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 11px;
  color: var(--fx-muted);
  background: rgba(255,255,255,.025);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
}
.dm-benefit i {
  width: 5px;
  height: 5px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: #4ad8ff;
  box-shadow: 0 0 9px #4ad8ff;
  vertical-align: 1px;
}
.dm-legal {
  margin: 25px 0 0;
  color: #665f80;
  font-size: 10.5px;
  line-height: 1.65;
}
.dm-legal a { color: var(--fx-muted); border-bottom: 1px solid rgba(255,255,255,.14); }
.dm-legal a:hover { color: #4ad8ff; border-color: #4ad8ff; }
.dm-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  color: #78718f;
  font-size: 10px;
}
.dm-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34,197,94,.72);
}

@media (max-width: 480px) {
  .dm-login-shell { padding: 16px; }
  .dm-auth-card { border-radius: 22px; }
  .dm-benefits { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .dm-auth-particles,.dm-caret { animation: none !important; }
}
