:root {
  --bg: #f3f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #5f6b7a;
  --border: rgba(17, 24, 39, 0.1);
  --primary: #1da1f2;
  --primary-soft: rgba(29, 161, 242, 0.14);
  --shadow: 0 16px 40px rgba(20, 35, 60, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --card: #121923;
    --text: #e8edf4;
    --muted: #9aa7ba;
    --border: rgba(232, 237, 244, 0.14);
    --primary-soft: rgba(29, 161, 242, 0.2);
    --shadow: 0 20px 48px rgba(0, 0, 0, 0.42);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(60rem 35rem at 8% -10%, var(--primary-soft), transparent 72%),
    radial-gradient(52rem 28rem at 92% 0%, rgba(31, 191, 115, 0.1), transparent 72%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--primary);
}

.privacy-topbar {
  width: min(1160px, calc(100% - 2.2rem));
  margin: 1.3rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-link {
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  padding: 0.6rem 0.9rem;
  font-weight: 700;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.topbar-link:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 10px 24px rgba(29, 161, 242, 0.18);
}

.topbar-link.ghost {
  background: transparent;
}

.privacy-page {
  width: min(1160px, calc(100% - 2.2rem));
  margin: 1rem auto 2.2rem;
}

.privacy-footer {
  width: min(1160px, calc(100% - 2.2rem));
  margin: 0 auto 1.6rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  box-shadow: var(--shadow);
}

.privacy-footer p {
  margin: 0;
}

.privacy-footer p + p {
  margin-top: 0.25rem;
}

.privacy-hero {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--card) 80%, var(--primary-soft)), var(--card));
  padding: 1.3rem 1.3rem 1.2rem;
  box-shadow: var(--shadow);
}

.hero-tag {
  display: inline-block;
  margin: 0 0 0.35rem;
  padding: 0.32rem 0.6rem;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
}

.privacy-hero h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.55rem, 2vw + 0.9rem, 2.2rem);
  line-height: 1.2;
}

.hero-date {
  margin: 0;
  color: var(--muted);
}

.hero-summary {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
}

.privacy-layout {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 290px) minmax(0, 1fr);
}

.privacy-toc,
.privacy-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.privacy-toc {
  align-self: start;
  position: sticky;
  top: 1rem;
  padding: 1rem;
}

.privacy-toc h2 {
  margin: 0 0 0.85rem;
  font-size: 1.02rem;
}

.privacy-toc a {
  display: block;
  text-decoration: none;
  color: var(--muted);
  border-left: 2px solid transparent;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.privacy-toc a:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

.privacy-card {
  padding: 1.15rem 1.25rem;
}

.privacy-card section {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.privacy-card section:last-child {
  border-bottom: 0;
}

.privacy-card h2 {
  margin: 0.45rem 0 0.58rem;
  font-size: 1.18rem;
}

.privacy-card h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1rem;
}

.donation-box {
  margin-top: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--border));
  background: linear-gradient(160deg, var(--primary-soft), transparent 75%), var(--card);
  border-radius: 14px;
  padding: 0.85rem 0.9rem;
}

.donation-box h3 {
  margin-top: 0;
}

.donation-paypal {
  margin-bottom: 0.55rem;
}

.donation-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #ffffff;
  background: var(--primary);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0.5rem 0.78rem;
  font-weight: 700;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.donation-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 10px 20px rgba(29, 161, 242, 0.25);
}

.privacy-card p,
.privacy-card li {
  color: var(--muted);
  line-height: 1.66;
}

.privacy-feedback-card {
  margin-top: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
  background: linear-gradient(165deg, var(--primary-soft), transparent 75%), var(--card);
  border-radius: 14px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.privacy-feedback-stars {
  display: flex;
  gap: 8px;
}

.privacy-star-btn {
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, color 0.16s ease, text-shadow 0.16s ease;
}

.privacy-star-btn:hover {
  transform: translateY(-1px) scale(1.04);
}

.privacy-star-btn.active {
  color: var(--primary);
  text-shadow: 0 0 16px rgba(29, 161, 242, 0.35);
}

.privacy-feedback-text {
  width: 100%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--card) 86%, var(--primary-soft));
  color: var(--text);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  font: inherit;
  resize: vertical;
}

.privacy-feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.privacy-feedback-actions small {
  color: var(--muted);
}

.privacy-feedback-save {
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  padding: 0.52rem 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.privacy-feedback-save:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.privacy-card ul {
  margin: 0.32rem 0 0.65rem 1.3rem;
  padding: 0;
}

@media (max-width: 980px) {
  .privacy-layout {
    grid-template-columns: 1fr;
  }

  .privacy-toc {
    position: static;
  }
}

@media (max-width: 640px) {
  .privacy-topbar,
  .privacy-page,
  .privacy-footer {
    width: calc(100% - 1.1rem);
  }

  .privacy-hero,
  .privacy-card,
  .privacy-toc {
    border-radius: 14px;
  }

  .privacy-card {
    padding: 0.95rem 1rem;
  }
}
