
* {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px; /* Base font size */
  font-weight: bold;
  text-transform: uppercase;
}

body {
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.6;
}

/* Navigation */
nav {
  background-color: #4d4a4a;
  color: white;
  display: grid;
  grid-template-columns: 30% 60%;
  column-gap: 10%;
  padding: 0 5%;
}

.array-inputs {
  display: flex;
  flex-direction: column; /* Stack items vertically */
  align-items: center; /* Center-align all elements */
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  width: 300px; /* Fixed width for neat appearance */
  margin: 20px auto;
  color: #333; /* Set text color for all text inside this container */
}

.input-group label {
  flex: 1;
  font-size: 16px;
  font-weight: bold;
  margin-right: 10px;
  text-align: left;
  color: #333; /* Set color to dark gray for the label text */
}

.input-group span {
  font-size: 14px;
  font-weight: bold;
  color: #333; /* Ensure the range value text is visible */
}

#size-value, #speed-value {
  font-size: 14px;
  font-weight: bold;
  min-width: 30px;
  text-align: center;
  color: #333; /* Ensure the value text is visible */
}

button {
  background-color: #4CAF50;
  color: white; /* Text inside buttons will be white */
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

button:hover {
  background-color: #45a049;
}

button:active {
  background-color: #3e8e41;
}


/* Header Section */
nav .header_right {
  display: flex;
  flex-direction: column;
}

nav .header_right .nav-heading {
  font-size: 2.5rem;
  padding: 3% 0;
  text-align: center;
}

.algos {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
}

.algos button {
  padding: 10px 20px;
  font-size: 16px;
}

.algos button:hover {
  background-color: rgb(255, 106, 0);
  cursor: pointer;
}

.algos .butt_locked {
  background-color: transparent;
  cursor: pointer;
}

.algos .butt_selected {
  background-color: white;
  color: green;
}

.algos .butt_unselected:hover {
  background-color: blue;
}

/* Main Section */
section {
  display: grid;
  grid-template-columns: 20% 60% 20%;
  gap: 20px;
  padding: 20px;
}

section .Complexity_Containers {
  margin-top: 20%;
}

section .Pair_Definitions p {
  display: inline;
}

section #Info_Cont1 {
  padding: 20% 10%;
}

section #Info_Cont1 h3 {
  text-decoration: underline;
}
/* Deep Gray color for array container */
#array_container {
  display: flex;
  width: 100%;
  height: 70vh;
  background-color: #dfd5d9;  /* Deep gray background color */
  border-radius: 10px;        /* Optional: Adds rounded corners */
}


section #Info_Cont2 {
  padding: 20% 10%;
}

section #Info_Cont2 h3 {
  text-decoration: underline;
}

.hide {
  display: none;
}

/* Mobile Specific Adjustments */

/* For mobile screens */
@media (max-width: 600px) {
  /* Navigation layout */
  nav {
    grid-template-columns: 1fr; /* Stack nav items vertically */
  }

  /* Array inputs container */
  .array-inputs {
    width: 100%;
    margin-top: 20px;
  }

  .input-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .input-group label, .input-group span {
    width: 100%;
    text-align: left;
  }

  .input-group input {
    width: 100%;
    margin-top: 10px;
  }

  .algos {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .algos button {
    width: 80%; /* Button takes up more width */
  }

  section {
    grid-template-columns: 1fr; /* Stack sections vertically */
  }

  section #Info_Cont1, section #Info_Cont2 {
    padding: 10%;
  }

  /* Reduce font sizes for mobile */
  nav .header_right .nav-heading {
    font-size: 1.5rem;
  }

  .algos button {
    font-size: 14px;
  }

  section #Info_Cont1 h3, section #Info_Cont2 h3 {
    font-size: 1.2rem;
  }

  /* Make Time and Space Complexity side by side on mobile */
  section .Complexity_Containers {
    display: flex;
    justify-content: space-between; /* Space between sections */
    gap: 10px;
    flex-wrap: wrap; /* Allow wrapping to ensure no overflow */
    margin-top: 10px;
  }

  section .Complexity_Containers .Pair_Definitions {
    flex: 1 1 48%; /* Flex properties to allow equal width and adjust based on screen */
    margin-bottom: 10px;
  }

  section .Complexity_Containers .Pair_Definitions p {
    display: inline;
  }
}
/* Default Light Theme */
:root {
  --bg-color: #f5f5f5;
  --text-color: #333;
  --button-bg-color: #4CAF50;
  --button-text-color: white;
  --button-hover-bg-color: #45a049;
  --array-container-bg-color: #fff;
}

/* Dark Theme */
body.dark-mode {
  --bg-color: #1a1a1a;
  --text-color: #f0f0f0;
  --button-bg-color: #333;
  --button-text-color: #fff;
  --button-hover-bg-color: #555;
  --array-container-bg-color: #2f2f2f;
}

/* Apply Theme to Body */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s ease;
}

#array_container {
  background-color: var(--array-container-bg-color);
}

/* Button Styling */
button {
  background-color: var(--button-bg-color);
  color: var(--button-text-color);
}

button:hover {
  background-color: var(--button-hover-bg-color);
}

/* Range Input Styling */
.input-group input {
  background-color: var(--button-bg-color); /* Use same color for sliders */
  color: var(--text-color); /* Text color for range inputs */
}

.input-group span {
  color: var(--text-color); /* Range value text */
}

/* Theme Toggle */
.theme-toggle {
  padding: 10px;
  text-align: center;
}

#theme-toggle {
  margin-left: 10px;
  cursor: pointer;
}

