.panel {
  position: absolute;
  top: 80px;
  bottom: 20px;
  width: 320px;
  padding: 20px;
  border-radius: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
}

.panel::-webkit-scrollbar {
  width: 5px;
}
.panel::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 5px;
}

.input-panel {
  left: 20px;
}

.output-panel {
  right: 20px;
}

h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--neon-cyan);
  border-bottom: 1px solid var(--neon-cyan);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

h4 {
  font-size: 14px;
  color: var(--electric-blue);
  margin-bottom: 5px;
}

/* Grid Controls */
.grid-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cell-input {
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.cell-input label {
  color: #ccc;
  margin-bottom: 2px;
}

.cell-input select {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--electric-blue);
  color: white;
  padding: 5px;
  border-radius: 4px;
  font-family: var(--font-body);
  outline: none;
  transition: all 0.3s;
}

.cell-input select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 5px var(--neon-cyan);
}

/* Buttons */
button {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: bold;
  padding: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}

.analyze-btn {
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  width: 100%;
  margin-top: 10px;
}

.analyze-btn:hover {
  background: var(--neon-cyan);
  color: black;
  box-shadow: 0 0 15px var(--neon-cyan);
}

.reset-btn {
  background: rgba(255, 0, 64, 0.1);
  border: 1px solid var(--danger-red);
  color: var(--danger-red);
  width: 100%;
  margin-top: 5px;
}

.reset-btn:hover {
  background: var(--danger-red);
  color: white;
  box-shadow: 0 0 15px var(--danger-red);
}

.export-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #ccc;
  color: white;
  width: 100%;
  margin-top: auto;
}
.export-btn:hover {
  background: #ccc;
  color: black;
}

/* Legend */
.legend {
  margin-top: auto;
  font-size: 13px;
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 5px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

/* Output Panel specific */
.inference-list {
  list-style: none;
  font-size: 15px;
  color: #ddd;
}

.inference-list li {
  margin-bottom: 8px;
  padding-left: 15px;
  position: relative;
}

.inference-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--neon-cyan);
}

.placeholder-text {
  color: #888;
  font-style: italic;
}

.path-display {
  font-family: 'Courier New', Courier, monospace;
  background: rgba(0, 240, 255, 0.1);
  padding: 10px;
  border-radius: 5px;
  border-left: 3px solid var(--neon-cyan);
  word-break: break-all;
}

.reasoning-log {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.log-entries {
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 5px;
  flex-grow: 1;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  color: #0f0;
  overflow-y: auto;
  max-height: 150px;
}

.log-entries div {
  margin-bottom: 5px;
  opacity: 0.8;
}
