/* ============================================
   InstaSwap Support — Styles
   ============================================ */

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

:root {
  --purple: #915dfd;
  --purple-dark: #7B4FE0;
  --purple-light: #A87FFD;
  --purple-glow: rgba(145, 93, 253, 0.15);
  --gold: #F5C542;

  --bg: #08080D;
  --bg-surface: #111118;
  --bg-card: #16161F;
  --bg-card-hover: #1C1C28;

  --border: #1E1E2D;
  --border-light: #2A2A3D;

  --text: #F5F5F7;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  --success: #34D399;
  --error: #F87171;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  font-family: var(--font);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 14px 24px;
  background: rgba(8, 8, 13, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.nav-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(145, 93, 253, 0.15);
  color: var(--purple-light);
  border: 1px solid rgba(145, 93, 253, 0.3);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text); }

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: rgba(8, 8, 13, 0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.mobile-menu.open { display: flex; }

.mobile-menu-link {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.mobile-menu-link:hover { color: var(--text); }

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 140px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: var(--purple);
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.08;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  transition: border-color 0.2s;
}

.search-box:focus-within {
  border-color: var(--purple);
}

.search-box svg { color: var(--text-muted); flex-shrink: 0; }

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
}

.search-box input::placeholder { color: var(--text-muted); }

/* ============================================
   Quick Links
   ============================================ */

.quick-links {
  padding: 40px 0 60px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.quick-card {
  padding: 24px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
}

.quick-card:hover {
  border-color: rgba(145, 93, 253, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.quick-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(145, 93, 253, 0.12);
  color: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.quick-icon-gold { background: rgba(245, 197, 66, 0.12); color: var(--gold); }
.quick-icon-red { background: rgba(248, 113, 113, 0.12); color: var(--error); }
.quick-icon-green { background: rgba(52, 211, 153, 0.12); color: var(--success); }

.quick-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.quick-card p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Docs Sections
   ============================================ */

.docs-section {
  padding: 60px 0;
}

.docs-section-alt {
  background: var(--bg-surface);
}

.docs-header {
  margin-bottom: 40px;
}

.docs-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.docs-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.docs-desc {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Guide Cards */
.guide-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-card {
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s;
}

.guide-card:hover { border-color: rgba(145, 93, 253, 0.2); }

.guide-step {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--purple-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  background: rgba(145, 93, 253, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.guide-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.guide-card p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.guide-card strong { color: var(--text); }

/* ============================================
   Accordion (FAQ + Troubleshooting)
   ============================================ */

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.accordion:hover { border-color: rgba(145, 93, 253, 0.2); }

.accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  gap: 12px;
}

.accordion-arrow {
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.accordion.open .accordion-arrow {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 22px;
}

.accordion.open .accordion-content {
  max-height: 500px;
  padding: 0 22px 20px;
}

.accordion-content p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.accordion-content ul {
  margin: 8px 0 0 20px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.accordion-content strong { color: var(--text); }

/* ============================================
   Contact Form
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.form-input {
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: var(--purple);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-primary {
  background: var(--purple);
  color: white;
  box-shadow: 0 4px 20px rgba(145, 93, 253, 0.3);
}

.btn-primary:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(145, 93, 253, 0.4);
}

.btn-full { width: 100%; }

/* Form Success */
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-lg);
  animation: fadeSlideIn 0.4s ease;
}

.form-success.show {
  display: flex;
}

.form-success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.form-success-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--success);
}

.form-success-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.form-success-desc strong {
  color: var(--text);
}

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

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-card {
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(145, 93, 253, 0.12);
  color: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.contact-info-icon-gold {
  background: rgba(245, 197, 66, 0.12);
  color: var(--gold);
}

.contact-info-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.contact-info-card p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.contact-info-card strong { color: var(--text); }

/* ============================================
   Footer
   ============================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 24px 24px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
}

.footer-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-link {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-link:hover { color: var(--text); }

.footer-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Search highlight */
.search-hidden { display: none !important; }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .hero-title { font-size: 30px; }

  .quick-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-grid { grid-template-columns: 1fr; }

  .docs-title { font-size: 24px; }

  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .quick-grid { grid-template-columns: 1fr; }
}
