@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #05070c;
  --bg-alt: #0b1524;
  --accent: #5be9b9;
  --accent-glow: rgba(91, 233, 185, 0.4);
  --accent-2: #60a4ff;
  --text: #f4f7ff;
  --text-muted: #9dacbe;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-bg: rgba(11, 21, 36, 0.6);
  --card-hover: rgba(11, 21, 36, 0.9);
  --gradient: linear-gradient(135deg, #2b48ff, #64ffe5);
  --gradient-text: linear-gradient(90deg, #5be9b9, #60a4ff);
  
  --font-main: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-height: 70px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

ul {
  list-style: none;
  padding: 0;
}

/* Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(91, 233, 185, 0.1);
}

.gradient-text {
  background: var(--gradient-text);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

/* Navbar */
.navbar {
  height: var(--nav-height);
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(5, 7, 12, 0.8);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--card-border);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-muted);
}

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

.nav-links .btn {
  color: var(--text);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-btns {
  display: flex;
  gap: 20px;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(43, 72, 255, 0.15) 0%, rgba(0,0,0,0) 70%);
  z-index: 0;
  pointer-events: none;
}

/* Code Window */
.code-window {
  background: #0d1117;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  overflow: hidden;
  position: relative;
}

.window-header {
  background: #161b22;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--card-border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.window-title {
  margin-left: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: monospace;
}

.window-body {
  padding: 20px;
  overflow-x: auto;
}

pre {
  margin: 0;
}

code {
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  color: #e6edf3;
}

.keyword { color: #ff7b72; }
.string { color: #a5d6ff; }
.number { color: #79c0ff; }

/* Features Section */
.features {
  padding: 80px 0;
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 30px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.icon-box {
  width: 50px;
  height: 50px;
  background: rgba(91, 233, 185, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  margin: 0 0 15px 0;
  font-size: 1.3rem;
}

.feature-card p {
  color: var(--text-muted);
  margin: 0;
}

/* How It Works */
.how-it-works {
  padding: 80px 0;
  text-align: center;
}

.diagram-container {
  margin: 40px 0;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.arch-svg {
  width: 100%;
  height: auto;
  max-height: 400px;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.step {
  max-width: 300px;
  text-align: center;
}

.step-number {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  line-height: 40px;
  font-weight: bold;
  margin-bottom: 15px;
}

/* Documentation */
.documentation {
  padding: 80px 0;
  background: var(--bg-alt);
  min-height: 80vh;
}

.docs-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
}

.docs-sidebar ul {
  position: sticky;
  top: 100px;
}

.docs-sidebar li {
  padding: 10px 15px;
  cursor: pointer;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.docs-sidebar li:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}

.docs-sidebar li.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 600;
  background: rgba(91, 233, 185, 0.05);
}

.docs-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.docs-section.active {
  display: block;
}

.code-block {
  background: #0d1117;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  position: relative;
  margin: 20px 0;
  overflow-x: auto;
}

.code-block code, .code-block pre {
  color: #e6edf3;
  font-family: 'Fira Code', monospace;
}

.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
}

.copy-btn:hover {
  color: var(--text);
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.api-table th, .api-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

.api-table th {
  background: rgba(255,255,255,0.05);
  color: var(--accent);
}

.api-table code {
  background: rgba(255,255,255,0.1);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-2);
}

.note {
  background: rgba(255, 189, 46, 0.1);
  border-left: 4px solid #ffbd2e;
  padding: 15px;
  margin-top: 15px;
  color: #ffd57a;
}


/* Documentation CTA */
.docs-cta {
  background: linear-gradient(135deg, rgba(43, 72, 255, 0.1) 0%, rgba(91, 233, 185, 0.1) 100%);
  border: 2px solid rgba(91, 233, 185, 0.3);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  margin: 40px auto;
  max-width: 800px;
  transition: all 0.3s ease;
}

.docs-cta:hover {
  border-color: rgba(91, 233, 185, 0.6);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(91, 233, 185, 0.2);
}

.docs-cta h3 {
  font-size: 2rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #2b48ff 0%, #5be9b9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.docs-cta p {
  font-size: 1.1rem;
  color: #9dacbe;
  margin-bottom: 32px;
  line-height: 1.6;
}

.docs-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #2b48ff 0%, #5be9b9 100%);
  color: white;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(43, 72, 255, 0.3);
}

.docs-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(43, 72, 255, 0.5);
}

.docs-cta-btn i {
  font-size: 1.2rem;
}

.docs-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.docs-feature-item {
  text-align: center;
  padding: 20px;
}

.docs-feature-item i {
  font-size: 2rem;
  color: #5be9b9;
  margin-bottom: 12px;
}

.docs-feature-item h4 {
  font-size: 1rem;
  color: #f4f7ff;
  margin-bottom: 8px;
}

.docs-feature-item p {
  font-size: 0.9rem;
  color: #9dacbe;
}

/* Support Section */
.support-section {
  padding: 80px 0;
  background: var(--bg);
  position: relative;
}

.support-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  max-width: 800px;
  margin: 0 auto;
}

.qr-container {
  background: white;
  padding: 15px;
  border-radius: 10px;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sponsor-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.sponsor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.support-info {
  flex: 1;
}

.support-info h3 {
  font-size: 1.8rem;
  margin: 0 0 10px 0;
  color: var(--text);
}

.support-info p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.pix-copy-box {
  background: #0d1117;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 20px;
}

.pix-label {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 10px;
  font-weight: 600;
}

.input-group {
  display: flex;
  gap: 10px;
}

.input-group input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 10px 15px;
  color: var(--text);
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .support-card {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  .pix-copy-box {
    text-align: left;
  }
}

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
}

.social-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

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

.social-links a:hover {
  color: var(--accent);
}

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

/* Responsive */
@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    margin: 0 auto 30px;
  }

  .hero-btns {
    justify-content: center;
  }

  .nav-links {
    display: none; /* Ideally add mobile menu toggle */
  }

  .mobile-menu-btn {
    display: block;
  }

  .docs-container {
    grid-template-columns: 1fr;
  }
  
  .docs-sidebar ul {
    display: flex;
    overflow-x: auto;
    position: static;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
  }

  .docs-sidebar li {
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
  }

  .docs-sidebar li.active {
    border-left: none;
    border-bottom-color: var(--accent);
  }
}
