/* signin.css — shared styling for the sign-in chooser modal.
   Used by signin.js across all games (snake, cosmic-drift, block-stacker). */

.gs-signin-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001; /* one above engagement.css overlay (10000) */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 25, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 16px;
  animation: gs-signin-fade 0.2s ease-out;
}

@keyframes gs-signin-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.gs-signin-modal {
  background: #111a33;
  color: #e6ecff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 24px 22px 22px 22px;
  max-width: 380px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  /* Beveled corners to match site theme. */
  clip-path: polygon(
    14px 0, calc(100% - 14px) 0, 100% 14px,
    100% calc(100% - 14px), calc(100% - 14px) 100%,
    14px 100%, 0 calc(100% - 14px), 0 14px
  );
}

.gs-signin-title {
  margin: 0 0 6px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.gs-signin-sub {
  margin: 0 0 16px 0;
  font-size: 0.9rem;
  color: rgba(230, 236, 255, 0.7);
  text-align: center;
  line-height: 1.4;
}

.gs-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  margin: 0 0 10px 0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
  font-family: inherit;
}

.gs-signin-btn:hover { transform: translateY(-1px); }
.gs-signin-btn:active { transform: translateY(0); }
.gs-signin-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Google — neutral white per Google's branding guidelines. */
.gs-signin-btn--google {
  background: #fff;
  color: #1f1f1f;
  border-color: #dadce0;
}
.gs-signin-btn--google:hover { background: #f8f9fa; }

/* Apple — black bg / white text per Apple HIG. */
.gs-signin-btn--apple {
  background: #000;
  color: #fff;
}
.gs-signin-btn--apple:hover { background: #1a1a1a; }

/* Manual entry — site accent. */
.gs-signin-btn--manual {
  background: rgba(78, 163, 255, 0.12);
  color: #e6ecff;
  border-color: rgba(78, 163, 255, 0.4);
}
.gs-signin-btn--manual:hover { background: rgba(78, 163, 255, 0.2); }

.gs-signin-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.gs-signin-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px 0;
  color: rgba(230, 236, 255, 0.4);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.gs-signin-divider::before,
.gs-signin-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

/* Manual-entry form (revealed when Manual button is clicked, or on auth failure). */
.gs-signin-manual-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.gs-signin-manual-form[hidden] { display: none !important; }
.gs-signin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gs-signin-field label {
  font-size: 0.8rem;
  color: rgba(230, 236, 255, 0.7);
}
.gs-signin-field input[type="text"],
.gs-signin-field input[type="email"],
.gs-signin-field input[type="tel"] {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  padding: 9px 10px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
}
.gs-signin-optional {
  color: rgba(230, 236, 255, 0.45);
  font-weight: normal;
  font-size: 0.75rem;
}
.gs-signin-field input:focus {
  outline: none;
  border-color: #4ea3ff;
  box-shadow: 0 0 0 2px rgba(78, 163, 255, 0.25);
}
.gs-signin-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(230, 236, 255, 0.75);
  line-height: 1.35;
}
.gs-signin-consent input { margin-top: 2px; flex-shrink: 0; }
.gs-signin-error {
  color: #ff8a8a;
  font-size: 0.85rem;
  margin: 0;
  min-height: 1.1em;
}
.gs-signin-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.gs-signin-actions .gs-signin-btn { margin: 0; }

.gs-signin-skip {
  display: block;
  margin: 12px auto 0 auto;
  background: none;
  border: none;
  color: rgba(230, 236, 255, 0.55);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 8px;
  font-family: inherit;
}
.gs-signin-skip:hover { color: rgba(230, 236, 255, 0.85); }

/* Mobile tweaks */
@media (max-width: 480px) {
  .gs-signin-modal { padding: 20px 16px; }
  .gs-signin-title { font-size: 1.1rem; }
}
