:root {
  --auth-bg: #0c0c0c;
  --auth-text: #f2f2f2;
  --auth-muted: rgba(242, 242, 242, 0.45);
  --auth-line: rgba(255, 255, 255, 0.18);
  --auth-line-hot: rgba(255, 255, 255, 0.42);
  --auth-mono: "JetBrains Mono", Consolas, monospace;
  --dialogue-bubble: rgba(245, 245, 238, 0.97);
  --dialogue-ink: #111111;
  --dialogue-outline: rgba(12, 12, 12, 0.94);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.auth-login-body {
  min-height: 100vh;
  background: var(--auth-bg);
  color: var(--auth-text);
  font-family: var(--auth-mono);
  overflow-x: hidden;
}

button,
a,
code {
  font: inherit;
}

.auth-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0 12px 20px;
}

.ricky-login {
  width: min(1280px, 100%);
  display: grid;
  justify-items: center;
  gap: 7px;
}

.ricky-login-art {
  position: relative;
  width: min(1280px, 100%);
  user-select: none;
}

.ricky-login-art img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.ricky-dialogue-bubble {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  width: 31%;
  min-height: clamp(48px, 5.2vw, 68px);
  padding: clamp(7px, 1vw, 13px) clamp(9px, 1.25vw, 16px);
  border: 2px solid var(--dialogue-outline);
  border-radius: clamp(12px, 1.5vw, 20px);
  background: var(--dialogue-bubble);
  color: var(--dialogue-ink);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px) scale(0.98);
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 0s linear 140ms;
  pointer-events: none;
}

.ricky-dialogue-bubble[data-active="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.ricky-dialogue-bubble [data-dialogue-text] {
  display: block;
  width: 100%;
  overflow-wrap: break-word;
  font-size: clamp(8px, 1.22vw, 15px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.015em;
}

.ricky-dialogue-bubble[data-typing="true"] [data-dialogue-text]::after {
  content: "•";
  display: inline-block;
  margin-left: 0.2em;
  font-size: 0.8em;
  line-height: 1;
  vertical-align: 0.06em;
  animation: dialogue-caret 600ms steps(2, end) infinite;
}

.ricky-dialogue-bubble::before,
.ricky-dialogue-bubble::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
}

.ricky-dialogue-bubble--rick {
  top: 24%;
  left: 3.5%;
}

.ricky-dialogue-bubble--rick::before {
  right: -26px;
  bottom: 11px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 26px solid var(--dialogue-outline);
}

.ricky-dialogue-bubble--rick::after {
  right: -21px;
  bottom: 14px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 22px solid var(--dialogue-bubble);
}

.ricky-dialogue-bubble--morty {
  top: 46%;
  right: 3.5%;
}

.ricky-dialogue-bubble--morty::before {
  left: -26px;
  bottom: 11px;
  border-top: 13px solid transparent;
  border-right: 26px solid var(--dialogue-outline);
  border-bottom: 13px solid transparent;
}

.ricky-dialogue-bubble--morty::after {
  left: -21px;
  bottom: 14px;
  border-top: 10px solid transparent;
  border-right: 22px solid var(--dialogue-bubble);
  border-bottom: 10px solid transparent;
}

@keyframes dialogue-caret {
  50% {
    opacity: 0;
  }
}

.ricky-login-actions {
  width: 100%;
  display: grid;
  justify-items: center;
  min-height: 44px;
}

.ricky-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #f4f7ff;
  font-family: Arial, sans-serif;
  text-decoration: none;
  letter-spacing: 0.01em;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.ricky-login-button:hover,
.ricky-login-button:focus-visible {
  background: none;
  color: #ffffff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.ricky-login-button-icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.ricky-login-caption {
  margin-top: 11px;
  color: rgba(242, 242, 242, 0.56);
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
}

.auth-exchange-list {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  align-items: center;
  width: min(720px, 100%);
  margin: 16px 0 0;
  padding: 0;
  column-gap: clamp(4px, 1vw, 24px);
  list-style: none;
}

.auth-exchange-list li {
  display: grid;
  width: 100%;
  min-width: 0;
  height: 28px;
  place-items: center;
}

.auth-exchange-list img,
.auth-exchange-list svg {
  display: block;
  width: auto;
  height: auto;
  max-width: min(27px, 100%);
  max-height: 25px;
  object-fit: contain;
  filter: grayscale(1) brightness(1.75);
  opacity: 0.56;
  pointer-events: none;
  user-select: none;
}

.auth-exchange-list svg {
  fill: currentColor;
}

.auth-exchange-list .auth-exchange-logo {
  width: min(14px, 100%);
  height: auto;
}

.ricky-login-button[aria-disabled="true"] {
  opacity: 0.46;
  pointer-events: none;
}

.auth-status-line {
  min-height: 14px;
  color: var(--auth-muted);
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}

.auth-status-line[hidden] {
  display: none;
}

.auth-status-line[data-state="success"] {
  color: rgba(118, 222, 143, 0.9);
}

.auth-status-line[data-state="warning"] {
  color: rgba(255, 211, 118, 0.9);
}

.auth-status-line[data-state="error"],
.ricky-login-error {
  color: rgba(255, 116, 116, 0.9);
}

.auth-command-code,
.auth-dialogue-transcript {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ricky-login-error {
  display: grid;
  justify-items: center;
  gap: 5px;
  max-width: min(480px, 100%);
  padding: 10px 12px;
  border: 1px solid rgba(255, 116, 116, 0.28);
  background: rgba(12, 12, 12, 0.8);
  text-align: center;
  font-size: 10px;
  line-height: 1.35;
}

.ricky-login-error strong {
  color: rgba(255, 170, 170, 0.95);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 720px) {
  .auth-login-page {
    align-items: center;
    padding: 0 8px 14px;
  }

  .ricky-login {
    gap: 6px;
  }

  .ricky-dialogue-bubble {
    width: 38%;
    min-height: 48px;
    padding: 5px 7px;
    border-width: 1px;
  }

  .ricky-dialogue-bubble [data-dialogue-text] {
    font-size: clamp(7px, 2.15vw, 10px);
    line-height: 1.25;
  }

  .ricky-dialogue-bubble--rick {
    top: 15%;
    left: 1%;
  }

  .ricky-dialogue-bubble--morty {
    top: 43%;
    right: 1%;
  }

  .ricky-login-button {
    min-height: 44px;
    padding-inline: 8px;
    font-size: 13px;
  }

  .ricky-login-button-icon {
    width: 22px;
    height: 22px;
  }

  .ricky-login-caption {
    margin-top: 9px;
    font-size: 14px;
  }

  .auth-exchange-list {
    width: 100%;
    margin-top: 12px;
    column-gap: clamp(4px, 1vw, 8px);
  }

  .auth-status-line {
    max-width: 260px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ricky-dialogue-bubble {
    transition: none;
  }

  .ricky-dialogue-bubble[data-typing="true"] [data-dialogue-text]::after {
    animation: none;
  }
}
