/* WeAD auth — logo, sign-in, user row, profile, login modal */

.wead-brand-logo {
  display: block;
  height: 52px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.wead-logo-btn {
  padding: 6px 10px !important;
  cursor: pointer;
  background: rgba(8, 8, 16, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wead-logo-btn:hover {
  border-color: rgba(255, 140, 0, 0.55) !important;
  box-shadow: 0 0 18px rgba(255, 140, 0, 0.15);
}

/* No outer glass box on header auth area */
.header-right.wead-auth-stack {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  min-width: 0 !important;
  text-align: right;
}

.wead-auth-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.wead-logged-in-block {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 210px;
  max-width: 280px;
}

.wead-user-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
}

.wead-pill-icon {
  height: 30px;
  width: auto;
  flex-shrink: 0;
}

.wead-user-name {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f3f4f6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.wead-logout-btn {
  min-height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffb4a8;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.35);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.wead-logout-btn:hover {
  background: rgba(220, 38, 38, 0.28);
  color: #fff;
}

.wead-profile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 0, 0.5);
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.2), rgba(255, 80, 0, 0.08));
  color: #ffc285;
  font-family: var(--font-primary, 'Roboto', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.wead-profile-btn:hover {
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.35), rgba(255, 80, 0, 0.15));
  border-color: rgba(255, 160, 50, 0.85);
  color: #fff;
}

.wead-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 0, 0.45);
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.18), rgba(255, 80, 0, 0.08));
  color: #fff;
  font-family: var(--font-primary, 'Roboto', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.wead-signin-btn:hover {
  background: linear-gradient(135deg, rgba(255, 140, 0, 0.32), rgba(255, 80, 0, 0.16));
  border-color: rgba(255, 160, 50, 0.75);
  transform: translateY(-1px);
}

.wead-signin-btn .wead-pill-icon {
  height: 28px;
  width: auto;
}

/* Login modal */
.wead-login-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.wead-login-modal-content {
  position: relative;
  width: min(92vw, 400px);
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 140, 0, 0.25);
  background: linear-gradient(165deg, rgba(18, 12, 28, 0.98), rgba(8, 8, 16, 0.98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 120, 0, 0.08);
  text-align: center;
}

.wead-login-hero-logo {
  display: block;
  height: 88px;
  width: auto;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.wead-login-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display, 'Anton', sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.wead-login-hint {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  line-height: 1.45;
  margin: 0 0 1.35rem;
}

.wead-login-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.wead-login-close:hover {
  color: #fff;
}

.wead-sso-primary-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #111;
  cursor: pointer;
  background: linear-gradient(135deg, #ff8c00, #ff5500);
  box-shadow: 0 4px 18px rgba(255, 100, 0, 0.35);
  transition: transform 0.15s, box-shadow 0.2s;
}

.wead-sso-primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(255, 100, 0, 0.45);
}

.wead-sso-notice {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10001;
  max-width: 280px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: rgba(30, 10, 20, 0.95);
  border: 1px solid rgba(255, 107, 107, 0.6);
  color: #ffb4b4;
  font-size: 0.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Multiplayer header */
.mp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.mp-header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.wead-brand-logo-sm {
  height: 44px;
  width: auto;
}

.mp-auth-panel {
  flex-shrink: 0;
}

.wead-register-link {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.wead-register-link:hover {
  color: #ff8c00;
}

@media (max-width: 640px) {
  .wead-brand-logo { height: 40px; max-width: 110px; }
  .wead-logged-in-block { min-width: 170px; max-width: 220px; }
  .wead-user-name { max-width: 80px; font-size: 0.75rem; }
  .wead-signin-btn span { display: none; }
  .wead-signin-btn { padding: 0.4rem 0.55rem; }
}

.wead-host-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.1));
  color: #c4b5fd;
  font-family: var(--font-primary, 'Roboto', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.wead-host-btn:hover {
  border-color: rgba(139, 92, 246, 0.75);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(139, 92, 246, 0.18));
  color: #e9d5ff;
}

@media (max-width: 768px) {
  .header-right.wead-auth-stack { display: flex !important; width: 100%; align-items: center; justify-content: center; }
  .wead-auth-stack { align-items: center; }
  .wead-logged-in-block { min-width: 0; max-width: 100%; width: 100%; }
}

/* PC: balance logo vs auth columns so the center title is truly centered */
@media (min-width: 769px) {
  .header-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    max-width: 100%;
    width: 100%;
    padding-left: var(--spacing-lg, 24px);
    padding-right: var(--spacing-lg, 24px);
    box-sizing: border-box;
  }

  .header-content > .wead-logo-btn {
    grid-column: 1;
    justify-self: start;
    margin-left: 15%;
  }

  .header-center {
    grid-column: 2;
    flex: none !important;
    width: auto;
    max-width: min(720px, 92vw);
    justify-self: center;
  }

  .header-right.wead-auth-stack {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    margin-right: 10%;
  }
}
