/* auth.css — New auth UI only. Zero changes to existing main.css/panels.css/gauge.css/globe-effects-v3.css */

/* ── Gaming mode header link ── */
.gaming-mode-link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .38rem .72rem;
  border: 1px solid rgba(0,229,255,.2);
  background: rgba(0,229,255,.05);
  border-radius: 999px;
  font-size: .68rem; font-weight: 700; letter-spacing: .03em;
  color: #00e5ff;
  text-decoration: none;
  transition: background .18s, border-color .18s;
  white-space: nowrap;
}
.gaming-mode-link:hover { background: rgba(0,229,255,.1); border-color: rgba(0,229,255,.4); }
@media (max-width: 560px) { .gaming-mode-link span { display: none; } }

/* ── Header auth buttons ── */
.auth-header-btns {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.auth-header-signin {
  padding: .4rem .9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-2);
  font-size: .72rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .18s, color .18s;
}
.auth-header-signin:hover { border-color: rgba(232,93,4,.42); color: var(--orange); }
.auth-header-register {
  padding: .4rem .9rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(232,93,4,.28);
  transition: filter .18s;
}
.auth-header-register:hover { filter: brightness(1.08); }

/* ── User avatar menu ── */
.auth-user-menu { position: relative; }
.user-avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--orange);
  background: var(--orange-soft);
  color: var(--orange);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.user-dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: .5rem 0;
  z-index: 50;
  animation: dropIn .18s ease;
}
@keyframes dropIn { from { opacity:0; transform: translateY(-6px); } to { opacity:1; transform: none; } }
.user-dropdown-name {
  padding: .55rem 1rem .35rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-strong);
  border-bottom: 1px solid var(--border);
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-dropdown-link {
  display: block;
  padding: .45rem 1rem;
  font-size: .72rem;
  color: var(--text);
  text-decoration: none;
  transition: background .15s;
}
.user-dropdown-link:hover { background: var(--bg-alt); }
.user-dropdown-logout { color: var(--danger); }

/* ── History login gate ── */
.history-login-gate {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-bottom: .5rem;
}
.login-gate-inner { max-width: 400px; margin: 0 auto; }
.login-gate-icon { font-size: 2rem; display: block; margin-bottom: .75rem; }
.login-gate-inner strong { display: block; font-size: 1.05rem; color: var(--text-strong); margin-bottom: .5rem; }
.login-gate-inner p { color: var(--muted); font-size: .82rem; margin-bottom: 1.25rem; line-height: 1.55; }
.login-gate-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.login-gate-btn {
  padding: .55rem 1.4rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
  transition: filter .18s, box-shadow .18s;
  display: inline-block;
}
.login-gate-btn.primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  box-shadow: 0 3px 12px rgba(232,93,4,.3);
}
.login-gate-btn.primary:hover { filter: brightness(1.08); }
.login-gate-btn.secondary {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}
.login-gate-btn.secondary:hover { border-color: rgba(232,93,4,.42); }

/* ── Auth page shared layout (login.php, register.php, forgot.php) ── */
.auth-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% 6rem, rgba(232,93,4,.08), transparent 24rem),
    var(--bg);
}
.auth-page-header {
  position: sticky; top: 0; z-index: 40;
  height: 64px;
  display: flex; align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  gap: 1rem;
  justify-content: space-between;
}
.auth-page-header .brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text-strong); font-size: .82rem; font-weight: 700; letter-spacing: .025em; }
.auth-page-header .brand img { width: 32px; height: 32px; }
.auth-page-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem 3rem; }
.auth-card {
  width: min(430px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  box-shadow: var(--shadow);
}
.auth-card-logo { display: flex; justify-content: center; margin-bottom: 1.4rem; }
.auth-card-logo img { width: 48px; height: 48px; }
.auth-card h1 { font-size: 1.45rem; font-weight: 700; color: var(--text-strong); margin-bottom: .3rem; text-align: center; }
.auth-card-sub { text-align: center; color: var(--muted); font-size: .82rem; margin-bottom: 1.6rem; }

/* Form fields */
.auth-field { margin-bottom: 1.1rem; position: relative; }
.auth-label { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; letter-spacing: .02em; }
.auth-input {
  width: 100%;
  padding: .72rem .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input-bg);
  color: var(--text);
  font-size: .88rem;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.auth-input:focus { border-color: rgba(232,93,4,.5); box-shadow: 0 0 0 3px rgba(232,93,4,.1); }
.auth-input.has-error { border-color: var(--danger); }
.auth-input-icon-right {
  padding-right: 2.6rem;
}
.auth-eye-btn {
  position: absolute;
  right: .75rem; bottom: .7rem;
  background: none; border: none;
  color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1;
  padding: 0;
  transition: color .15s;
}
.auth-eye-btn:hover { color: var(--text); }

/* Strength bar */
.strength-bars { display: flex; gap: 4px; margin-top: .45rem; }
.strength-bar { flex: 1; height: 3px; border-radius: 99px; background: var(--border); transition: background .25s; }
.strength-bar.weak   { background: var(--danger); }
.strength-bar.fair   { background: var(--ping); }
.strength-bar.strong { background: var(--success); }
.strength-label { font-size: .65rem; color: var(--muted); margin-top: .28rem; display: block; }

/* Alerts */
.auth-alert {
  padding: .7rem .9rem;
  border-radius: 10px;
  font-size: .78rem;
  margin-bottom: 1rem;
  display: flex; align-items: flex-start; gap: .5rem;
  line-height: 1.45;
}
.auth-alert.error   { background: rgba(217,59,59,.08); border: 1px solid rgba(217,59,59,.25); color: var(--danger); }
.auth-alert.success { background: rgba(27,154,90,.08);  border: 1px solid rgba(27,154,90,.25);  color: var(--success); }
html[data-theme="dark"] .auth-alert.error   { color: #ff9797; }
html[data-theme="dark"] .auth-alert.success { color: #76dfaa; }

/* Submit button */
.auth-submit {
  width: 100%;
  padding: .8rem 1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(232,93,4,.32);
  transition: filter .18s, transform .15s;
  margin-top: .3rem;
}
.auth-submit:hover { filter: brightness(1.07); transform: translateY(-1px); }
.auth-submit:active { transform: none; }

/* Divider */
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.1rem 0; color: var(--muted); font-size: .72rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Google button */
.auth-google-btn {
  width: 100%;
  padding: .72rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .65rem;
  transition: border-color .18s, background .18s;
}
.auth-google-btn:hover { border-color: rgba(232,93,4,.35); background: var(--bg-alt); }
.auth-google-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* Footer links */
.auth-links-row { display: flex; justify-content: center; gap: .4rem; flex-wrap: wrap; margin-top: 1.3rem; font-size: .78rem; color: var(--muted); }
.auth-link { color: var(--orange); font-weight: 600; text-decoration: none; }
.auth-link:hover { text-decoration: underline; }
.auth-forgot-row { display: flex; justify-content: flex-end; margin-top: -.6rem; margin-bottom: .8rem; }
.auth-forgot-link { font-size: .72rem; color: var(--muted); text-decoration: none; }
.auth-forgot-link:hover { color: var(--orange); }

/* Terms checkbox */
.auth-terms-row { display: flex; gap: .6rem; align-items: flex-start; margin: .8rem 0 1rem; font-size: .75rem; color: var(--muted); line-height: 1.5; }
.auth-terms-row input { margin-top: .2rem; accent-color: var(--orange); cursor: pointer; flex-shrink: 0; }
.auth-terms-row a { color: var(--orange); }

/* Auth page footer */
.auth-page-footer { text-align: center; padding: 1rem; font-size: .7rem; color: var(--muted); border-top: 1px solid var(--border); }
.auth-page-footer a { color: var(--orange); text-decoration: none; }

/* Dashboard */
.dashboard-page { padding: 2rem 1rem; max-width: 900px; margin: 0 auto; }
.dashboard-welcome { margin-bottom: 2rem; }
.dashboard-welcome h1 { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--text-strong); margin-bottom: .25rem; }
.dashboard-welcome p { color: var(--muted); font-size: .88rem; }
.dashboard-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.25rem; }
.stat-card small { display: block; color: var(--muted-2); font-size: .6rem; font-weight: 700; letter-spacing: .1em; margin-bottom: .35rem; }
.stat-card strong { font-size: 1.55rem; font-weight: 300; color: var(--text-strong); }

@media (max-width: 480px) {
  .auth-card { padding: 1.6rem 1.1rem; }
  .auth-page-main { padding: 1.5rem .75rem 2.5rem; }
  .auth-header-btns .auth-header-register { display: none; }
}
