/**
 * ═══════════════════════════════════════════════════════════════════════════
 * BacAI – Legal Pages v2.0
 * Shared styles for Terms & Conditions and Privacy Policy
 * ═══════════════════════════════════════════════════════════════════════════
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #0f1521;
  --bg-card: linear-gradient(145deg, rgba(21, 28, 44, 0.9), rgba(15, 21, 33, 0.95));
  
  --accent-cyan: #00d4ff;
  --accent-violet: #8b5cf6;
  --accent-magenta: #ec4899;
  --accent-green: #10b981;
  
  --gradient-primary: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 50%, #ec4899 100%);
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.3);
  
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-violet);
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BACKGROUND
   ═══════════════════════════════════════════════════════════════════════════ */

.bg-gradient {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139, 92, 246, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(0, 212, 255, 0.08), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo:hover {
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
}

.brand-letter {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Back Link */
.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-cyan);
  text-decoration: none;
}

.back-link svg {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */

.legal-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL CARD
   ═══════════════════════════════════════════════════════════════════════════ */

.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  overflow: hidden;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL HEADER CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.legal-header-content {
  padding: 48px 48px 32px;
  text-align: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(0, 212, 255, 0.05));
  border-bottom: 1px solid var(--border-subtle);
}

.legal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-lg);
}

.legal-icon svg {
  width: 40px;
  height: 40px;
  color: var(--accent-violet);
}

.legal-icon.privacy {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.2);
}

.legal-icon.privacy svg {
  color: var(--accent-green);
}

.legal-header-content h1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.legal-content {
  padding: 40px 48px;
}

.intro {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-section h2::before {
  content: '';
  width: 4px;
  height: 24px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.legal-section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legal-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.legal-section li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.legal-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
}

.legal-section li strong {
  color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTACT BOX
   ═══════════════════════════════════════════════════════════════════════════ */

.contact-box {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.contact-item:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.contact-item a {
  font-weight: 600;
  color: var(--text-primary);
}

.contact-item a:hover {
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INFO CALLOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.info-callout {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.callout-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.info-callout strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.info-callout p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RIGHTS GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.rights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.right-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
}

.right-icon {
  font-size: 18px;
}

.rights-note {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECURITY BADGES
   ═══════════════════════════════════════════════════════════════════════════ */

.security-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-green);
}

.badge-item svg {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LEGAL FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.legal-footer {
  padding: 24px 48px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid var(--border-subtle);
}

.related-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.related-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-cyan);
  text-decoration: none;
}

.related-link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.related-link:hover svg {
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.legal-page-footer {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .legal-header-content {
    padding: 32px 24px 24px;
  }
  
  .legal-header-content h1 {
    font-size: 26px;
  }
  
  .legal-content {
    padding: 32px 24px;
  }
  
  .legal-footer {
    padding: 20px 24px;
  }
  
  .contact-box {
    flex-direction: column;
  }
  
  .rights-grid {
    grid-template-columns: 1fr;
  }
  
  .security-badges {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .header-container {
    flex-direction: column;
    gap: 16px;
  }
  
  .back-link span {
    display: none;
  }
  
  .legal-icon {
    width: 64px;
    height: 64px;
  }
  
  .legal-icon svg {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}