/* VECTOR AI PROJECT THEME - SINGLE SOURCE OF TRUTH */
/* DO NOT DEVIATE FROM THESE RULES */

/* Import Modern Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600&family=Fira+Code:wght@300;400;500;600&display=swap');

:root {
  /* Core Colors */
  --bg-dark: rgba(0, 0, 0, 0.7);
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  
  /* Glass Effect */
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.5);
  
  /* Accents */
  --accent-dark: #111111;
      --accent-highlight: #8b5cf6;
  --accent-success: #22c55e;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #6b7280;
  
  /* Borders */
  --border-primary: #333333;
  --border-secondary: #404040;
  
  /* Code Colors (VS Code Dark+ inspired) */
  --code-bg: #0d1117;
  --code-border: #21262d;
  --code-text: #e6edf3;
  --code-keyword: #ff7b72;
  --code-string: #a5d6ff;
  --code-number: #79c0ff;
  --code-comment: #8b949e;
  --code-function: #d2a8ff;
  --code-variable: #ffa657;
  
  /* Terminal Colors */
  --terminal-bg: #0c0c0c;
  --terminal-text: #00ff41;
  --terminal-prompt: #ff6b6b;
}

/* CORE COMPONENT: Glass Box - USE FOR ALL CONTAINERS */
.glass-box {
  background: var(--bg-dark);
  border: var(--border-glass);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-glass);
  color: var(--text-primary);
  transition: all 0.3s ease;
  padding: 2rem; /* Add proper padding so text doesn't touch edges */
}

.glass-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  transform: translateY(-2px);
}

/* Global Styles */
* {
  box-sizing: border-box;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header */
.main-header {
  background: var(--bg-secondary);
  border-bottom: var(--border-glass);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.logo img {
  height: 72px; /* 1.8x bigger than 40px */
  border-radius: 8px;
}

/* Navigation */
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 14px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--accent-dark);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--accent-dark);
}

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

/* Wallet Button */
.wallet-button {
  background: var(--bg-dark);
  border: var(--border-glass);
  border-radius: 8px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
}

.wallet-button:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--accent-dark);
}

.wallet-button.connected {
  border-color: var(--accent-success);
  background: rgba(34, 197, 94, 0.1);
}

.wallet-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-size: 14px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.005em;
}

.btn-primary {
  background: var(--accent-highlight);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: #e91e63;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 64, 129, 0.3);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: var(--border-glass);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--accent-dark);
}

.btn-danger {
  background: var(--accent-danger);
  color: var(--text-primary);
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}

.form-input, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: var(--border-glass);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-highlight);
  box-shadow: 0 0 0 2px rgba(255, 64, 129, 0.1);
}

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

/* Cards & Containers */
.container {
  max-width: 1200px;
  margin: 2rem auto 0 auto; /* Add top margin and center */
  padding: 0 2rem 2rem 2rem; /* Don't let content touch edges */
}

/* Ensure content doesn't touch edges */
.main-content {
  padding: 0 1rem;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Sidebar layout for docs */
.docs-layout {
  display: flex;
  gap: 2rem;
  margin: 2rem auto;
  max-width: 1400px;
  padding: 0 2rem;
  min-height: calc(100vh - 200px);
}

.docs-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.docs-content {
  flex: 1;
  min-width: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 1.5rem;
}

.sidebar-nav h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-glass);
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.sidebar-nav a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-weight: 500;
  gap: 0.75rem;
}

.sidebar-nav a:hover {
  background: var(--accent-dark);
  color: var(--text-primary);
}

.sidebar-nav a.active {
  background: var(--accent-highlight);
  color: var(--text-primary);
}

.sidebar-nav a.coming-soon {
  opacity: 0.5;
  cursor: not-allowed;
}

.sidebar-nav a.coming-soon:hover {
  background: transparent;
  color: var(--text-secondary);
}

.sidebar-nav i {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

/* Code Tabs */
.code-tab {
  background: var(--accent-dark);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.code-tab:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.code-tab.active {
  background: var(--accent-highlight);
  color: var(--text-primary);
  border-color: var(--accent-highlight);
}

/* Content sections */
.content-section {
  animation: fadeIn 0.3s ease-in-out;
}

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

.hero {
  text-align: center;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Improved Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 500; }
h5 { font-size: 1.125rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}



/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* Stats */
.stat-card {
  text-align: center;
  padding: 1.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Status Badges */
.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--accent-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Tables */
.table-container {
  overflow: hidden;
}

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

.table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: left;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.875rem;
  border-bottom: var(--border-glass);
}

.table td {
  padding: 16px;
  border-bottom: var(--border-glass);
  color: var(--text-primary);
}

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

/* Code Blocks */
.code-block {
  background: var(--bg-secondary);
  border: var(--border-glass);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
}

/* Response Display */
.response-container {
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.response-header {
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-bottom: var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.response-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  font-weight: 400;
}

.response-placeholder {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-primary);
  border-radius: 50%;
  border-top-color: var(--accent-highlight);
  animation: spin 1s ease-in-out infinite;
}

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

/* Success/Error States */
.success {
  color: var(--accent-success);
}

.error {
  color: var(--accent-danger);
}

.warning {
  color: var(--accent-warning);
}

/* Responsive Design */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
  }
  
  .wallet-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .glass-box {
    padding: 1.5rem;
    margin: 0.5rem;
  }
  
  .main-header {
    padding: 0.5rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-highlight);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* ===== CODE STYLING COMPONENTS ===== */

/* Code Block Container */
.code-container {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Code Header with Language Tag */
.code-header {
  background: linear-gradient(135deg, #21262d 0%, #161b22 100%);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-language {
  color: var(--code-function);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-copy-btn {
  background: transparent;
  border: 1px solid var(--code-border);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Fira Code', monospace;
}

.code-copy-btn:hover {
  background: var(--accent-highlight);
  color: white;
  border-color: var(--accent-highlight);
}

/* Enhanced Code Block */
.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1.5rem;
  overflow-x: auto;
  line-height: 1.6;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 400;
}

/* Syntax Highlighting */
.code-block .keyword { color: var(--code-keyword); font-weight: 500; }
.code-block .string { color: var(--code-string); }
.code-block .number { color: var(--code-number); }
.code-block .comment { color: var(--code-comment); font-style: italic; }
.code-block .function { color: var(--code-function); }
.code-block .variable { color: var(--code-variable); }
.code-block .property { color: var(--accent-warning); }
.code-block .operator { color: var(--text-primary); }

/* Terminal Style Code Block */
.terminal-block {
  background: var(--terminal-bg);
  color: var(--terminal-text);
  padding: 1.5rem;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-x: auto;
  position: relative;
}

.terminal-block::before {
  content: "$ ";
  color: var(--terminal-prompt);
  font-weight: 600;
}

/* JSON Response Styling */
.json-response {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--code-text);
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

/* JSON Response inside Glass Box */
.glass-box .json-response {
  margin: 0;
  border-radius: 8px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* JSON Syntax Highlighting */
.json-response .json-key { color: var(--code-function); }
.json-response .json-string { color: var(--code-string); }
.json-response .json-number { color: var(--code-number); }
.json-response .json-boolean { color: var(--code-keyword); }
.json-response .json-null { color: var(--code-comment); }

/* API Endpoint Badge */
.api-endpoint {
  background: linear-gradient(135deg, var(--accent-highlight) 0%, #6d28d9 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
  margin: 0.5rem 0;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Status Code Badges */
.status-200 { background: var(--accent-success); color: white; }
.status-400 { background: var(--accent-warning); color: white; }
.status-500 { background: var(--accent-danger); color: white; }

/* Code Tabs */
.code-tabs {
  display: flex;
  background: var(--bg-tertiary);
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.code-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
}

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

.code-tab.active {
  background: var(--code-bg);
  color: var(--accent-highlight);
  border-bottom-color: var(--accent-highlight);
}

/* Enhanced Form Inputs for API Testing */
.api-input {
  background: var(--accent-dark);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  font-weight: 400;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.api-input:focus {
  outline: none;
  border-color: var(--accent-highlight);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  background: var(--accent-dark);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.api-input:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.api-input::placeholder {
  color: var(--text-secondary);
  font-style: normal;
  opacity: 0.7;
}

/* Enhanced Select Dropdowns */
select.api-input,
select[id*="blockchain-select"] {
  background: var(--accent-dark);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

select.api-input:focus,
select[id*="blockchain-select"]:focus {
  outline: none;
  border-color: var(--accent-highlight);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

select.api-input:hover,
select[id*="blockchain-select"]:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* Loading Spinner for Code Blocks */
.code-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: var(--code-bg);
  border-radius: 8px;
}

.code-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--code-border);
  border-top: 3px solid var(--accent-highlight);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
