:root {
  --bg-main: #050713;
  --bg-alt: #0b0f1f;
  --accent: #4f8cff;
  --accent-soft: rgba(79, 140, 255, 0.2);
  --text-main: #f5f7ff;
  --text-muted: #a3adc7;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --radius-md: 12px;
  --transition-fast: 0.2s ease-out;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #1b2340 0, #050713 45%, #02030a 100%);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  line-height: 1.7;
  color: var(--text-main);
}
.policy-content h1 {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 8px;
}
.policy-content h2 {
  font-size: 20px;
  margin: 32px 0 12px;
  color: var(--accent);
}
.policy-content h3 {
  font-size: 17px;
  margin: 25px 0 10px;
}
.policy-content p {
  margin: 15px 0;
  font-size: 15px;
  color: var(--text-muted);
}
.policy-content ul {
  margin: 15px 0;
  padding-left: 1.4em;
}
.policy-content li {
  margin: 8px 0;
  font-size: 15px;
  color: var(--text-muted);
}
.policy-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.policy-content a:hover { color: var(--text-main); }

.policy-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(5, 7, 19, 0.97);
  backdrop-filter: blur(12px);
  color: var(--text-main);
  padding: 18px 24px;
  z-index: 10000;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--border-subtle);
}
.cookie-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.cookie-content p {
  margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted);
}
.cookie-content a {
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px;
}
.cookie-content a:hover { color: var(--text-main); }
.cookie-actions { display: inline-flex; gap: 10px; flex-shrink: 0; }
.cookie-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}
.cookie-btn:hover { background: #3a75e0; transform: translateY(-1px); }
.cookie-btn.secondary {
  background: rgba(148, 163, 184, 0.18);
  color: #e8eef8;
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.cookie-btn.secondary:hover {
  background: rgba(148, 163, 184, 0.24);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .policy-content { padding: 80px 16px 40px; }
  .cookie-content { flex-direction: column; text-align: center; gap: 14px; }
  .cookie-actions { width: 100%; flex-direction: column; }
  .cookie-btn { width: 100%; }
}

/* ===== Light theme ===== */
html[data-theme="light"] {
  --bg-main: #f0f3fb;
  --bg-alt: #e6ebf7;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.16);
  --text-main: #0b1220;
  --text-muted: #3e4c63;
  --border-subtle: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] body {
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08) 0, #f0f3fb 44%, #e6ebf7 100%);
  color: var(--text-main);
}
html[data-theme="light"] .policy-content h2 { color: var(--accent); }
html[data-theme="light"] .back-link {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .cookie-banner {
  background: rgba(240, 243, 251, 0.96);
  border-top-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 -8px 24px rgba(2, 6, 23, 0.08);
}
html[data-theme="light"] .cookie-content p { color: #334155; }
html[data-theme="light"] .cookie-btn.secondary {
  background: #ffffff;
  color: #1e293b;
  border-color: rgba(15, 23, 42, 0.14);
}
html[data-theme="light"] .cookie-btn.secondary:hover {
  background: #f8faff;
  border-color: rgba(37, 99, 235, 0.20);
}
