.code-line.highlight {
  color: #ffeb3b;
}

input[type="range"] {
  accent-color: #90EE90;
  background-color: #0b1020;
  width: 100%;
  --value: 0%;
}

input[type="range"]::-webkit-slider-runnable-track,
input[type="range"]::-moz-range-track {
  background: linear-gradient(to right,
    #00BFB2 0%,
    #00BFB2 var(--value),
    #ddd var(--value),
    #ddd 100%);
  height: 5px;
  border-radius: 3px;
}

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

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

button {
  font-family: "Fira Code", Consolas, monospace;
  font-size: 100%;
  background: #C9C5CB;
  color: black;
  border: none;
  border-radius: 6px;
  transition: all 0.2s;
  cursor: pointer;
}

input[type=text], input[type=number] {
  outline: none;
  border: 10px solid #0b1120;
  background-color: #C9C5CB;
  font-family: "Fira Code", Consolas, monospace;
  font-size: 100%;
  padding: 0.2em;
  outline: none;
  border: 2px solid rgb(200, 200, 200);
  border-radius: 20px;
}

#codePanel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 400px;
  max-height: 400px;
  padding: 15px;
  background: #111827;
  color: #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  font-family: "Fira Code", Consolas, monospace;
  font-size: 14px;
  overflow-y: auto;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid #374151;
}

#codePanel.collapsed {
  height: 50px;
  max-height: 50px;
  overflow: hidden;
}

#codeTitle {
  font-size: 14px;
  font-weight: bold;
  color: #9ca3af;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#codeTitle .toggle-icon {
  font-size: 12px;
  color: #9ca3af;
}

#codeLines {
  margin: 0;
  white-space: pre;
  font-size: 10px;
  line-height: 1.5;
  color: #e5e7eb;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #0b1120;
    color: #f9fafb;
}

.page {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.section {
    background-color: #111827;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.section h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.section h3 {
    margin-bottom: 6px;
}

.section ul {
    padding-left: 20px;
}

.algo-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #374151;
}

.btn {
    margin-top: 10px;
    padding: 8px 16px;
    background-color: #22c55e;
    color: #022c22;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.btn:hover {
    background-color: #16a34a;
}

.merge-step {
    margin-bottom: 25px;
    text-align: center;
}

.step-title {
    font-size: 18px;
    font-family: "Fira Code", Consolas, monospace;
    margin-bottom: 15px;
    color: #00BFB2;
    font-weight: bold;
}

.arrays-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 80px;
}

.array-box {
    display: flex;
    align-items: center;
    border: 2px solid #00BFB2;
    border-radius: 8px;
    padding: 8px 15px;
    background-color: #111827;
    min-height: 60px;
    gap: 5px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.array-element {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #00BFB2;
    border-radius: 5px;
    font-size: 18px;
    font-family: "Fira Code", Consolas, monospace;
    background-color: #1a1a2e;
    color: #FFFFFF;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.step-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #00BFB2, transparent);
    margin: 25px 0;
    border-radius: 1px;
}

.final-result {
    color: #00BFB2;
    font-size: 22px;
    font-weight: bold;
    margin-top: 20px;
    padding: 15px;
    background-color: #111827;
    border-radius: 8px;
    border: 2px solid #00BFB2;
    font-family: "Fira Code", Consolas, monospace;
}

.error-message {
    color: #ff6b6b;
    font-size: 22px;
    font-weight: bold;
    margin-top: 10px;
    font-family: "Fira Code", Consolas, monospace;
}