@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;600;700&family=Bricolage+Grotesque:opsz,wght@12..96,800&display=swap');

:root {
  --bg-color: #0B0B15;
  --ink: #F0EFFA;
  --sub: #A2A1C2;
  --faint: #6E6D8F;
  --primary-gradient: linear-gradient(140deg, #7C3AED, #3D7BE8);
  --glow-shadow: 0 14px 36px rgba(94, 74, 232, 0.45), 0 0 50px rgba(124, 92, 246, 0.2);
  --hairline-border: 1px solid rgba(160, 124, 255, 0.4);
  --card-radius: 28px;
  --btn-radius: 999px;
  --card-bg: linear-gradient(140deg, rgba(124, 58, 237, 0.14), rgba(61, 123, 232, 0.10));
}

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

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

code, pre, p, li, td, th {
  overflow-wrap: break-word;
  word-break: break-word;
}

body {
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.15), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(61, 123, 232, 0.15), transparent 25%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.025em;
  font-weight: 800;
}

a {
  text-decoration: none;
  color: var(--ink);
  transition: all 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

.container {
  max-width: 1200px;
  width: 100%;
  /* Body is a flex column: without this, flex items keep min-width:auto and
     wide content (the privacy nutrition table) pushes the page horizontally. */
  min-width: 0;
  margin: 0 auto;
  padding: 0 24px;
}

/* Legal Page Container & HUD Integration */
.legal-page-container {
  max-width: 980px;
  width: 100%;
  margin: 40px auto 80px;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.legal-header {
  text-align: center;
  margin-bottom: 44px;
}

.legal-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
  border-radius: var(--btn-radius);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.legal-updated {
  color: var(--sub);
  font-size: 0.92rem;
  margin-top: 10px;
}

.legal-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 36px 40px;
  border-radius: 24px;
  margin: 28px 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease;
}

.legal-card:hover {
  border-color: rgba(167, 139, 250, 0.3);
}

.legal-card h2,
.legal-card h3 {
  color: #fff;
  font-size: 1.35rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-card p,
.legal-card li {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-card ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0;
  border-radius: 16px;
  border: var(--hairline-border);
  /* A visible slim track tells the reader the table scrolls sideways on phones. */
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 124, 255, 0.55) rgba(255, 255, 255, 0.06);
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(160, 124, 255, 0.55);
  border-radius: 999px;
}

.legal-table {
  width: 100%;
  /* Keeps the 4 columns legible; the wrapper scrolls when the screen is narrower. */
  min-width: 560px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.02);
}

.legal-table th, .legal-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-table th {
  background: rgba(124, 58, 237, 0.18);
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

.legal-table td {
  color: var(--sub);
}

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

.badge-tag-safe {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--btn-radius);
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* FAQ Accordion & Cards */
.faq-list {
  margin: 32px 0;
}

.faq-item {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--hairline-border);
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 20px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(160, 124, 255, 0.7);
  transform: translateY(-2px);
}

.faq-question {
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 12px;
  font-weight: 700;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.faq-icon {
  font-size: 1.2rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.faq-answer {
  color: var(--sub);
  font-size: 1.05rem;
  line-height: 1.65;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Contact Cards Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.contact-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--hairline-border);
  border-radius: 20px;
  padding: 28px;
  text-align: center;
  transition: all 0.3s ease;
}

.contact-card:hover {
  border-color: rgba(160, 124, 255, 0.8);
  box-shadow: var(--glow-shadow);
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.contact-title {
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 700;
}

.contact-desc {
  color: var(--sub);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.contact-link {
  color: #a78bfa;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-block;
  padding: 8px 18px;
  border-radius: var(--btn-radius);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(160, 124, 255, 0.3);
  transition: all 0.2s ease;
}

.contact-link:hover {
  background: var(--primary-gradient);
  color: #fff;
  opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 60px 0;
  }
  .hero p {
    margin: 0 auto 40px;
  }
  .hero-visual {
    margin-top: 40px;
  }
  .store-badges {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .page-content h1 { font-size: 2.4rem; }
  .nav-wrap {
    height: auto;
    padding: 16px 0;
    flex-direction: column;
    gap: 16px;
  }
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.95rem;
  }
  /* Keep the language switcher on its own row instead of trailing the last link. */
  .nav-links .lang-selector {
    flex-basis: 100%;
    justify-content: center;
  }
  .footer-content { flex-direction: column; }
  .badge-1, .badge-2, .badge-3 {
    font-size: 0.8rem;
    padding: 8px 16px;
  }
  .legal-card, .faq-item {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }
  .logo { font-size: 1.55rem; }
  .nav-links { gap: 14px 18px; font-size: 0.9rem; }
  .hero h1 { font-size: 2.2rem; }
  .page-content h1 { font-size: 1.95rem; }
  .legal-card h2, .page-content h2 { font-size: 1.4rem; }
  .legal-card h3, .page-content h3 { font-size: 1.15rem; }
  .legal-card, .faq-item { padding: 18px; }
  .store-badges { flex-wrap: wrap; }
}
