/* ==========================================================================
   Recon7 Documentation Styling — Cyber Aesthetic & Portal Synchronization
   ========================================================================== */

:root {
  --bg-main: #020408;
  --bg-card: rgba(8, 14, 26, 0.75);
  --bg-card-hover: rgba(13, 22, 40, 0.95);
  --bg-sidebar: rgba(4, 8, 16, 0.92);
  --bg-code: #030712;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(6, 182, 212, 0.25);
  --border-active: rgba(6, 182, 212, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;

  --header-height: 4.25rem;
  --sidebar-width: 19rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(rgba(6, 182, 212, 0.08) 1px, transparent 1px),
    radial-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px;
  background-position: 0 0, 16px 16px;
  color: var(--text-primary);
  line-height: 1.65;
  display: flex;
  flex-direction: column;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Top Navigation Header */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: rgba(2, 4, 8, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5));
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  letter-spacing: 0.05em;
}

.brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 1rem 0.5rem 2.4rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  width: 260px;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
  box-shadow: 0 0 12px var(--accent-cyan-glow);
  width: 300px;
}

.github-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.github-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-glow);
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Hero Section */
.docs-hero {
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.04) 0%, transparent 100%);
  padding: 3.5rem 2rem 3rem 2rem;
}

.docs-hero-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3.5rem;
  align-items: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-cyan);
}

.hero-text-col h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #fff;
}

.hero-text-col p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 1.5rem;
}

.hero-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.hero-chip:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  transform: translateY(-1px);
}

/* Hero Right: Official Logo Showcase */
.hero-logo-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.hero-emblem-wrapper {
  position: relative;
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-emblem-img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(6, 182, 212, 0.75));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-emblem-img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 32px rgba(6, 182, 212, 0.95));
}

.hero-emblem-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* Main Container & Layout */
.docs-container {
  display: flex;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
}

/* Sticky Sidebar Navigation */
.docs-sidebar {
  width: var(--sidebar-width);
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 2rem 1.25rem 3rem 1.5rem;
  border-right: 1px solid var(--border-subtle);
  background: var(--bg-sidebar);
  flex-shrink: 0;
}

.nav-group {
  margin-bottom: 1.75rem;
}

.nav-group-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  padding-left: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 500;
  transition: all 0.15s ease;
  border-left: 2px solid transparent;
  margin-bottom: 0.2rem;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
  border-left-color: var(--accent-cyan);
  font-weight: 600;
}

.nav-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-link.active .nav-badge {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

/* Main Content Area */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: 3rem 4rem 6rem 4rem;
}

/* Documentation Sections */
.doc-section {
  display: flex;
  flex-direction: column;
  margin-bottom: 4.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.doc-section:last-of-type {
  border-bottom: none;
  margin-bottom: 2rem;
  padding-bottom: 0;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.doc-section h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.doc-section h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 1.75rem 0 0.85rem 0;
}

.doc-section p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.doc-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.doc-section ul li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.doc-section ul li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
  font-weight: bold;
}

/* Feature Cards Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2rem 0;
}

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

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

.feature-card h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Code Blocks */
.code-block-wrapper {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  margin: 1.25rem 0 1.75rem 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.08);
}

pre {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: #e2e8f0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

p code, li code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-cyan);
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0 2rem 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

thead {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}

th {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.85rem 1.25rem;
}

td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

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

/* Callouts */
.doc-callout {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.doc-callout strong {
  color: #fff;
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.doc-callout ul {
  margin-bottom: 0;
}

/* Badges */
.badge-get, .badge-post, .badge-put, .badge-delete {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

.badge-get {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-post {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-put {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-delete {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Footer */
.docs-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(2, 4, 8, 0.9);
  padding: 2rem 0;
  margin-top: auto;
}

.docs-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Responsive Breakpoints */
@media (max-width: 1180px) {
  .docs-hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-logo-showcase {
    display: none;
  }
}

@media (max-width: 1024px) {
  .docs-sidebar {
    position: fixed;
    left: -100%;
    top: var(--header-height);
    bottom: 0;
    z-index: 40;
    transition: left 0.3s ease;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .docs-sidebar.open {
    left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .docs-content {
    padding: 2.5rem 2rem;
  }
}

@media (max-width: 640px) {
  .docs-header {
    padding: 0 1rem;
  }

  .search-container {
    display: none;
  }

  .docs-hero {
    padding: 2.5rem 1.25rem 2rem 1.25rem;
  }

  .hero-text-col h2 {
    font-size: 1.75rem;
  }

  .docs-content {
    padding: 2rem 1rem;
  }
}
