/* Shared styling for the Privacy Policy and Terms of Service pages.
   Uses the same CSS variables theme.js injects, so light/dark mode just works. */
:root {
  --bg-body: #f4f5f7;
  --text-main: #111827;
  --text-muted: #4b5563;
  --text-light: #6b7280;
  --border-color: #e5e7eb;
  --card-bg: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }

/* --- Header (same glass style as the main pages) --- */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-body) 30%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
}

.legal-header-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Light / dark mode toggle (same as the main pages). */
.ui-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: color-mix(in srgb, var(--card-bg) 30%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--border-color) 75%, transparent);
  border-radius: 9999px;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  cursor: pointer;
  transition: background-color 0.2s;
}
.ui-mode-btn:hover { background-color: color-mix(in srgb, var(--btn-bg-light) 40%, transparent); }
.ui-mode-btn svg { width: 18px; height: 18px; }
.ui-mode-btn .icon-sun { display: none; }
html[data-ui-mode="dark"] .ui-mode-btn .icon-sun { display: block; }
html[data-ui-mode="dark"] .ui-mode-btn .icon-moon { display: none; }

.logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background-image: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.logo-icon svg { width: 17px; height: 17px; }

.logo-text {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.back-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, var(--border-color) 75%, transparent);
  border-radius: 9999px;
  background: color-mix(in srgb, var(--card-bg) 30%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.back-link:hover { color: var(--text-main); border-color: var(--text-light); }

/* --- Content --- */
.legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 24px;
}

.legal-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 36px 40px;
}

.legal-card h1 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.legal-updated {
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.legal-card p { font-size: 0.9375rem; color: var(--text-muted); margin-bottom: 14px; }
.legal-card p strong { color: var(--text-main); font-weight: 600; }

.legal-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 28px 0 10px;
  padding-top: 4px;
}

.legal-card ul, .legal-card ol {
  margin: 0 0 14px;
  padding-left: 22px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.legal-card li { margin-bottom: 6px; }
.legal-card li::marker { color: #d62976; }

.legal-card a { color: #d62976; font-weight: 500; }
.legal-card a:hover { text-decoration: underline; }

.legal-note {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-left: 3px solid #d62976;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card-bg) 60%, #d62976 6%);
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* --- Footer --- */
.legal-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 20px 40px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
}
.legal-footer a { color: var(--text-muted); transition: color 0.2s; }
.legal-footer a:hover { color: #d62976; }

@media (max-width: 600px) {
  .legal-header-inner { padding: 12px 16px; }
  .legal-wrap { padding: 20px 12px 16px; }
  .legal-card { padding: 24px 20px; }
  .legal-card h1 { font-size: 1.5rem; }
}
