/* PDFStack Global Styles */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  /* Colors - Dark Theme */
  --bg: #0b1020;
  --bg-alt: #0f0f0f;
  --panel: #11182b;
  --panel-2: #0f1526;
  --panel-3: #0a0f1d;
  --border: #22304f;
  --border-alt: #2a2a2a;
  --text: #eef3ff;
  --text-alt: #e0e0e0;
  --muted: #9fb0d3;
  --muted-alt: #a0a0a0;
  
  /* Brand Colors */
  --green: #32e6b7;
  --green-bg: rgba(50,230,183,.12);
  --green-alt: #00d4aa;
  --blue: #7cc8ff;
  --blue-bg: rgba(124,200,255,.12);
  --yellow: #ffd36e;
  --yellow-bg: rgba(255,211,110,.12);
  --orange: #ff9d76;
  --purple: #b388ff;
  
  /* Syntax Highlighting */
  --syntax-keyword: #7cc8ff;
  --syntax-string: #ffd36e;
  --syntax-number: #ff9d76;
  --syntax-comment: #9fb0d3;
  --syntax-function: #32e6b7;
  --syntax-variable: #eef3ff;
  --syntax-operator: #c9d5f5;
  
  /* Layout */
  --radius: 18px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Typography */
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================
   RESET & BASE
   ======================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1 {
  font-size: 40px;
  margin-bottom: 8px;
  font-weight: 800;
}

h2 {
  font-size: 28px;
  margin-bottom: 10px;
  font-weight: 700;
}

h3 {
  font-size: 20px;
  margin: 18px 0 10px;
  font-weight: 700;
}

h4 {
  font-size: 16px;
  margin: 14px 0 10px;
  font-weight: 600;
  color: var(--muted);
}

p {
  margin-bottom: 10px;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

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

ol, ul {
  padding-left: 1.5rem;
  margin: 10px 0;
}

ol li, ul li {
  margin-bottom: 0.5rem;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green), #79ffd8);
  border-color: transparent;
  color: #072118;
}

.btn-primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn-secondary {
  background: var(--panel-2);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--panel);
  text-decoration: none;
}

.copy-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--panel);
  color: var(--green);
}

/* ========================================
   CODE BLOCKS
   ======================================== */
pre {
  background: #09101e;
  border: 1px solid #22324f;
  border-radius: 12px;
  padding: 14px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 13px;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
}

/* Endpoint Route Block (distinct style) */
.endpoint-route {
  background: rgba(50, 230, 183, 0.08);
  border: 1px solid rgba(50, 230, 183, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}

.endpoint-route code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
}

/* Parameter Block (same style as endpoint route) */
.param-block {
  background: rgba(50, 230, 183, 0.08);
  border: 1px solid rgba(50, 230, 183, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
}

/* Code Example Blocks (existing style, preserved) */
.code-block {
  transition: opacity 0.15s ease;
  min-height: 200px;
  max-height: 600px;
  overflow-y: auto;
}

.code-block[style*="display: none"] {
  display: none !important;
}

/* ========================================
   SYNTAX HIGHLIGHTING
   ======================================== */
.keyword {
  color: var(--syntax-keyword);
  font-weight: 600;
}

.string {
  color: var(--syntax-string);
}

.number {
  color: var(--syntax-number);
}

.comment {
  color: var(--syntax-comment);
  font-style: italic;
}

.function {
  color: var(--syntax-function);
  font-weight: 600;
}

.variable {
  color: var(--syntax-variable);
}

.operator {
  color: var(--syntax-operator);
}

/* ========================================
   LANGUAGE SELECTOR TABS
   ======================================== */
.language-selector {
  display: flex;
  gap: 4px;
  margin: 12px 0 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.lang-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  transition: all 0.2s ease;
  position: relative;
  bottom: -1px;
}

.lang-tab:hover {
  color: var(--text);
  background: rgba(124, 200, 255, 0.05);
}

.lang-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

/* ========================================
   METHOD CHIPS
   ======================================== */
.method {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 9px;
  margin-right: 8px;
  color: #081e1a;
  background: linear-gradient(135deg, var(--green), #89ffd3);
}

.method-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  padding: 3px 8px;
  margin-right: 8px;
  color: #081e1a;
  background: linear-gradient(135deg, var(--green), #89ffd3);
}

/* ========================================
   CARDS & PANELS
   ======================================== */
.card, .block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
}

.block {
  margin-top: 16px;
}

.endpoint {
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-top: 14px;
}

/* ========================================
   CALLOUTS
   ======================================== */
.callout {
  border: 1px solid #2a4666;
  background: var(--blue-bg);
  color: #d9f0ff;
  padding: 12px;
  border-radius: 12px;
  margin: 12px 0;
}

.callout.success {
  border-color: #1f5f4c;
  background: var(--green-bg);
  color: #c7fff0;
}

.callout.warning {
  border-color: #5b4d1d;
  background: var(--yellow-bg);
  color: #ffe8a3;
}

/* ========================================
   TABLES
   ======================================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: var(--panel-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: #fff;
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */
.lead {
  color: var(--muted);
  font-size: 18px;
}

.small {
  color: var(--muted);
  font-size: 14px;
}

.subtle {
  color: #888;
  font-size: 14px;
}

.route {
  font-family: var(--mono);
  font-size: 13px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  h1 {
    font-size: 30px;
  }
  
  .language-selector {
    flex-wrap: wrap;
  }
  
  .lang-tab {
    font-size: 12px;
    padding: 6px 10px;
  }
}
