/* RESET & VARIABLE DEFINITIONS */
:root {
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Color Palette (Slate/Teal Dark Mode) */
  --bg-primary: #0a0f1d;
  --bg-secondary: rgba(16, 22, 42, 0.65);
  --bg-panel: rgba(22, 30, 54, 0.45);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-focus: rgba(6, 182, 212, 0.5);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dark: #64748b;
  
  --primary: #06b6d4;
  --primary-glow: rgba(6, 182, 212, 0.3);
  --secondary: #3b82f6;
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --error: #ef4444;
  --error-bg: rgba(239, 68, 68, 0.15);
  
  --sidebar-width: 280px;
  --header-height: 80px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  height: 100vh;
  position: relative;
  line-height: 1.5;
}

/* Background Glow Effects */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.12;
  pointer-events: none;
}
.glow-1 {
  width: 400px;
  height: 400px;
  background-color: var(--primary);
  top: -100px;
  right: -50px;
}
.glow-2 {
  width: 500px;
  height: 500px;
  background-color: var(--secondary);
  bottom: -150px;
  left: -100px;
}
.glow-3 {
  width: 300px;
  height: 300px;
  background-color: var(--success);
  top: 50%;
  left: 40%;
}

/* APP CONTAINER */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* SIDEBAR STYLING */
.sidebar {
  width: var(--sidebar-width);
  background-color: rgba(10, 15, 29, 0.85);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  z-index: 10;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-main);
}
.logo-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}
.logo span span {
  color: var(--primary);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.status-text {
  font-weight: 500;
  color: var(--success);
}

/* SIDEBAR MENU */
.sidebar-menu {
  flex: 1;
  padding: 20px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.menu-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dark);
  padding: 16px 12px 6px;
  letter-spacing: 1px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.menu-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  transition: var(--transition-fast);
}

.menu-item:hover {
  color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.03);
}

.menu-item.active {
  color: var(--text-main);
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-left: 3px solid var(--primary);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.menu-item.active i {
  color: var(--primary);
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-dark);
  background-color: rgba(5, 7, 14, 0.5);
}
.footer-title {
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 2px;
}

/* MAIN CONTENT AREA */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 40px;
  background-color: var(--bg-secondary);
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.content-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text-main) 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.content-header p {
  color: var(--text-muted);
  font-size: 15px;
}

.github-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
}
.github-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* WORKSPACE - TWO PANELS GRID */
.workspace {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 40px;
}

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

/* GENERAL PANEL STYLING */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.01);
}

.panel-header h2 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}
.panel-header h2 i {
  color: var(--primary);
}

.panel-body {
  padding: 24px;
}

/* CONFIG PANEL SPECIFIC */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background-color: rgba(5, 7, 14, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  font-size: 14px;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
  background-color: rgba(5, 7, 14, 0.8);
}

/* select custom styling arrow */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

/* ENDPOINT CARD */
.endpoint-card {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 24px;
}

.endpoint-method-path {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.method-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}
.method-badge.get {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}
.method-badge.post {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.endpoint-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.parameters-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 18px;
}

.parameters-section-header h3 {
  font-size: 14px;
  font-weight: 600;
}

.optional-info {
  font-size: 11px;
  color: var(--text-dark);
}

/* INPUT DYNAMIC LABELS */
.required-star {
  color: var(--error);
  margin-left: 2px;
}

/* SUBMIT BUTTON */
.submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border: none;
  color: #ffffff;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition-normal);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
  filter: brightness(1.1);
}

.submit-btn:active {
  transform: translateY(0);
}

/* RESPONSE PANEL SPECIFIC */
.response-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.status-badge.success {
  background-color: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-badge.error {
  background-color: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.time-badge {
  font-size: 12px;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.code-viewer-body {
  padding: 0 !important;
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.code-viewer-header {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 10px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-name {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dark);
  font-weight: 500;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.code-pre-wrapper {
  position: relative;
  flex: 1;
  min-height: 420px;
  display: flex;
}

.code-pre-wrapper pre {
  margin: 0;
  padding: 24px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
  background-color: rgba(5, 7, 14, 0.4);
}

.json-code {
  color: #a5b4fc;
}

/* Syntax highlighting color mappings */
.json-key {
  color: #38bdf8; /* sky */
}
.json-string {
  color: #34d399; /* emerald */
}
.json-number {
  color: #fb7185; /* rose */
}
.json-boolean {
  color: #fbbf24; /* amber */
}
.json-null {
  color: #a78bfa; /* purple */
}

/* LOADER OVERLAY */
.loader-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(10, 15, 29, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
  backdrop-filter: blur(4px);
  z-index: 5;
}

.loader-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loader-overlay span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

/* DOCS / INFO SECTION */
.docs-section {
  margin-bottom: 20px;
}

.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.doc-card {
  background-color: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition-fast);
}

.doc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.1);
  background-color: rgba(0, 0, 0, 0.16);
}

.doc-card .icon {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 12px;
}

.doc-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-main);
}

.doc-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
