/**
 * Page connexion — GMod4Life
 */

:root {
  --auth-bg: #08090e;
  --auth-ink: #f4f1ea;
  --auth-muted: #a8b0c0;
  --auth-line: rgba(244, 241, 234, 0.12);
  --auth-heat: #e84855;
  --auth-heat2: #ff7a59;
  --auth-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --auth-body: 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

.auth-body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--auth-body);
  color: var(--auth-ink);
  background: var(--auth-bg);
  overflow-x: hidden;
}

.lucide-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.auth-bg__img {
  position: absolute;
  inset: 0;
  background: url('../img/background.png') center / cover no-repeat;
  transform: scale(1.06);
  filter: saturate(1.05);
}
.auth-bg__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(8, 9, 14, 0.92) 0%, rgba(8, 9, 14, 0.75) 42%, rgba(8, 9, 14, 0.55) 100%),
    radial-gradient(ellipse 50% 60% at 20% 40%, rgba(232, 72, 85, 0.2), transparent 60%);
}
.auth-bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  gap: 24px;
  align-items: stretch;
}

/* Left */
.auth-aside {
  display: flex;
  flex-direction: column;
  padding: 28px 32px;
  border-radius: 24px;
  border: 1px solid var(--auth-line);
  background: rgba(8, 9, 14, 0.45);
  backdrop-filter: blur(18px);
  animation: authRise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-family: var(--auth-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  margin-bottom: auto;
}
.auth-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
}
.auth-brand__life { color: var(--auth-heat2); }

.auth-aside__copy {
  margin: 48px 0 36px;
  max-width: 28ch;
}
.auth-aside__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--auth-heat2);
  margin-bottom: 14px;
}
.auth-aside__copy h1 {
  font-family: var(--auth-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  margin: 0 0 16px;
  color: #fff;
}
.auth-aside__copy > p {
  color: var(--auth-muted);
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 32ch;
}

.auth-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}
.auth-perks li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, 0.03);
}
.auth-perks__ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(232, 72, 85, 0.12);
  color: var(--auth-heat2);
  flex-shrink: 0;
}
.auth-perks strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}
.auth-perks small {
  color: var(--auth-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.auth-aside__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--auth-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-aside__back:hover { color: #fff; }

/* Right */
.auth-main {
  display: grid;
  place-items: center;
  padding: 12px 0;
  animation: authRise 0.7s 0.08s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-card {
  width: min(100%, 420px);
  padding: 36px 32px 28px;
  border-radius: 24px;
  border: 1px solid var(--auth-line);
  background: rgba(12, 14, 22, 0.88);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px);
}

.auth-card__head {
  text-align: center;
  margin-bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.auth-card__logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 0 16px;
  filter: drop-shadow(0 12px 28px rgba(232, 72, 85, 0.25));
}
.auth-card__kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-heat2);
  margin-bottom: 8px;
}
.auth-card__head h2 {
  font-family: var(--auth-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0 0 8px;
  color: #fff;
}
.auth-card__head p {
  color: var(--auth-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-flash {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 600;
}
.auth-flash small {
  display: block;
  margin-top: 6px;
  font-weight: 500;
  opacity: 0.85;
}
.auth-flash--error {
  background: rgba(232, 72, 85, 0.12);
  border: 1px solid rgba(232, 72, 85, 0.35);
  color: #fecaca;
}
.auth-flash--success,
.auth-flash--info {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  border: 1px solid transparent;
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s;
}
.auth-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.auth-btn:active { transform: scale(0.99); }
.auth-btn__ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
.auth-btn__txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.auth-btn__txt strong {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.auth-btn__txt small {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.8;
}
.auth-btn__arrow {
  opacity: 0.55;
  transition: transform 0.15s, opacity 0.15s;
}
.auth-btn:hover .auth-btn__arrow {
  opacity: 1;
  transform: translateX(3px);
}

.auth-btn--steam {
  background: linear-gradient(135deg, #1b2838, #2a475e);
  border-color: rgba(102, 192, 244, 0.25);
  box-shadow: 0 10px 28px rgba(27, 40, 56, 0.45);
}
.auth-btn--discord {
  background: linear-gradient(135deg, #5865f2, #4752c4);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(88, 101, 242, 0.3);
}

.auth-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--auth-line);
  font-size: 0.8rem;
  color: var(--auth-muted);
  line-height: 1.45;
}
.auth-note .lucide-icon {
  margin-top: 2px;
  color: var(--auth-heat2);
}
.auth-note strong { color: #e2e8f0; }

.auth-mobile-back {
  display: none;
  margin-top: 20px;
  text-align: center;
}
.auth-mobile-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--auth-muted);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
}
.auth-mobile-back a:hover { color: #fff; }

@keyframes authRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 0;
  }
  .auth-aside {
    display: none;
  }
  .auth-main {
    min-height: calc(100vh - 32px);
    min-height: calc(100dvh - 32px);
  }
  .auth-mobile-back { display: block; }
  .auth-card {
    padding: 28px 22px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-aside,
  .auth-main { animation: none; }
}
