/* Base styles used across the app without needing Tailwind builds. */

html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  color: var(--bpa-text-primary);
  background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.08), transparent 35%),
    radial-gradient(circle at 80% 10%, rgba(56, 189, 248, 0.08), transparent 35%),
    linear-gradient(135deg, var(--bpa-bg-primary) 0%, var(--bpa-bg-secondary) 50%, var(--bpa-bg-primary) 100%);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Standard readable base size */
  font-size: 1.0625rem; /* 17px on mobile for better readability */
  line-height: 1.6; /* Optimal for reading */
}
@media (min-width: 768px) {
  body {
    font-size: 1rem; /* 16px on desktop */
    line-height: 1.6;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Merriweather", Georgia, serif;
  color: var(--bpa-text-primary);
  line-height: 1.3;
  margin-top: 0;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.875rem;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0.625rem;
}

h5,
h6 {
  font-family: "Merriweather", Georgia, serif;
  font-weight: 600;
  line-height: 1.4;
}

p {
  margin-bottom: 1.1em;
  line-height: 1.6;
}

/* Long‑form content (guides, policies, puzzles) */
.bpa-prose,
.prose,
.text-content,
.article {
  max-width: 70ch;
  margin: 0 auto;
  line-height: 1.65;
}

/* Allow prose to work within containers without double padding */
.bpa-container .prose {
  padding: 0;
}

.prose.max-w-none {
  max-width: none;
}

.bpa-prose h1,
.prose h1,
.text-content h1,
.article h1 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 1rem;
}

.bpa-prose h2,
.prose h2,
.text-content h2,
.article h2 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
}

.bpa-prose h3,
.prose h3,
.text-content h3,
.article h3 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.bpa-prose h4,
.prose h4,
.text-content h4,
.article h4 {
  font-family: "Merriweather", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.4;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
}

.bpa-prose p,
.prose p,
.text-content p,
.article p {
  margin-bottom: 1.1em;
  line-height: 1.65;
}

.bpa-prose ul,
.bpa-prose ol,
.prose ul,
.prose ol,
.text-content ul,
.text-content ol,
.article ul,
.article ol {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  line-height: 1.65;
}

.bpa-prose li,
.prose li,
.text-content li,
.article li {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.65;
}

.bpa-prose strong,
.prose strong,
.text-content strong,
.article strong {
  font-weight: 600;
  color: var(--bpa-text-primary);
}

.bpa-prose em,
.prose em,
.text-content em,
.article em {
  font-style: italic;
}

/* Global text size scale: small / medium / large
   Applies on top of Tailwind text utilities using higher specificity and !important. */

/* Minimum text size: 12px (0.75rem) for all UI text */
* {
  font-size: inherit;
}

/* Global line-height improvements for better readability */
.text-xs {
  font-size: 0.875rem !important; /* 14px minimum - was 12px */
  line-height: 1.6;
}

.text-sm {
  font-size: 0.9375rem !important; /* 15px */
  line-height: 1.7;
}

.text-base {
  font-size: 1rem !important; /* 16px */
  line-height: 1.75;
}

.text-lg {
  font-size: 1.125rem !important; /* 18px */
  line-height: 1.75;
}

/* Merriweather for all headings and title-like elements */
h1, h2, h3, h4, h5, h6,
.bpa-card h2, .bpa-card h3, .bpa-card h4,
.bpa-prose h1, .bpa-prose h2, .bpa-prose h3, .bpa-prose h4,
.prose h1, .prose h2, .prose h3, .prose h4,
.text-content h1, .text-content h2, .text-content h3, .text-content h4,
.article h1, .article h2, .article h3, .article h4 {
  font-family: "Merriweather", Georgia, serif !important;
}

/* Apply Merriweather to title-like elements (headings in cards, sections) */
[class*="text-2xl"][class*="font-bold"],
[class*="text-3xl"][class*="font-bold"],
[class*="text-4xl"][class*="font-bold"],
[class*="text-5xl"][class*="font-bold"],
[class*="text-6xl"][class*="font-bold"],
[class*="text-xl"][class*="font-bold"],
[class*="text-lg"][class*="font-bold"] {
  font-family: "Merriweather", Georgia, serif !important;
}

/* Scale the base font size for everything (content that doesn't use Tailwind text utilities). */
.bpa-page--font-small { 
  font-size: 0.95rem; 
  line-height: 1.8;
}
.bpa-page--font-medium { 
  font-size: 1.05rem; 
  line-height: 1.75;
}
.bpa-page--font-large { 
  font-size: 1.15rem; 
  line-height: 1.7;
}

/* Ensure minimum 12px (0.75rem) for all text, even at smallest size */
.bpa-page--font-small [class*="text-\[0\.625rem\]"],
.bpa-page--font-small [class*="text-\[0\.6875rem\]"] {
  font-size: 0.75rem !important; /* Minimum 12px */
}

/* Then gently adjust Tailwind-style utility classes on top. */
.bpa-page.bpa-page--font-small .text-xs { font-size: 1.0rem !important; line-height: 1.7 !important; }
.bpa-page.bpa-page--font-small .text-sm { font-size: 1.15rem !important; line-height: 1.75 !important; }
.bpa-page.bpa-page--font-small .text-base { font-size: 1.3rem !important; line-height: 1.8 !important; }
/* Support for rem-based arbitrary sizes */
.bpa-page.bpa-page--font-small [class*="text-\[0\.625rem\]"] { font-size: 0.875rem !important; } /* 10px equivalent, scaled up */
.bpa-page.bpa-page--font-small [class*="text-\[0\.6875rem\]"] { font-size: 0.9375rem !important; } /* 11px equivalent, scaled up */

.bpa-page.bpa-page--font-medium .text-xs { font-size: 1.1rem !important; line-height: 1.65 !important; }
.bpa-page.bpa-page--font-medium .text-sm { font-size: 1.3rem !important; line-height: 1.75 !important; }
.bpa-page.bpa-page--font-medium .text-base { font-size: 1.45rem !important; line-height: 1.8 !important; }
/* Support for rem-based arbitrary sizes */
.bpa-page.bpa-page--font-medium [class*="text-\[0\.625rem\]"] { font-size: 0.9375rem !important; } /* 10px equivalent, scaled up */
.bpa-page.bpa-page--font-medium [class*="text-\[0\.6875rem\]"] { font-size: 1.0rem !important; } /* 11px equivalent, scaled up */

.bpa-page.bpa-page--font-large .text-xs { font-size: 1.2rem !important; line-height: 1.6 !important; }
.bpa-page.bpa-page--font-large .text-sm { font-size: 1.45rem !important; line-height: 1.7 !important; }
.bpa-page.bpa-page--font-large .text-base { font-size: 1.65rem !important; line-height: 1.75 !important; }
/* Support for rem-based arbitrary sizes */
.bpa-page.bpa-page--font-large [class*="text-\[0\.625rem\]"] { font-size: 1.0rem !important; } /* 10px equivalent, scaled up */
.bpa-page.bpa-page--font-large [class*="text-\[0\.6875rem\]"] { font-size: 1.1rem !important; } /* 11px equivalent, scaled up */

.bpa-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1rem; }
@media (min-width: 640px) {
  .bpa-container { padding: 1.5rem 1.5rem; }
}
@media (min-width: 1024px) {
  .bpa-container { padding: 2rem 2rem; }
}
.bpa-glass { background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,0.8); }
.bpa-glass-soft { background: rgba(15, 23, 42, 0.4); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; box-shadow: 0 16px 40px rgba(15,23,42,0.6); }
.bpa-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.375rem 0.875rem; border-radius: 9999px; border: 1px solid var(--bpa-border); background: rgba(30, 41, 59, 0.8); font-size: 0.8125rem; font-weight: 600; color: var(--bpa-text-primary); line-height: 1.5; }
/* Subtitles - small, monospace, less prominent to let titles stand out */
.bpa-subtitle {
  font-family: "Courier New", Courier, "Liberation Mono", "Lucida Console", monospace;
  font-size: 0.625rem; /* 10px - very small */
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
  opacity: 0.7; /* Make it more subtle */
}
/* Scale subtitles with font size settings */
.bpa-page--font-small .bpa-subtitle { font-size: 0.75rem !important; }
.bpa-page--font-medium .bpa-subtitle { font-size: 0.8125rem !important; }
.bpa-page--font-large .bpa-subtitle { font-size: 0.875rem !important; }
.bpa-btn-primary { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  padding: 0.75rem 1.5rem; 
  border-radius: 9999px; 
  background: var(--bpa-accent); 
  color: #0f172a; 
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700; 
  border: none; 
  cursor: pointer; 
  text-decoration: none; 
  min-height: 44px; 
  font-size: 1rem; 
}
.bpa-btn-primary:hover { background: var(--bpa-accent-hover); }
@media (min-width: 640px) {
  .bpa-btn-primary { padding: 0.5rem 1.25rem; min-height: auto; }
}
.bpa-btn-secondary { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  padding: 0.75rem 1.5rem; 
  border-radius: 9999px; 
  background: rgba(15,23,42,0.6); 
  color: var(--bpa-text-primary); 
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700; 
  border: 1px solid var(--bpa-border); 
  text-decoration: none; 
  min-height: 44px; 
  font-size: 1rem; 
}
.bpa-btn-secondary:hover { border-color: var(--bpa-border); opacity: 0.9; }
@media (min-width: 640px) {
  .bpa-btn-secondary { padding: 0.5rem 1.25rem; min-height: auto; }
}
.bpa-input { width: 100%; border-radius: 12px; border: 1px solid var(--bpa-border); background: rgba(15,23,42,0.8); padding: 0.5rem 0.75rem; color: var(--bpa-text-primary); }
.bpa-label { 
  display: block; 
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.75rem; 
  font-weight: 700; 
  letter-spacing: 0.05em; 
  text-transform: uppercase; 
  color: var(--bpa-text-secondary); 
  margin-bottom: 0.25rem; 
  line-height: 1.6; 
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.row { display: flex; flex-wrap: wrap; margin: 0 -0.75rem; }
.col { width: 100%; padding: 0 0.75rem; }
.col-md-3 { width: 100%; padding: 0 0.75rem; }
.col-md-4 { width: 100%; padding: 0 0.75rem; }
.col-md-6 { width: 100%; padding: 0 0.75rem; }
.col-md-8 { width: 100%; padding: 0 0.75rem; }
.col-md-9 { width: 100%; padding: 0 0.75rem; }
.col-lg-8 { width: 100%; padding: 0 0.75rem; }
.col-lg-4 { width: 100%; padding: 0 0.75rem; }
.gy-3 > * { margin-top: 0.75rem; margin-bottom: 0.75rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mt-5 { margin-top: 1.25rem; }
.text-secondary { color: var(--bpa-text-secondary); }
.text-light { color: var(--bpa-text-primary); }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.shadow-sm { box-shadow: 0 10px 25px rgba(15,23,42,0.35); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.5rem 1rem; border-radius: 9999px; text-decoration: none; font-weight: 600; }
.btn-primary { background: #22c55e; color: #0f172a; }
.btn-primary:hover { background: #34d399; }
.btn-outline-light { border: 1px solid #94a3b8; color: #e2e8f0; }
.btn-outline-light:hover { border-color: #cbd5e1; }
.btn-outline-secondary { border: 1px solid #64748b; color: #e2e8f0; }
.btn-outline-secondary:hover { border-color: #94a3b8; }
.btn-sm { font-size: 0.85rem; padding: 0.35rem 0.75rem; }
.card { border-radius: 16px; background: rgba(15,23,42,0.6); border: 1px solid rgba(255,255,255,0.1); padding: 0; }
.card-body { padding: 1.25rem; }
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700; }
.text-bg-light { background: #e2e8f0; color: #0f172a; }
.text-bg-secondary { background: #475569; color: #e2e8f0; }

:root {
  /* Default theme (improved contrast) */
  --bpa-primary: #0d6efd;
  --bpa-accent: #22c55e;
  --bpa-accent-hover: #34d399;
  
  /* Background colors */
  --bpa-bg-primary: #020617;
  --bpa-bg-secondary: #0f172a;
  --bpa-bg-card: #1e293b;           /* Much brighter - was #111827 */
  --bpa-bg-card-hover: #334155;     /* For hover states */
  
  /* Text colors (improved contrast) */
  --bpa-text-primary: #f8fafc;      /* Maximum brightness for readability */
  --bpa-text-secondary: #e2e8f0;    /* Brighter secondary text */
  --bpa-text-tertiary: #cbd5e1;     /* For less important text */
  
  /* Borders - MUCH more visible */
  --bpa-border: rgba(203, 213, 225, 0.5);  /* Stronger border */
  --bpa-border-card: rgba(203, 213, 225, 0.4);  /* Much more visible card borders */
  --bpa-border-card-hover: rgba(34, 197, 94, 0.6);  /* Accent border on hover */
}

[data-theme="high-contrast"] {
  --bpa-bg-primary: #000000;
  --bpa-bg-secondary: #0a0a0a;
  --bpa-bg-card: #1a1a1a;
  --bpa-text-primary: #ffffff;
  --bpa-text-secondary: #e5e5e5;
  --bpa-text-tertiary: #cccccc;
  --bpa-border: rgba(255, 255, 255, 0.5);
  --bpa-border-card: rgba(255, 255, 255, 0.4);
  --bpa-accent: #00ff00;
  --bpa-accent-hover: #33ff33;
}

[data-theme="light"] {
  --bpa-bg-primary: #ffffff;
  --bpa-bg-secondary: #f8fafc;
  --bpa-bg-card: #ffffff;
  --bpa-text-primary: #0f172a;
  --bpa-text-secondary: #475569;
  --bpa-text-tertiary: #64748b;
  --bpa-border: rgba(15, 23, 42, 0.2);
  --bpa-border-card: rgba(15, 23, 42, 0.15);
  --bpa-accent: #059669;
  --bpa-accent-hover: #10b981;
}

/* Contrast levels */
[data-contrast="enhanced"] {
  --bpa-text-secondary: #d1d5db;    /* Even brighter */
  --bpa-border: rgba(203, 213, 225, 0.4);
}

[data-contrast="maximum"] {
  --bpa-text-secondary: #e5e7eb;    /* Maximum contrast */
  --bpa-border: rgba(203, 213, 225, 0.5);
}

[data-theme="high-contrast"][data-contrast="enhanced"],
[data-theme="high-contrast"][data-contrast="maximum"] {
  --bpa-text-secondary: #ffffff;
  --bpa-border: rgba(255, 255, 255, 0.7);
}

.bpa-card {
  border-radius: 1rem;
  background: var(--bpa-bg-card);
  border: 2px solid var(--bpa-border-card);  /* Thicker, more visible border */
  padding: 1.5rem;
  color: var(--bpa-text-primary);
  line-height: 1.7;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2); /* Card elevation */
  transition: all 0.2s ease;
}

.bpa-card:hover {
  border-color: var(--bpa-border-card-hover);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.bpa-card p {
  line-height: 1.7;
  color: var(--bpa-text-secondary);  /* Better contrast */
}

.bpa-card h2,
.bpa-card h3,
.bpa-card h4 {
  font-family: "Merriweather", Georgia, serif;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--bpa-text-primary);
  font-weight: 700;
}

/* Card internal structure - clear sections */
.bpa-card-header {
  background: rgba(30, 41, 59, 0.6);  /* Darker background for header */
  border-bottom: 2px solid var(--bpa-border-card);
  padding: 1rem 1.25rem;
  margin: -1.5rem -1.5rem 1rem -1.5rem;  /* Extend to card edges */
  border-radius: 1rem 1rem 0 0;  /* Round top corners */
}

.bpa-card-body {
  flex: 1;
  padding: 0.5rem 0;  /* Add some vertical padding */
}

.bpa-card-footer {
  background: rgba(15, 23, 42, 0.5);  /* Different background for footer */
  border-top: 2px solid var(--bpa-border-card);
  padding: 1rem 1.25rem;
  margin: 1rem -1.5rem -1.5rem -1.5rem;  /* Extend to card edges */
  border-radius: 0 0 1rem 1rem;  /* Round bottom corners */
}

.bpa-badge {
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  background-color: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
}

/* Gradient text for Apps link in navigation */
nav a[href*="/apps"],
nav a[href*="/best-privacy-apps"] {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  transition: all 0.3s ease;
}

nav a[href*="/apps"]:hover,
nav a[href*="/best-privacy-apps"]:hover {
  background: linear-gradient(135deg, #4ade80 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Active state for Apps link */
nav a[href*="/apps"][aria-current="page"],
nav a[href*="/best-privacy-apps"][aria-current="page"] {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 50%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Gradient accent for all app names throughout the website */
.app-name,
.bpa-app-name,
h1 .app-name,
h2 .app-name,
h3 .app-name,
h4 .app-name {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

/* App name links */
a .app-name,
a.app-name-link {
  background: linear-gradient(135deg, #34d399 0%, #22d3ee 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
}

a:hover .app-name,
a.app-name-link:hover {
  background: linear-gradient(135deg, #4ade80 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bpa-comparison-table th,
.bpa-comparison-table td {
  vertical-align: middle;
}

.bpa-comparison-top-pick {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.12), transparent);
  border-top: 2px solid rgba(34, 197, 94, 0.6);
  border-bottom: 2px solid rgba(34, 197, 94, 0.6);
}
