/* BrainBank Website — Cyberpunk/Neon Theme
   Colors matched from FluentTheme.swift */

:root {
  --bg: #121219;
  --card: #1c1c28;
  --card-pressed: #262632;
  --field: #1e212d;
  --border: rgba(255, 255, 255, 0.19);
  --border-solid: #3a3a4a;

  --cyan: #00ffff;
  --magenta: #ff00c8;
  --purple: #c864ff;
  --green: #00ff96;
  --orange: #ff8c00;
  --blue: #50b4ff;
  --pink: #ff32c8;
  --yellow: #ffe600;

  --text-primary: #f0f0f5;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-tertiary: rgba(255, 255, 255, 0.4);

  --radius: 12px;
  --border-width: 1.5px;
  --spacing: 8px;
  --padding: 16px;

  --max-width: 800px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main {
  flex: 1;
}

/* Links */

a {
  color: var(--cyan);
  text-decoration: none;
  transition: text-shadow 0.2s ease, color 0.2s ease;
}

a:hover {
  text-shadow: 0 0 10px var(--cyan), 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Navigation */

.nav {
  padding: 20px 0;
  border-bottom: var(--border-width) solid var(--border);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-brand:hover {
  text-shadow: none;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-brand span {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--cyan);
}

/* Hero Section */

.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin-bottom: 32px;
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.15), 0 0 80px rgba(0, 255, 255, 0.05);
}

.hero h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .tagline {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero .description {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--cyan);
  color: var(--bg);
}

.btn-primary:hover {
  text-shadow: none;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4), 0 0 40px rgba(0, 255, 255, 0.15);
  transform: translateY(-1px);
}

/* Cards */

.card {
  background: var(--card);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius);
  padding: var(--padding);
}

/* Content Sections (Privacy Policy) */

.content {
  padding: 48px 0 80px;
}

.content h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content .effective-date {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-bottom: 32px;
}

.content h2 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--cyan);
  margin-top: 24px;
  margin-bottom: 12px;
}

.content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 16px;
}

.content ul li {
  color: var(--text-secondary);
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.content ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
}

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

.content hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}

/* Tables */

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: var(--radius);
  border: var(--border-width) solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: var(--card);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: var(--border-width) solid var(--border);
  white-space: nowrap;
}

td {
  padding: 12px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Footer */

.footer {
  padding: 32px 0;
  border-top: var(--border-width) solid var(--border);
  margin-top: auto;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--cyan);
}

/* 404 Page */

.error-page {
  text-align: center;
  padding: 120px 0;
}

.error-code {
  font-size: 120px;
  font-weight: 800;
  letter-spacing: -2px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: glow-pulse 3s ease-in-out infinite;
}

.error-message {
  font-size: 20px;
  color: var(--text-secondary);
  margin: 16px 0 40px;
}

/* Rainbow gradient animation (matches enriching border) */

@keyframes rainbow-border {
  0%   { border-color: var(--cyan); }
  17%  { border-color: var(--green); }
  33%  { border-color: var(--yellow); }
  50%  { border-color: var(--orange); }
  67%  { border-color: var(--magenta); }
  83%  { border-color: var(--purple); }
  100% { border-color: var(--cyan); }
}

@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.3)); }
  50%      { filter: drop-shadow(0 0 40px rgba(200, 100, 255, 0.4)); }
}

/* Responsive */

@media (max-width: 640px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero-icon {
    width: 88px;
    height: 88px;
    border-radius: 20px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero .tagline {
    font-size: 17px;
  }

  .content h1 {
    font-size: 28px;
  }

  .content h2 {
    font-size: 19px;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }

  .error-code {
    font-size: 80px;
  }

  table {
    font-size: 13px;
  }

  th, td {
    padding: 10px 12px;
  }
}
