/* Shared styles for DodoChat legal pages (terms, privacy). Self-contained:
   no dependency on the React app bundle. Dark is the default; html.light = light. */

:root {
  --accent:          #6C63FF;
  --bg-primary:      #0a0a10;
  --bg-card:         #14141c;
  --bg-secondary:    #1b1b26;
  --border-color:    rgba(255, 255, 255, 0.08);
  --text-primary:    #f0f0f5;
  --text-secondary:  #a3a3b2;
  --navbar-bg:       rgba(10, 10, 16, 0.7);
}

html.light {
  --bg-primary:      #f0f2f5;
  --bg-card:         #ffffff;
  --bg-secondary:    #f5f5fa;
  --border-color:    rgba(0, 0, 0, 0.1);
  --text-primary:    #1a1a2e;
  --text-secondary:  #5a5a6b;
  --navbar-bg:       rgba(255, 255, 255, 0.85);
}

* { box-sizing: border-box; }

html { background: var(--bg-primary); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ── */
.lp-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  background: var(--navbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}
.lp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.lp-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6C63FF, #00F5D4);
  box-shadow: 0 3px 8px rgba(108, 99, 255, 0.35);
  flex-shrink: 0;
  overflow: hidden;
}
.lp-logo-icon svg { width: 20px; height: 20px; fill: #fff; }
.lp-logo-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.lp-logo-text { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }

/* Theme toggle */
.lp-toggle {
  position: relative;
  width: 52px;
  height: 28px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: #3a3a4a;
  transition: background 0.3s;
  flex-shrink: 0;
}
html.light .lp-toggle { background: #6C63FF; }
.lp-toggle .lp-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
html.light .lp-toggle .lp-knob { transform: translateX(24px); }
.lp-toggle .lp-knob svg { width: 14px; height: 14px; }
.lp-toggle .lp-moon { display: block; color: #3a3a4a; }
.lp-toggle .lp-sun  { display: none;  color: #6C63FF; }
html.light .lp-toggle .lp-moon { display: none; }
html.light .lp-toggle .lp-sun  { display: block; }
.lp-toggle .lp-track-icon { position: absolute; top: 7px; width: 14px; height: 14px; color: rgba(255,255,255,0.85); }
.lp-toggle .lp-track-moon { left: 7px; }
.lp-toggle .lp-track-sun  { right: 7px; }

/* ── Legal page ── */
.legal-page { max-width: 800px; width: 100%; margin: 40px auto; padding: 0 20px 60px; }

.legal-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 48px;
}
.legal-card h1 { font-size: 32px; font-weight: 700; color: var(--text-primary); margin: 0 0 8px; }
.last-updated { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }

.toc {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}
.toc h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--accent); text-decoration: none; font-size: 14px; }
.toc a:hover { text-decoration: underline; }

.legal-card section { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--border-color); scroll-margin-top: 70px; }
.legal-card section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.legal-card h2 { font-size: 20px; font-weight: 600; color: var(--accent); margin: 0 0 16px; }
.legal-card h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 20px 0 10px; }
.legal-card p { color: var(--text-secondary); line-height: 1.8; margin: 0 0 12px; font-size: 15px; }
.legal-card ul, .legal-card ol { color: var(--text-secondary); line-height: 1.8; padding-left: 24px; margin: 0 0 16px; }
.legal-card li { margin-bottom: 8px; font-size: 15px; }
.legal-card a { color: var(--accent); text-decoration: none; }
.legal-card a:hover { text-decoration: underline; }
.legal-card strong { color: var(--text-primary); font-weight: 600; }

html { scroll-behavior: smooth; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
  padding: 32px 20px;
  margin-top: auto;
  text-align: center;
}
.footer-content { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer-logo { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 13px; color: var(--text-secondary); }

@media (max-width: 768px) {
  .legal-card { padding: 24px 20px; }
  .legal-card h1 { font-size: 24px; }
}
