/* Firebase Account Manager + Privacy Policy — page-specific styles.
   Design tokens, reset, header/footer, buttons and toast/HUD styling
   are already provided by the shared /styles.css loaded before this file. */

.page-main {
  min-height: 60vh;
  padding: 56px 0 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Security banner ---------- */

.security-banner {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0;
}

.security-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.security-banner svg {
  color: var(--accent);
  flex-shrink: 0;
}

.security-banner a {
  color: var(--accent);
  font-weight: 600;
}

/* ---------- Card ---------- */

.card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-soft);
}

.card-header {
  text-align: center;
  margin-bottom: 22px;
}

.card-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 10px 0 6px;
}

.card-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- Badges / notices ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--overlay-soft);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: badge-pulse 2s infinite;
}

.trust-badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--overlay-soft);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.trust-badge svg {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-badge a {
  color: var(--accent);
  font-weight: 600;
}

.warning-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.warning-box p:first-child {
  font-weight: 700;
  color: var(--rarity-legendary);
  margin-bottom: 4px;
}

.highlight-box {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
  background: var(--overlay-soft);
  font-size: 0.94rem;
  color: var(--text-secondary);
}

/* ---------- Alerts ---------- */

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.alert svg {
  flex-shrink: 0;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* ---------- Version selector ---------- */

.version-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.version-btn {
  flex: 1;
  padding: 9px 0;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.version-btn:hover {
  color: var(--text-secondary);
}

.version-btn.active {
  background: var(--accent-gradient);
  color: #fff;
}

/* ---------- Forms ---------- */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.card form {
  margin-top: 4px;
}

.card form .btn {
  width: 100%;
  margin-top: 6px;
}

/* ---------- Extra button variants ---------- */

.btn-secondary {
  background: var(--overlay-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--overlay-soft-hover);
  border-color: var(--border-color-hover);
  transform: translateY(-2px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.55);
  transform: translateY(-2px);
}

/* ---------- Info card (account settings) ---------- */

.info-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--bg-secondary);
}

.info-row + .info-row {
  border-top: 1px solid var(--border-color);
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--overlay-soft);
  color: var(--accent);
  flex-shrink: 0;
}

.info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.info-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-text strong {
  font-size: 0.9rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Official channel links ---------- */

.links-section {
  width: 100%;
  max-width: 720px;
  margin-top: 40px;
  text-align: center;
}

.links-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  text-align: left;
  transition: transform 0.2s var(--ease), border-color 0.2s ease, background 0.2s ease;
}

.link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.5);
  background: var(--bg-card-hover);
}

.link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  flex-shrink: 0;
}

.link-card strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
}

.link-card span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ---------- Logout confirm modal ---------- */

.is-hidden {
  display: none !important;
}

.spaced-top {
  margin-top: 14px;
}

.spaced-top-lg {
  margin-top: 32px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.is-open {
  display: flex;
  opacity: 1;
}

.modal {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-color-hover);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  box-shadow: var(--shadow-soft);
}

.modal h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.modal-actions .btn {
  flex: 1;
}

/* ---------- Privacy policy article ---------- */

.content {
  width: 100%;
  max-width: 760px;
}

.content h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 28px;
}

.content h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 34px 0 12px;
}

.content p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.content ul {
  margin: 0 0 16px;
  padding-left: 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content ul li {
  position: relative;
  padding-left: 22px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.content strong {
  color: var(--text-primary);
}

.content code {
  font-family: "Fira Code", monospace;
  font-size: 0.85em;
  background: var(--overlay-soft);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
}

.content a {
  color: var(--accent);
  font-weight: 600;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.contact-card svg {
  color: var(--accent);
}

.contact-card strong {
  font-size: 0.88rem;
}

.contact-card span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .card {
    padding: 26px 20px;
  }

  .version-selector {
    flex-direction: column;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}
