/* XOM3 Documentation - Sacred Geometry Theme */
/* Brand Colors: Cyan #00D9FF, Purple #7C3AED, Dark #050508 #0a0a0f */

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

/* CSS Variables */
:root {
  --cyan: #00D9FF;
  --purple: #7C3AED;
  --dark-1: #050508;
  --dark-2: #0a0a0f;
  --dark-3: #12121a;
  --dark-4: #1a1a24;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.5);
  --gradient-cyan-purple: linear-gradient(135deg, var(--cyan), var(--purple));
  --glow-cyan: 0 0 30px rgba(0, 217, 255, 0.3);
  --glow-purple: 0 0 30px rgba(124, 58, 237, 0.3);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--dark-1);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Sacred Geometry Background */
.sacred-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

/* Grid Lines */
.grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Floating Orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--cyan);
  top: -200px;
  right: -200px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--purple);
  bottom: -150px;
  left: -150px;
  animation-delay: -7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Sacred Geometry Shapes */
.geometry-shape {
  position: absolute;
  border: 1px solid rgba(0, 217, 255, 0.1);
  animation: rotate 60s linear infinite;
}

.hexagon {
  width: 200px;
  height: 200px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  top: 20%;
  right: 10%;
}

.triangle {
  width: 150px;
  height: 150px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  bottom: 30%;
  left: 5%;
  animation-direction: reverse;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 5, 8, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-logo svg {
  width: 40px;
  height: 40px;
}

.nav-logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-cyan-purple);
  transition: width 0.3s ease;
}

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

.nav-cta {
  background: var(--gradient-cyan-purple);
  color: var(--dark-1) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
}

.nav-cta:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.nav-cta::after {
  display: none !important;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

/* Main Content */
main {
  padding-top: 80px;
  min-height: 100vh;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.875rem;
  color: var(--cyan);
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--gradient-cyan-purple);
  color: var(--dark-1);
}

.btn-primary:hover {
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--cyan);
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 217, 255, 0.3);
  transform: translateY(-5px);
  box-shadow: var(--glow-cyan);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-cyan-purple);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.card-icon svg {
  width: 30px;
  height: 30px;
  color: var(--dark-1);
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Documentation Layout */
.docs-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sidebar-links {
  list-style: none;
}

.sidebar-links li {
  margin-bottom: 0.5rem;
}

.sidebar-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
}

.sidebar-links a:hover,
.sidebar-links a.active {
  background: rgba(0, 217, 255, 0.1);
  color: var(--cyan);
  border-left-color: var(--cyan);
}

/* Content Area */
.docs-content {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 3rem;
}

.docs-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.docs-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.docs-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.docs-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.docs-content a {
  color: var(--cyan);
  text-decoration: none;
}

.docs-content a:hover {
  text-decoration: underline;
}

.docs-content ul,
.docs-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.docs-content li {
  margin-bottom: 0.5rem;
}

/* Code Blocks */
.code-block {
  background: var(--dark-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 1.5rem 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-lang {
  font-size: 0.8rem;
  color: var(--cyan);
  font-weight: 500;
}

.code-copy {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.code-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

pre {
  padding: 1rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Inline Code */
.docs-content code:not(pre code) {
  background: rgba(0, 217, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--cyan);
}

/* API Reference */
.api-endpoint {
  background: var(--dark-3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.api-method {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.method-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.method-get { background: rgba(0, 200, 83, 0.2); color: #00c853; }
.method-post { background: rgba(0, 150, 255, 0.2); color: #0096ff; }
.method-put { background: rgba(255, 170, 0, 0.2); color: #ffaa00; }
.method-delete { background: rgba(255, 60, 60, 0.2); color: #ff3c3c; }

.api-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2.5rem;
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card.featured {
  border-color: var(--cyan);
  background: rgba(0, 217, 255, 0.05);
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-cyan);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-cyan-purple);
  color: var(--dark-1);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-header {
  text-align: center;
  margin-bottom: 2rem;
}

.pricing-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 700;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.pricing-features svg {
  width: 20px;
  height: 20px;
  color: var(--cyan);
  flex-shrink: 0;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-question svg {
  width: 24px;
  height: 24px;
  color: var(--cyan);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 1rem;
  max-width: 300px;
}

.footer-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

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

/* Callout Boxes */
.callout {
  padding: 1.5rem;
  border-radius: 12px;
  margin: 1.5rem 0;
  display: flex;
  gap: 1rem;
}

.callout-icon {
  flex-shrink: 0;
}

.callout-icon svg {
  width: 24px;
  height: 24px;
}

.callout-info {
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
}

.callout-info .callout-icon svg {
  color: var(--cyan);
}

.callout-warning {
  background: rgba(255, 170, 0, 0.1);
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.callout-warning .callout-icon svg {
  color: #ffaa00;
}

.callout-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.callout-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: relative;
    top: 0;
    max-height: none;
  }
  
  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero {
    padding: 4rem 1.5rem;
  }
  
  .section {
    padding: 3rem 1.5rem;
  }
  
  .docs-content {
    padding: 1.5rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--dark-2);
}

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

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

/* Selection */
::selection {
  background: rgba(0, 217, 255, 0.3);
  color: var(--text-primary);
}

/* Step-by-step guides */
.steps {
  counter-reset: step;
  margin: 2rem 0;
}

.step {
  position: relative;
  padding-left: 3.5rem;
  padding-bottom: 2rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.step:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -16px;
  width: 30px;
  height: 30px;
  background: var(--gradient-cyan-purple);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--dark-1);
}

.step h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-secondary);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  color: var(--text-primary);
}

td {
  color: var(--text-secondary);
}

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

/* Legal Pages */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.legal-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--gradient-cyan-purple);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.legal-content section {
  margin-bottom: 2.5rem;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--cyan);
}

.legal-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.legal-content ul {
  color: var(--text-secondary);
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.legal-content a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-content a:hover {
  color: var(--purple);
  text-decoration: underline;
}
