/* ===== Base Styles ===== */
body {
  font-family: "Inter", sans-serif;
  background-color: #fdfbf8;
  color: #4a4a4a;
}

/* ===== Navigation ===== */
.nav-link {
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}
.nav-link.active {
  border-bottom-color: #a0522d;
  color: #a0522d;
  font-weight: 600;
}

/* ===== Sidebar Styles (Mobile) ===== */
.sidebar-open {
  transform: translateX(0);
}

#main-content.sidebar-open {
  margin-left: 16rem;
}

@media (min-width: 1024px) {
  #main-content.sidebar-open {
    margin-left: 0;
  }
}

/* ===== Content Sections ===== */
.content-section {
  display: none;
}
.content-section.active {
  display: block;
}

/* ===== Card Styles ===== */
.card {
  background-color: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.3s ease;
}
.card:hover {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.07),
    0 4px 6px -4px rgb(0 0 0 / 0.07);
}

/* ===== Lens Card Styles ===== */
.lens-card {
  transition: all 0.3s ease;
}
.lens-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* ===== Signal Selector ===== */
.signal-selector {
  cursor: pointer;
  transition: all 0.2s ease;
}
.signal-selector.active {
  border-color: #2563eb;
  background-color: #eff6ff;
}

/* ===== Tooltip Styles ===== */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltip .tooltiptext {
  visibility: hidden;
  width: 280px;
  background-color: #1f2937;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -140px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ===== Chart Containers ===== */
.chart-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  height: 350px;
  max-height: 400px;
}

@media (min-width: 768px) {
  .chart-container {
    height: 400px;
  }
}

/* ===== Input Range Sliders ===== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #eaeaea;
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #a0522d;
  cursor: pointer;
  border-radius: 50%;
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #a0522d;
  cursor: pointer;
  border-radius: 50%;
  border: none;
}

/* ===== Formula Display ===== */
.formula {
  font-family: "Times New Roman", Times, serif;
  font-size: 1.1rem;
  color: #333;
  background-color: #f9f9f9;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #eee;
  overflow-x: auto;
}

/* ===== Tab Buttons ===== */
.tab-button {
  transition: all 0.3s ease;
}
.tab-button.active {
  background-color: #a0522d;
  color: white;
}

/* ===== Code Block Syntax Highlighting ===== */
.code-block {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  overflow-x: auto;
}

.code-keyword {
  color: #c792ea;
  font-weight: 600;
}

.code-function {
  color: #82aaff;
}

.code-string {
  color: #c3e88d;
}

.code-comment {
  color: #697098;
  font-style: italic;
}

.code-number {
  color: #f78c6c;
}

/* ===== Info Cards ===== */
.info-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.info-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ===== BioXen-specific Styles ===== */
.sidebar-nav-link.active {
  background-color: #0d9488;
  color: white;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

#sidebar {
  min-height: 100vh;
}

@media (max-width: 1023px) {
  #sidebar {
    height: 100vh;
    top: 0;
  }
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
}

.accordion-button.open + .accordion-content {
  max-height: 1000px;
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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