/* Style system variables */
:root {
  --bg-main: #090d16;
  --bg-surface: #101625;
  --bg-card: rgba(22, 30, 49, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.35);
  
  --primary-color: #6366f1;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-secondary-muted: #64748b;
  
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.main-content {
  flex-grow: 1;
}

/* Custom Gradients */
.text-primary-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-primary-color {
  color: var(--primary-color) !important;
}

.btn-primary-gradient {
  background: var(--primary-gradient);
  border: none;
  color: #ffffff;
  transition: var(--transition-smooth);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.btn-primary-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-primary-gradient:hover::before {
  opacity: 1;
}

.btn-primary-gradient:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

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

.btn-outline-secondary-dark {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.btn-outline-secondary-dark:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--text-muted);
  color: var(--text-main);
  transform: translateY(-2px);
}

/* Navbar styles */
.main-navbar {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(9, 13, 22, 0.8);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.brand-logo {
  font-size: 1.5rem;
  display: inline-flex;
}

.navbar-nav .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: var(--transition-smooth);
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
  color: var(--text-main);
}

/* Background glowing spheres */
.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

.sphere-1 {
  width: 400px;
  height: 400px;
  background: #6366f1;
  top: -100px;
  right: -50px;
}

.sphere-2 {
  width: 350px;
  height: 350px;
  background: #ec4899;
  bottom: 10% ;
  left: -100px;
}

.sphere-3 {
  width: 500px;
  height: 500px;
  background: #8b5cf6;
  top: 30%;
  left: 40%;
}

/* Hero Section */
.hero-section {
  padding: 100px 0 80px 0;
}

.max-width-600 {
  max-width: 600px;
}

.fw-extrabold {
  font-weight: 800;
}

/* Badges */
.badge-premium {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 50px;
}

.badge-premium-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 50px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
}

/* Pulse animation */
.pulse-indicator {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    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.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Cards layout styling */
.endpoint-card, .console-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  transition: var(--transition-smooth);
}

.endpoint-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.1);
}

.border-secondary-dark {
  border-color: var(--border-color) !important;
}

.text-secondary-muted {
  color: var(--text-muted);
}

/* Method Badges */
.badge-method {
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
}

.badge-method-get {
  background-color: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-method-post {
  background-color: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  padding: 0.2rem 0.5rem;
  background-color: rgba(99, 102, 241, 0.05);
  border-radius: 6px;
}

/* Schema collapse codebox */
.schema-code-box {
  background-color: rgba(9, 13, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  max-height: 200px;
  overflow-y: auto;
}

.schema-code-box pre {
  margin: 0;
}

.schema-code-box code {
  color: #818cf8;
}

/* Interactive Console elements */
.select-dark, .input-dark {
  background-color: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.select-dark:focus, .input-dark:focus {
  background-color: rgba(9, 13, 22, 0.95);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  color: var(--text-main);
}

.select-dark option {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

/* Custom console panel */
.console-window {
  background-color: #050811;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  min-height: 320px;
  color: #38bdf8;
  position: relative;
  overflow: hidden;
}

.console-window code {
  color: #38bdf8;
  display: block;
}

/* Loader Overlay */
.console-loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(5, 8, 17, 0.9);
  z-index: 10;
  border-radius: 12px;
  transition: var(--transition-smooth);
}

/* Copy button in console */
.btn-console-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.btn-console-copy:hover {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
}

/* Range input slider styling */
.form-range::-webkit-slider-runnable-track {
  background-color: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
}

.form-range::-webkit-slider-thumb {
  background: var(--primary-color);
  margin-top: -5px;
}

.form-range::-moz-range-track {
  background-color: rgba(255, 255, 255, 0.1);
  height: 6px;
  border-radius: 3px;
}

.form-range::-moz-range-thumb {
  background: var(--primary-color);
}

/* Custom badges for API console outcomes */
.badge-console-metric {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 0.4rem 0.7rem;
}

.badge-console-status {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0.4rem 0.7rem;
}

/* Mock User Card styling (when fetched) */
.user-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Custom Scrollbar for Code Elements */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Footer styles */
.main-footer {
  background-color: #060910;
}

.footer-link {
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--primary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 60px 0 40px 0;
  }
  
  .display-3 {
    font-size: 2.75rem;
  }
}
