* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background-color: #f0f4f8;
}

.container {
  text-align: center;
  width: 80%;
}

h1 {
  margin: 20px 0;
  color: #8a0202;
  font-size: 2.5rem;
}

h2 {
  margin: 30px 0 10px;
  color: #1a008b;
  font-size: 2rem;
}

.input-section {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

.input-section input {
  padding: 8px;
  font-size: 16px;
  width: 200px;
}

.input-section button {
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
  margin-left: 10px;
}

button {
  border: 2px dotted steelblue;
  border-radius: 10px;
  color:rgb(75, 1, 97);
  padding: 0.5% 1%;
  font-size: 16px;
  cursor: pointer;
  margin-left: 20px; /* Adds space between the title and button */
  
}
button:hover{
  font-size:20px ;
  padding: 0.25% 0.5%;
  color: white;
  background-color:#333;
  border: none;
}
.linked-list {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  overflow-x: auto;
}

.node {
  display: flex;
  align-items: center;
  border: 2px solid #4CAF50;
  border-radius: 8px;
  margin: 0 10px;
  padding: 10px;
  position: relative;
  background-color: #e1f5e8;
}

.data {
  font-weight: bold;
  padding: 5px 10px;
}

.arrow {
  width: 30px;
  height: 2px;
  background-color: #333;
  position: relative;
  margin-right: 10px;
}

.arrow::after {
  content: '';
  position: absolute;
  right: -8px;
  top: -5px;
  border-left: 10px solid #333;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.leftright{
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  
}

.double-arrow-left, .double-arrow-right {
  width: 20px;
  height: 2px;
  background-color: #333;
  position: relative;
  margin: 0 5px;
}

.double-arrow-left::before {
  content: '';
  position: absolute;
  left: -8px;
  top: -5px;
  border-right: 10px solid #333;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.double-arrow-right::after {
  content: '';
  position: absolute;
  right: -8px;
  top: -5px;
  border-left: 10px solid #333;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.null {
  font-weight: bold;
  color: #888;
  display: flex;
  align-items: center;
}

/* Updated Doubly Linked List Arrow Styling */
.double-arrow-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 5px;
}

.double-arrow-left, .double-arrow-right {
  width: 20px;
  height: 2px;
  background-color: #333;
  position: relative;
  margin: 3px 0;
}

.double-arrow-left::before {
  content: '';
  position: absolute;
  left: -8px;
  top: -5px;
  border-right: 10px solid #333;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.double-arrow-right::after {
  content: '';
  position: absolute;
  right: -8px;
  top: -5px;
  border-left: 10px solid #333;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

/* Additional styling to prevent overlap with "null" in Doubly Linked List */
.double-arrow-right.last-arrow {
  margin-right: 10px;
}
