/* accounts.css — Auth modal, winning numbers panel, match history, premium gate */

/* === HEADER NAV EXTENSIONS === */
.app-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-user {
  font-size: 0.82rem;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-user strong {
  color: var(--fg);
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
  text-decoration: none;
  line-height: 1;
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--fg-muted);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.3); color: var(--fg); }

.btn-accent {
  background: var(--accent);
  color: #000;
}
.btn-accent:hover { background: var(--accent-bright); }

.btn-premium {
  background: linear-gradient(135deg, #6e40c9, #4f8ef7);
  color: #fff;
  font-size: 0.8rem;
}
.btn-premium:hover { opacity: .88; }

/* Save badge on picks */
.pick-saved-badge {
  font-size: 0.68rem;
  color: #3fb950;
  padding: 2px 6px;
  background: rgba(63,185,80,0.12);
  border-radius: 4px;
  font-weight: 600;
  margin-left: auto;
}

/* === AUTH MODAL === */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 32px 28px;
  max-width: 400px;
  width: 100%;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
}

.modal-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--fg); }

.modal-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 3px;
}

.modal-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--fg-muted);
  transition: all 0.15s;
}

.modal-tab.active {
  background: var(--accent);
  color: #000;
}

.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-muted);
}

.form-input {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.95rem;
  padding: 11px 14px;
  transition: border-color 0.18s;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-input::placeholder { color: rgba(136,136,160,0.5); }

.form-submit {
  padding: 13px 20px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #000;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  width: 100%;
  margin-top: 4px;
}

.form-submit:hover { background: var(--accent-bright); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.form-error {
  font-size: 0.82rem;
  color: #e88;
  padding: 8px 12px;
  background: rgba(226,54,54,0.08);
  border-radius: 6px;
  border: 1px solid rgba(226,54,54,0.2);
  display: none;
}

.form-error.show { display: block; }

/* === WINNING NUMBERS PANEL === */
.winning-panel {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.panel-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.panel-refresh {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: var(--fg-muted);
  font-size: 0.78rem;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', system-ui, sans-serif;
}
.panel-refresh:hover { border-color: rgba(255,255,255,0.25); color: var(--fg); }

.winning-game {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.winning-game:last-child { border-bottom: none; }

.winning-game-name {
  font-size: 0.82rem;
  font-weight: 600;
  min-width: 130px;
  color: var(--fg);
}

.winning-balls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}

.wball {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.1);
}

.wball.w-special {
  background: rgba(212,168,67,0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.winning-date {
  font-size: 0.75rem;
  color: var(--fg-muted);
  margin-left: auto;
  flex-shrink: 0;
}

.winning-loading {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
  padding: 16px 0;
}

.synthetic-note {
  font-size: 0.72rem;
  color: rgba(136,136,160,0.45);
  font-style: italic;
}

/* === MATCH HISTORY PANEL === */
.history-panel {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.history-empty {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.85rem;
  padding: 24px 0;
}

.history-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item:last-child { border-bottom: none; }

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.history-game-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--fg-muted);
}

.history-date {
  font-size: 0.75rem;
  color: rgba(136,136,160,0.55);
}

.history-numbers {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  align-items: center;
}

.hball {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Matched ball highlight */
.hball.matched {
  background: rgba(63,185,80,0.18);
  border-color: #3fb950;
  color: #3fb950;
}

.hball.matched-special {
  background: rgba(212,168,67,0.2);
  border-color: var(--accent);
  color: var(--accent);
}

.history-match-desc {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.history-match-desc.notable {
  color: #3fb950;
  font-weight: 600;
}

.history-load-more {
  text-align: center;
  margin-top: 12px;
}

/* Stats row */
.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.stat-chip {
  background: var(--bg-elevated);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

.stat-chip .stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
}

.stat-chip .stat-label {
  font-size: 0.72rem;
  color: var(--fg-muted);
}

/* === PREMIUM GATE === */
.premium-gate {
  background: linear-gradient(135deg, rgba(110,64,201,0.1), rgba(79,142,247,0.1));
  border: 1px solid rgba(110,64,201,0.3);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.premium-gate-text {
  font-size: 0.85rem;
  color: var(--fg);
}

.premium-gate-text strong {
  display: block;
  margin-bottom: 2px;
}

.premium-gate-text span {
  color: var(--fg-muted);
  font-size: 0.8rem;
}

/* Notice bar */
.notice-bar {
  background: rgba(63,185,80,0.1);
  border: 1px solid rgba(63,185,80,0.25);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: #3fb950;
  margin-bottom: 16px;
  display: none;
}
.notice-bar.show { display: block; }

/* Login-to-save nudge (shown below generate button) */
.login-nudge {
  margin-top: 12px;
  font-size: 0.8rem;
  color: rgba(136,136,160,0.55);
  text-align: center;
}

.login-nudge a, .login-nudge button {
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
