/* Light mode color variables */
:root {
  --primary-color: #F29559;
  --secondary-color: #F29559;
  --text-color: #274156;
  --background-color: #FBFCFF;
  --grid-color: #e0e0e0;
  --node-active-color: #F29559; 
  --node-inactive-color: #1C6E8C;
  --node-stroke-color: #EEF1EF;
  --link-active-color: #F29559; 
  --link-inactive-color: #95a5a6;
  --sidebar-background: rgba(234, 234, 234, 0.684);
  --sidebar-border: rgba(0, 0, 0, 0.7);
  --node-non-neighbor-color: #274156;
}

/* Dark mode color variables */
body.dark-mode {
  --primary-color: #6955E8; 
  --secondary-color: #6955E8; 
  --text-color: #EEF1EF;
  --background-color: #0b132b;
  --grid-color: #1c2541;
  --node-active-color: #6955E8; 
  --node-inactive-color: #204346;
  --node-stroke-color: #EEF1EF;
  --link-active-color: #6955E8; 
  --link-inactive-color: #555555;
  --sidebar-background: rgba(18, 18, 18, 0.5);
  --sidebar-border: rgba(51, 51, 51, 0.7);
  --node-non-neighbor-color: #262626;
}


.archivo-regular {
  font-family: "Archivo", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

#dark-mode-toggle {
  margin-left: auto; 
  cursor: pointer;
}

#dark-mode-icon {
  font-size: 20px;
}

body {
  margin: 0;
  overflow: hidden;
  font-family: "Archivo", sans-serif;
  color: var(--text-color);
}

.title{
  font-size: 2.5rem;
  font-weight: 900;  
  color: var(--primary-color);
}

.main-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  position: relative;
  z-index: 1; 
}

.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  background-color: transparent;
  position: relative;
  z-index: 3; /* Above everything else */
}

.nav-item {
  margin: 0 20px;
  padding: 8px 15px;
  font-weight: 500;
  font-size: 1em;
  cursor: pointer;
  transition: color 0.3s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--primary-color);
}

.nav-item.active {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2rem;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-color);
}

.content-area {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

.grid-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0; 

  background-color: var(--background-color);
  background-image:
    /* Horizontal lines */
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px),
    /* Vertical lines */
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px);

  background-size: 25px 25px;

  background-position: center center;
}

/* Graph container */
.visualization-container {
  position: relative;
  width: 70%;
  height: 100%;
  overflow: hidden;
}

#network-graph {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1; 
}

/* Sidebar styling */
.content-sidebar {
  width: 30%;
  height: 90%;
  margin-right: 2vw;
  background-color: var(--sidebar-background); /* Semi-transparent background */
  border: 1px solid var(--sidebar-border);
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 2;
  position: relative;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

.sidebar-header {
  position: sticky;
  top: 0;
  padding-top: 20px;
  z-index: 5;
}

.sidebar-content-wrapper {
  overflow-y: auto;
  flex-grow: 1;
}

.content-sidebar h2 {
  margin-top: 0;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
  font-size: 2rem;
}

.slideshow-container {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.slide {
  display: none;
  width: 100%;
  /* height: 250px; */
  overflow: hidden;
  transition: opacity 0.5s ease-in-out;
}

.slide-image {
  width: 100%;
  height: 250px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

.prev-slide, .next-slide {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  transform: translateY(-50%);
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);
}

.prev-slide {
  left: 0;
  border-radius: 0 3px 3px 0;
}

.next-slide {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev-slide:hover, .next-slide:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.dots-container {
  text-align: center;
  padding: 10px 0;
}

.dot {
  cursor: pointer;
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: var(--sidebar-border);
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.dot.active, .dot:hover {
  background-color: var(--primary-color);
}

body.dark-mode .prev-slide, 
body.dark-mode .next-slide {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .prev-slide:hover, 
body.dark-mode .next-slide:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

#sidebar-content {
  line-height: 1.6;
  margin-top: 20px;
}

#sidebar-image-container {
  width: 100%;
  margin-top: 15px;
  margin-bottom: 15px;
  text-align: center;
}

#sidebar-image {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  object-fit: cover;
}

/* Link styling */
.link {
  stroke-opacity: 0.8;
}

.link.active {
  stroke: var(--link-active-color);
}

.link-click-area {
  stroke: transparent;
  cursor: pointer;
}

/* Node styling */
.node {
  stroke: var(--node-stroke-color);
  stroke-width: 1.5px;
}

/* Text label styling */
.label {
  font-size: 20px;
  fill: var(--text-color);
  font-weight: 500;
  pointer-events: none;
  paint-order: stroke;
  stroke: var(--node-stroke-color);
  stroke-width: 3px; 
  stroke-linejoin: round;
}

body.dark-mode .label {
  stroke: none;
}

#neighbor-nodes-section {
  margin-top: 20px;
}

#neighbor-nodes-list {
  display: flex;
  flex-wrap: wrap;
}

.neighbor-section-heading {
  width: 100%;
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--text-color);
  border-bottom: 1px solid var(--primary-color);
  padding-bottom: 5px;
}

.neighbor-group-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 5px;
}

.neighbor-node-item {
  margin-bottom: 5px;
  cursor: pointer;
  color: white;
  padding: 5px 10px;
  border-radius: 10px;
  background-color: var(--primary-color);
  font-weight: 500;
  cursor: pointer;
}

.neighbor-node-item:hover {
  text-decoration: underline;
}

/* DARK MODE TOGGLE */
.circle {
  position: relative;
  border-radius: 100%;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(40deg, #FF0080, #FF8C00 70%);
  margin: auto;
  transition: background 0.6s ease;
  cursor: pointer;
}

.crescent {
  position: absolute;
  border-radius: 100%;
  right: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: #FBFCFF;
  transform: scale(0);
  transform-origin: top right;
  transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}

body.dark-mode .circle {
  background: linear-gradient(40deg, #8983F7, #A3DAFB 70%);
}

body.dark-mode .crescent {
  background: #0b132b;
}

/* Content container */
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Custom Scrollbar Styling */
.sidebar-content-wrapper::-webkit-scrollbar {
  width: 10px; 
}

.sidebar-content-wrapper::-webkit-scrollbar-track {
  background: transparent; 
}

/* For Firefox */
.sidebar-content-wrapper {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) transparent;
}

.content-sidebar::-webkit-scrollbar {
  width: 10px;
}

.content-sidebar::-webkit-scrollbar-track {
  background: transparent;
}


