/* Auth header + login overlay — loaded by index.html / mobile.html */

body.has-game-header {
  padding-top: 48px;
  box-sizing: border-box;
}

html.game-mobile-layout body.has-game-header {
  padding-top: 44px;
}

#game-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: rgba(10, 12, 16, 0.92);
  border-bottom: 1px solid rgba(255, 234, 49, 0.25);
  font-family: "Super Pandora", system-ui, sans-serif;
  backdrop-filter: blur(8px);
}

.game-header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: #fff;
}

#header-brand-tagline {
  color: #fffdf5;
  font-family: system-ui, "Segoe UI", sans-serif;
  -webkit-text-stroke: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 10px rgba(255, 180, 50, 0.25);
  letter-spacing: 0.02em;
}

.demo-badge {
  padding: 0.22rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: system-ui, "Segoe UI", sans-serif;
  background: #c2410c;
  color: #fff;
  border: 1px solid #fb923c;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.demo-badge.hidden,
.header-btn.hidden,
#account-menu-wrap.hidden {
  display: none;
}

.game-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-btn {
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.header-btn-login {
  background: #ffea31;
  color: #000;
}

.header-btn-account {
  background: #2d3340;
  color: #fff;
  border: 1px solid #444;
}

.header-btn-account:hover {
  background: #3a4250;
}

.header-btn-mute {
  background: #2d3340;
  color: #fff;
  border: 1px solid #444;
  min-width: 2.5rem;
  padding: 0.45rem 0.65rem;
  font-size: 1rem;
  line-height: 1;
}

.header-btn-mute:hover {
  background: #3a4250;
}

#account-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: #1a1d24;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

#account-menu.hidden {
  display: none;
}

#account-menu .account-email {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: #aaa;
  border-bottom: 1px solid #333;
  margin-bottom: 0.25rem;
  word-break: break-all;
}

#account-menu .account-balance {
  padding: 0.35rem 1rem;
  font-size: 0.85rem;
  color: #ffea31;
  font-weight: 600;
}

#account-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.55rem 1rem;
  border: none;
  background: none;
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
}

#account-menu button:hover {
  background: #2d3340;
}

#account-menu .logout-btn {
  color: #f87171;
}

#account-menu-wrap {
  position: relative;
}

#account-notifications-panel {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100002;
  font-family: "Super Pandora", system-ui, sans-serif;
}

.profile-box {
  background: #1a1d24;
  color: #fff;
  padding: 1.5rem;
  border-radius: 12px;
  max-width: 420px;
  width: 90%;
}

.profile-box h3 {
  margin: 0 0 1rem;
  color: #ffea31;
}

.profile-box label {
  display: block;
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 0.35rem;
}

.profile-box input[type="tel"],
.profile-box input[type="text"] {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 0.75rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #2d3340;
  color: #fff;
  box-sizing: border-box;
}

.profile-box .profile-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem;
  font-size: 0.85rem;
  color: #ddd;
}

.profile-box .profile-check input {
  margin-top: 0.15rem;
}

.profile-box .profile-msg {
  font-size: 0.85rem;
  min-height: 1.2em;
  margin-bottom: 0.75rem;
}

.profile-box .profile-msg.error {
  color: #f87171;
}

.profile-box .profile-msg.ok {
  color: #86efac;
}

.profile-box .profile-actions {
  display: flex;
  gap: 0.5rem;
}

.profile-box .profile-actions button {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.profile-box .profile-save {
  background: #ffea31;
  color: #000;
}

.profile-box .profile-cancel {
  background: #2d3340;
  color: #fff;
  border: 1px solid #444;
}

#auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
  font-family: "Super Pandora", system-ui, sans-serif;
}

.auth-box {
  background: #1a1d24;
  color: #fff;
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
}

.auth-site-title {
  margin: 0 0 1rem;
  text-align: center;
  color: #fffdf5;
  font-family: system-ui, "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.auth-box h2 {
  margin: 0 0 1rem;
  text-align: center;
  color: #ffea31;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.auth-tabs button {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: #2d3340;
  color: #aaa;
  border-radius: 6px;
  cursor: pointer;
}

.auth-tabs button.active {
  background: #ffea31;
  color: #000;
}

.auth-box input {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 0.75rem;
  border: 1px solid #444;
  border-radius: 6px;
  background: #2d3340;
  color: #fff;
  box-sizing: border-box;
}

.auth-box button[type="submit"] {
  width: 100%;
  padding: 0.65rem;
  background: #ffea31;
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

.auth-error {
  color: #f87171;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  min-height: 1.2em;
}

.auth-hint {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  margin: 1rem 0 0;
}

.auth-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  html.game-mobile-layout #game-header {
    height: 44px;
    padding: 0 0.65rem;
  }

  html.game-mobile-layout .game-header-brand {
    font-size: 0.9rem;
  }

  html.game-mobile-layout .demo-badge {
    font-size: 0.62rem;
    padding: 0.15rem 0.45rem;
  }

  html.game-mobile-layout .header-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
  }

  html.game-mobile-layout .header-btn-mute {
    min-width: 2.1rem;
  }
}
