@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* Design System / Custom Properties */
:root {
  --bg-primary: #030712;
  --bg-secondary: #0b1528;
  --bg-card: rgba(17, 25, 40, 0.55);
  --bg-card-hover: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(99, 102, 241, 0.4);
  
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --shadow-neon: 0 0 25px rgba(99, 102, 241, 0.2);
  --transition-speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Blobs */
body::before, body::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: -100px;
  right: -100px;
  animation: float-blob-1 12s infinite alternate ease-in-out;
}

body::after {
  bottom: 10%;
  left: -200px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(0,0,0,0) 70%);
  animation: float-blob-2 15s infinite alternate ease-in-out;
}

@keyframes float-blob-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-80px, 80px) scale(1.1); }
}

@keyframes float-blob-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, -50px) scale(1.2); }
}

/* Typography & Links */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

a:hover {
  color: var(--accent-indigo);
  text-shadow: 0 0 8px rgba(99, 102, 241, 0.4);
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-neon);
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(3, 7, 18, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: '</>';
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover, .nav-links a.active {
  color: #ffffff;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  transition: width var(--transition-speed) ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

/* Home Layout: Hero Section */
.hero {
  max-width: 900px;
  margin: 6rem auto 4rem auto;
  padding: 0 2rem;
  text-align: center;
}

.badge {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  color: var(--accent-indigo);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  color: #ffffff;
  text-shadow: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Home Layout: Apps Section */
.section-title {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-indigo));
  margin: 0.75rem auto 0 auto;
  border-radius: 2px;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-bottom: 5rem;
}

.app-card {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
}

.app-meta h3 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.app-category {
  font-size: 0.8rem;
  color: var(--accent-indigo);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.app-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.app-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.app-store-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  color: #ffffff;
  font-size: 0.85rem;
  transition: all var(--transition-speed) ease;
}

.app-store-btn:hover {
  background: #111827;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
  color: #ffffff;
}

.app-store-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.app-legal-links {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  font-size: 0.85rem;
}

.app-legal-links a {
  color: var(--text-secondary);
}

.app-legal-links a:hover {
  color: var(--accent-cyan);
}

/* Legal Pages Layout (Two-Column Document Reader) */
.legal-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 1.5rem;
}

.legal-app-selector {
  margin-bottom: 2rem;
}

.legal-app-selector label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.legal-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: border-color var(--transition-speed) ease;
}

.legal-select:focus {
  border-color: var(--accent-cyan);
}

.custom-select-wrapper::after {
  content: '▼';
  font-size: 0.7rem;
  color: var(--text-secondary);
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.toc-list {
  list-style: none;
}

.toc-item {
  margin-bottom: 0.75rem;
}

.toc-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
  padding: 0.25rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-link:hover, .toc-link.active {
  color: var(--accent-cyan);
  padding-left: 0.5rem;
}

/* Legal Content Body Styling */
.legal-body {
  padding: 3rem;
}

.legal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
}

.legal-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.legal-last-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-content-section {
  display: none; /* Controlled by Javascript per app */
}

.legal-content-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.legal-body h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem 0;
  padding-top: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.05);
}

.legal-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.legal-body p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
}

.legal-body ul, .legal-body ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.legal-body li {
  margin-bottom: 0.5rem;
}

.legal-body strong {
  color: #ffffff;
}

.legal-contact-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.legal-contact-box p {
  margin-bottom: 0;
}

/* Contact & Footer Section */
.contact-section {
  text-align: center;
  max-width: 600px;
  margin: 6rem auto;
  padding: 0 2rem;
}

.contact-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-section p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

footer {
  border-top: 1px solid var(--border-color);
  background: rgba(3, 7, 18, 0.9);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .legal-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .legal-sidebar {
    position: relative;
    top: 0;
    max-height: none;
    overflow-y: visible;
    padding: 1rem;
  }
  
  .toc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
  }
  
  .toc-item {
    margin-bottom: 0;
  }
  
  .toc-link {
    white-space: normal;
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-links {
    gap: 1.25rem;
  }
  
  .apps-grid {
    grid-template-columns: 1fr;
  }
  
  .legal-body {
    padding: 1.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn {
    justify-content: center;
  }
}

/* FAQ Accordion Styling */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
}

.faq-item[open] {
  border-color: var(--border-color-hover);
  box-shadow: var(--shadow-neon);
}

.faq-item summary {
  padding: 1.25rem;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  outline: none;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent-cyan);
  transition: transform var(--transition-speed) ease;
}

.faq-item[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.25rem 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Support Form Styling */
.support-form-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2.5rem;
}

.support-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  background: rgba(3, 7, 18, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-speed) ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}
