/* FELEROUS ARCADE DOCS STYLES */
:root {
  --docs-bg-primary: #090d14;
  --docs-bg-surface: #0f1523;
  --docs-bg-card: #151c2e;
  --docs-border: #232d42;
  --docs-accent: #00e676;
  --docs-accent-purple: #a855f7;
  --docs-accent-blue: #38bdf8;
  --docs-accent-amber: #fbbf24;
  --docs-text-primary: #f8fafc;
  --docs-text-secondary: #94a3b8;
  --docs-text-muted: #64748b;
  --docs-code-bg: #0b0f19;
  --docs-sidebar-w: 280px;
}

html {
  overflow-x: clip !important; /* Sticky navigasyonun çalışması için base.css'i ezer */
}

body.docs-body {
  overflow-x: clip !important;
  background-color: var(--docs-bg-primary);
  color: var(--docs-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  line-height: 1.6;
}

.docs-layout {
  display: flex;
  align-items: flex-start; /* Taban sınırı ve sticky hareket alanı için zorunlu */
  min-height: calc(100vh - 60px);
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  position: relative;
}

/* SIDEBAR - TAVAN VE TABAN SINIRLI YAPIŞKAN (STICKY) MENÜ */
.docs-sidebar {
  width: var(--docs-sidebar-w);
  flex-shrink: 0;
  background: var(--docs-bg-surface);
  border-right: 1px solid var(--docs-border);
  border-bottom: 1px solid var(--docs-border);
  border-radius: 0 0 12px 0;
  padding: 16px 12px 20px;
  position: -webkit-sticky;
  position: sticky;
  top: 70px; /* TAVAN SINIRI: Sabit Navbar'ın hemen altı */
  align-self: flex-start; /* TABAN SINIRI: .docs-layout sonuna kadar takip eder */
  height: auto; /* İçeriğin uzunluğu kadar aşağı uzansın, iç kaydırma yok */
  overflow: visible; /* Kendi içinde kaydırma çubuğu kesinlikle yok */
  box-sizing: border-box;
  z-index: 100;
  transition: margin-left 0.25s ease;
}

.docs-sidebar::-webkit-scrollbar {
  width: 5px;
}

.docs-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

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

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

body.docs-sidebar-collapsed .docs-sidebar {
  margin-left: calc(-1 * var(--docs-sidebar-w));
}

.docs-sidebar-close {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--docs-border);
  color: #fff;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: auto;
}

.docs-sidebar-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.docs-sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--docs-border);
  color: var(--docs-text-muted);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.2s ease;
}

.docs-sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1024px) {
  .docs-sidebar-collapse-btn {
    display: none;
  }
}

.docs-sidebar-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--docs-text-muted);
  margin: 12px 0 4px 8px;
}

.docs-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--docs-text-secondary);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.docs-nav-link:hover, .docs-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.docs-nav-link.active {
  color: var(--docs-accent);
  background: rgba(0, 230, 118, 0.08);
  font-weight: 600;
}

.docs-nav-badge {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.badge-green { background: rgba(0, 230, 118, 0.15); color: var(--docs-accent); }
.badge-purple { background: rgba(168, 85, 247, 0.15); color: var(--docs-accent-purple); }
.badge-amber { background: rgba(251, 191, 36, 0.15); color: var(--docs-accent-amber); }
.badge-blue { background: rgba(56, 189, 248, 0.15); color: var(--docs-accent-blue); }

/* MAIN CONTENT */
.docs-content {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: none;
  padding: 36px 48px 120px;
  box-sizing: border-box;
}

.docs-hero {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--docs-border);
}

.docs-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 20px;
  color: var(--docs-accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.docs-hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  color: #fff;
}

.docs-hero-desc {
  font-size: 1.1rem;
  color: var(--docs-text-secondary);
  margin: 0 0 24px;
  line-height: 1.6;
}

.docs-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.docs-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.docs-btn-primary {
  background: var(--docs-accent);
  color: #05140b;
}

.docs-btn-primary:hover {
  background: #00ff84;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 230, 118, 0.35);
}

.docs-btn-secondary {
  background: var(--docs-bg-card);
  color: #fff;
  border-color: var(--docs-border);
}

.docs-btn-secondary:hover {
  background: #1c263c;
  border-color: #3b4b6b;
  transform: translateY(-1px);
}

/* SECTION HEADINGS */
.docs-section {
  margin-bottom: 50px;
  scroll-margin-top: 80px;
}

.docs-section-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.docs-section-desc {
  color: var(--docs-text-secondary);
  font-size: 0.98rem;
  margin: 0 0 20px;
}

/* CODE BLOCKS */
.docs-code-wrapper {
  background: var(--docs-code-bg);
  border: 1px solid var(--docs-border);
  border-radius: 10px;
  margin: 16px 0 24px;
  overflow: hidden;
}

.docs-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--docs-border);
  font-size: 0.8rem;
  color: var(--docs-text-muted);
}

.docs-copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--docs-border);
  color: var(--docs-text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.docs-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.docs-code-pre {
  margin: 0;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: 'Fira Code', 'Cascadia Code', Consolas, Monaco, monospace;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.55;
}

/* CARDS & TABLES */
.docs-info-box {
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.docs-info-box.alert-warn {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.3);
}

.docs-info-box.alert-success {
  background: rgba(0, 230, 118, 0.06);
  border-color: rgba(0, 230, 118, 0.3);
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}

.docs-table th {
  background: var(--docs-bg-surface);
  color: var(--docs-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--docs-border);
  text-align: left;
}

.docs-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--docs-border);
  color: var(--docs-text-secondary);
}

.docs-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.docs-table code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--docs-accent-blue);
  font-size: 0.85em;
}

/* JSON VALIDATOR WIDGET */
.validator-card {
  background: var(--docs-bg-card);
  border: 1px solid var(--docs-border);
  border-radius: 12px;
  padding: 24px;
  margin-top: 20px;
}

.validator-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.validator-tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--docs-border);
  color: var(--docs-text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
}

.validator-tab-btn.active {
  background: var(--docs-accent);
  color: #05140b;
  font-weight: 700;
  border-color: var(--docs-accent);
}

.validator-textarea {
  width: 100%;
  height: 220px;
  background: var(--docs-code-bg);
  border: 1px solid var(--docs-border);
  border-radius: 8px;
  color: #e2e8f0;
  font-family: Consolas, Monaco, monospace;
  font-size: 0.86rem;
  padding: 14px;
  box-sizing: border-box;
  resize: vertical;
}

.validator-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.validator-result {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  display: none;
}

.validator-result.success {
  display: block;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: #a7f3d0;
}

.validator-result.error {
  display: block;
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
}

/* FLOATING HAMBURGER & QUICK NAV CONTROLS */
.docs-floating-toggle {
  position: fixed;
  left: 0;
  top: 80px;
  z-index: 1002;
  display: none; /* Masaüstünde sidebar açıkken gizlidir, çakışmayı önler */
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  background: rgba(15, 21, 35, 0.94);
  border: 1px solid var(--docs-border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--docs-accent);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 10px rgba(0, 230, 118, 0.15);
  backdrop-filter: blur(12px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Mobilde her zaman görünür */
@media (max-width: 1024px) {
  .docs-floating-toggle {
    display: inline-flex;
  }
}

/* Masaüstünde sol menü daraltıldığında (Zen modu) görünür */
body.docs-sidebar-collapsed .docs-floating-toggle {
  display: inline-flex;
}

.docs-floating-toggle:hover {
  background: rgba(21, 28, 46, 0.98);
  border-color: var(--docs-accent);
  color: #fff;
  padding-left: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(0, 230, 118, 0.3);
}

.toggle-hamburger-lines {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 15px;
  height: 12px;
}

.toggle-hamburger-lines span {
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* BACK TO TOP FLOATING BUTTON */
.docs-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 21, 35, 0.92);
  border: 1px solid var(--docs-border);
  color: var(--docs-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 1001;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
}

.docs-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.docs-back-to-top:hover {
  background: var(--docs-accent);
  color: #090d14;
  border-color: var(--docs-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 230, 118, 0.45);
}

/* BACKDROP FOR MOBILE DRAWER */
.docs-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1005;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.docs-sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .docs-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    z-index: 1010;
    transform: translateX(-100%);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.75);
    background: #0d121f;
  }

  .docs-sidebar.drawer-open {
    transform: translateX(0);
  }

  .docs-sidebar-close {
    display: flex;
  }

  .docs-content {
    padding: 28px 24px 80px;
  }

  .docs-hero-title {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  .docs-content {
    padding: 20px 16px 80px;
  }

  .docs-hero-title {
    font-size: 1.6rem;
  }

  .docs-hero-desc {
    font-size: 0.95rem;
  }

  .docs-floating-toggle .toggle-text {
    display: none;
  }

  .docs-floating-toggle {
    padding: 10px 12px;
  }
}
