/* =========================================================
   All Currency Converter Offline — Privacy Policy stylesheet
   Smart Glassmorphism 2.0, matching the in-app brand palette:
     Primary Purple  #7F56D9
     Deep Purple     #17102B
     Dark Surface    #21163D
     Yellow (accent) #FFD43B
     Soft Lavender   #C9B8FF
     Secondary Text  #AFA5C4
     Success         #35D39A
     Error           #FF6B7A
   ========================================================= */

:root {
  --primary-purple: #7f56d9;
  --deep-purple: #17102b;
  --dark-surface: #21163d;
  --accent-yellow: #ffd43b;
  --soft-lavender: #c9b8ff;
  --secondary-text: #afa5c4;
  --success: #35d39a;
  --error: #ff6b7a;

  --bg-top: var(--deep-purple);
  --bg-middle: var(--dark-surface);
  --bg-bottom: var(--deep-purple);

  --text-primary: #ffffff;
  --text-secondary: var(--secondary-text);

  --glass-surface: rgba(20, 10, 51, 0.45);
  --glass-surface-strong: rgba(42, 27, 84, 0.75);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-sheen-start: rgba(255, 255, 255, 0.16);
  --glass-sheen-end: rgba(255, 255, 255, 0.03);

  --shadow-purple: rgba(127, 86, 217, 0.35);
  --shadow-yellow: rgba(255, 212, 59, 0.35);

  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;

  color-scheme: dark;
}

/* Light theme — mirrors AppColors.Light from the Android app */
@media (prefers-color-scheme: light) {
  :root {
    --bg-top: #f3eeff;
    --bg-middle: #ede5ff;
    --bg-bottom: #f6f2ff;

    --text-primary: #1f1533;
    --text-secondary: #6b5f8a;

    --glass-surface: rgba(255, 255, 255, 0.6);
    --glass-surface-strong: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(127, 86, 217, 0.2);
    --glass-sheen-start: rgba(255, 255, 255, 0.5);
    --glass-sheen-end: rgba(255, 255, 255, 0.08);

    --shadow-purple: rgba(127, 86, 217, 0.18);
    --shadow-yellow: rgba(255, 212, 59, 0.28);

    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Poppins", "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  background: radial-gradient(circle at 15% -10%, rgba(255, 212, 59, 0.16), transparent 45%),
    radial-gradient(circle at 90% 0%, rgba(127, 86, 217, 0.35), transparent 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-middle) 45%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 20px 96px;
}

/* ---------- Header ---------- */

.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--glass-sheen-start), var(--glass-sheen-end)), var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 40px -12px var(--shadow-purple), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  margin-bottom: 28px;
}

.hero__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 20px -6px var(--shadow-yellow);
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.hero__titles h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.hero__titles h1 span {
  color: var(--accent-yellow);
}

.hero__titles p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ---------- Title block ---------- */

.doc-title {
  text-align: center;
  margin: 8px 0 32px;
}

.doc-title h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 8px;
  font-weight: 800;
}

.doc-title .accent {
  color: var(--accent-yellow);
}

.doc-title .updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: 999px;
}

.doc-title .updated .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

/* ---------- Table of contents ---------- */

.toc {
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--glass-sheen-start), var(--glass-sheen-end)), var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 14px 30px -14px var(--shadow-purple);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 20px 22px;
  margin-bottom: 32px;
}

.toc h3 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
  columns: 2;
  column-gap: 24px;
}

.toc li {
  margin-bottom: 8px;
}

.toc a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.92rem;
}

.toc a:hover {
  color: var(--accent-yellow);
  text-decoration: underline;
}

/* ---------- Glass cards / sections ---------- */

.card {
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--glass-sheen-start), var(--glass-sheen-end)), var(--glass-surface);
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 38px -16px var(--shadow-purple), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 26px 26px 28px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  scroll-margin-top: 24px;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(127, 86, 217, 0.22);
  border: 1px solid var(--glass-border);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
}

.card h3 .num {
  color: var(--accent-yellow);
  margin-right: 8px;
}

.card p {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.card ul {
  margin: 0 0 4px;
  padding-left: 1.3em;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.card li {
  margin-bottom: 8px;
}

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

.card a {
  color: var(--soft-lavender);
  text-decoration: underline;
  word-break: break-word;
}

/* Inline badges (used for AdMob / Analytics disclosures) */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 212, 59, 0.14);
  border: 1px solid rgba(255, 212, 59, 0.4);
  color: var(--accent-yellow);
  margin-bottom: 10px;
}

.badge--purple {
  background: rgba(127, 86, 217, 0.18);
  border-color: rgba(127, 86, 217, 0.5);
  color: var(--soft-lavender);
}

/* Simple data table for the "data we collect" section */

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(127, 86, 217, 0.2);
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

tbody td {
  padding: 10px 14px;
  color: var(--text-secondary);
  border-top: 1px solid var(--glass-border);
}

tbody tr:hover td {
  color: var(--text-primary);
}

/* ---------- Footer ---------- */

.footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.footer a {
  color: var(--soft-lavender);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.back-to-top {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #ffe788, var(--accent-yellow));
  color: var(--deep-purple);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 24px -8px var(--shadow-yellow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 560px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  .toc ol {
    columns: 1;
  }

  .card {
    padding: 20px;
  }
}
