*:focus {
  outline: 4px solid rgba(97, 175, 239, 0.5);
  /* Focus ring */
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background-color: #282c34;
  /* Dark background */
  color: #abb2bf;
  /* Light text color */
  font-family: Arial, sans-serif;
}

button {
  cursor: pointer;
  background-color: #3e4451;
  /* Darker button background */
  color: #abb2bf;
  /* Light text color */
  border: none;
  border-radius: 3px;
  padding: 6px 12px;
  font-size: 0.9em;
  /* Slightly smaller font size */
}

button:hover {
  background-color: #4b5263;
  /* Lighter on hover */
}

#drawing-tools button.selected {
  background-color: #044b77;
}

.frame.selected {
  border: 2px solid #044b77;
}

#frames-list {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.frame {
  border: 1px solid #3e4451;
  border-radius: 3px;
  padding: 5px;
  margin-bottom: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
}

.frame img {
  max-width: 100%;
  height: auto;
  border: 1px solid #3e4451;
}

.frame-name {
  text-align: center;
  font-size: 12px;
}

.frame button {
  border: none;
  color: #abb2bf;
  cursor: pointer;
  width: 100%;
}

.frame button:hover {
  color: #61afef;
}

.property-group {
  margin-bottom: 8px;
  /* More compact spacing */
  padding: 5px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  /* Changed to column to accommodate drawer */
  background-color: #2c323c;
}

.property-group-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.property-group label {
  display: block;
  font-weight: bold;
  color: #e5c07b;
}

.property-group input[type="text"],
#property-editor input[type="number"],
#property-editor input[type="color"] {
  width: 100%;
  /* Adjust for padding */
  padding: 4px;
  /* More compact */
  border: 1px solid #3e4451;
  border-radius: 3px;
  background-color: #343a45;
  color: #abb2bf;
}

.property-group input {
  width: 100%;
  padding: 5px;
  background-color: #3e4451;
  border: 1px solid #5c6370;
  color: #abb2bf;
  border-radius: 3px;
}

.property-group input:focus {
  outline: none;
  border-color: #61afef;
}

.property-group input[type="checkbox"] {
  width: auto;
  margin-right: 5px;
}

.property-group input[type="color"] {
  width: 80px;
  height: 30px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

#top-panel {
  height: 40px;
  /* Slightly more compact */
  background-color: #21252b;
  /* Darker background */
  border-bottom: 1px solid #3e4451;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

#play-button,
#save-button,
#load-button {
  background-color: #61afef;
  /* Accent color */
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.9em;
}

#play-button:hover,
#save-button:hover,
#load-button:hover {
  background-color: #529dcc;
}

#pause-button {
  background-color: #e06c75;
  /* Red color for pause */
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.9em;
}

#pause-button:hover {
  background-color: #c6455b;
}

#pause-button:disabled {
  background-color: #5c6370;
  cursor: not-allowed;
}

#stop-button {
  background-color: #e5c07b;
  /* Yellow/orange color for stop */
  color: white;
  padding: 5px 10px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.9em;
}

#stop-button:hover {
  background-color: #d19a4b;
}

#stop-button:disabled {
  background-color: #5c6370;
  cursor: not-allowed;
}

.resizer {
  width: 8px;
  background-color: #3e4451;
  cursor: ew-resize;
  flex-shrink: 0;
}

.resizer:hover {
  background-color: #61afef;
}

#main-content {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
  /* Prevent content from overflowing during resize */
}

#left-panel {
  flex-shrink: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#center-panel {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Crucial for canvas scaling */
}

#game-container {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* Hide overflow if canvas is larger than container */
  border: 2px solid grey;
  /* Default grey border */
  box-sizing: border-box;
  /* Add this line */
}

#game-container.game-active {
  border: 2px solid white;
  /* White border when game is active */
}

#gamecanvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  /* Remove extra space below canvas */
  object-fit: contain;
  /* Scale down to fit, maintain aspect ratio */
}

#right-panel {
  flex-shrink: 0;
  border-left: 1px solid #3e4451;
  padding: 10px;
  overflow-y: auto;
  background-color: #21252b;
}

#property-editor label {
  display: block;
  font-weight: bold;
  color: #e0e0e0;
  font-size: 0.9em;
}

#property-editor button {
  background-color: #61afef;
  color: white;
  padding: 6px 10px;
  /* More compact */
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.9em;
}

#property-editor button:hover {
  background-color: #529dcc;
}

.node-item {
  padding: 0;
  /* Remove padding from node-item itself */
  cursor: pointer;
  border-bottom: none;
  font-size: 0.95em;
  display: flex;
  flex-direction: column;
  /* Make it stack vertically */
  position: relative;
  transition: background-color 0.1s ease;
}

.node-item:hover {
  background-color: #343a45;
}

.node-item.selected {
  background-color: #4b5263;
  color: white;
}

.node-item.selected .node-toggle {
  color: #61afef;
}

.node-header {
  display: flex;
  /* Keep header elements in a row */
  align-items: center;
  padding: 5px 8px;
  /* Apply padding here */
}

.node-toggle {
  margin-right: 5px;
  font-weight: bold;
  color: #98c379;
  width: 12px;
  text-align: center;
  flex-shrink: 0;
}

.node-children {
  margin-left: 18px;
  /* Increased indentation */
  border-left: 1px solid #3e4451;
  /* Vertical line for hierarchy */
  padding-left: 5px;
  /* Space between line and children */
}

/* Drag and Drop Indicators */
.drag-over-above::before,
.drag-over-below::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #61afef;
  /* Accent color */
}

.drag-over-above::before {
  top: 0;
}

.drag-over-below::after {
  bottom: 0;
}

.drag-over-child {
  background-color: #3e4451;
  /* Highlight background for child drop */
  border: 1px dashed #61afef;
}

#custom-node-editor {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.CodeMirror {
  flex-grow: 1;
  height: auto;
  font-size: 0.9em;
  /* Compact font size for editor */
}

.CodeMirror-scroll {
  height: 100%;
  overflow: auto;
}

/* Styles for the node type selection dropdown */
.node-select-container {
  background-color: #21252b;
  color: #abb2bf;
  border: 1px solid #3e4451;
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 300px;
  /* Fixed width for consistency */
}

.node-search-input {
  width: calc(100% - 10px);
  /* Adjust for padding */
  padding: 8px;
  border: 1px solid #3e4451;
  border-radius: 3px;
  background-color: #343a45;
  color: #abb2bf;
  font-size: 1em;
}

.node-search-input:focus {
  outline: none;
  border-color: #61afef;
}

.node-options-container {
  max-height: 200px;
  /* Limit height for scrollability */
  overflow-y: auto;
  border: 1px solid #3e4451;
  border-radius: 3px;
  background-color: #2c323c;
}

.node-option {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 0.95em;
}

.node-option:hover,
.node-option.selected-option {
  background-color: #3e4451;
  color: #61afef;
}

.node-select-container button {
  background-color: #61afef;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 1em;
  margin-left: 0;
  /* Reset margin */
}

.node-select-container button:hover {
  background-color: #529dcc;
}

.node-select-container button.cancel-button {
  background-color: #e06c75;
}

.node-select-container button.cancel-button:hover {
  background-color: #d45d68;
}

.left,
.right {
  max-width: 50%;
}

.right {
  display: flex;
  justify-content: flex-end;

}

/* List Editor Drawer Styles */

.list-editor-drawer {
  background-color: #282c34;
  border: 1px solid #3e4451;
  border-radius: 3px;
  margin-top: 8px;
  color: #abb2bf;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.list-editor-drawer.expanded {
  max-height: 400px;
  padding: 8px;
}

.list-editor-drawer.collapsed {
  max-height: 0;
  padding: 0 8px;
}

.list-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: bold;
  color: #e5c07b;
  font-size: 0.9em;
}

.list-editor-header button {
  padding: 2px 6px;
  font-size: 12px;
  min-width: 20px;
  height: 20px;
  line-height: 1;
}

.list-editor {
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 8px;
  border: 1px solid #3e4451;
  border-radius: 3px;
  background-color: #21252b;
  padding: 5px;
}

.list-item {
  background-color: #2c323c;
  border-radius: 3px;
  padding: 5px;
}

.list-item input {
  background-color: #3e4451;
  border: 1px solid #5c6370;
  color: #abb2bf;
  border-radius: 3px;
  padding: 3px 6px;
}

.list-item input:focus {
  outline: none;
  border-color: #61afef;
}

.add-button,
.save-button {
  background-color: #61afef;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9em;
}

.add-button:hover,
.save-button:hover {
  background-color: #529dcc;
}

.remove-button {
  background-color: #e06c75;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 0.8em;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-button:hover {
  background-color: #c6455b;
}

/* Vector Input Styles */
.vector-container {
  border-radius: 3px;
  padding: 5px;
}

.vector-container span {
  font-weight: bold;
  font-size: 0.9em;
}

.vector-container input[type="number"] {
  margin: 2px;
  display: inline;
}

/* List item row styling */
.list-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  padding: 5px;
  background-color: #2c323c;
  border-radius: 3px;
}

.vector-item-container {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
}

.vector-item-container span {
  font-size: 0.9em;
  font-weight: bold;
  color: #e5c07b;
}

/* Vector inputs in list items */
.list-item .vector-x,
.list-item .vector-y,
.vector-item-container input[type="number"] {
  background-color: #3e4451;
  border: 1px solid #5c6370;
  color: #abb2bf;
  border-radius: 3px;
  padding: 3px 6px;
  text-align: center;
  width: 60px !important;
}

.list-item .vector-x:focus,
.list-item .vector-y:focus,
.vector-item-container input[type="number"]:focus {
  outline: none;
  border-color: #61afef;
}

/* Tab Styles */
#center-tabs {
  display: flex;
  background-color: #21252b;
  border-bottom: 1px solid #5c6370;
}

.tab-button {
  background-color: transparent;
  color: #abb2bf;
  border: none;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 0.9em;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.tab-button:hover {
  background-color: #2c323c;
}

.tab-button.active {
  background-color: #282c34;
  color: #61afef;
  border-bottom-color: #61afef;
}

.tab-content {
  display: none;
  flex: 1;
  height: calc(100% - 45px);
  /* Subtract tab height */
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Node Editor Styles */
#node-editor-container {
  background-color: #282c34;
  color: #abb2bf;
  max-height: 50%;
}

#node-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #21252b;
  border-bottom: 1px solid #5c6370;
}

#node-editor-title {
  margin: 0;
  color: #e5c07b;
  font-size: 1.2em;
}

#node-editor-controls {
  display: flex;
  gap: 10px;
}

#node-editor-controls button {
  background-color: #61afef;
  color: white;
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9em;
}

#node-editor-controls button:hover {
  background-color: #529dcc;
}

#node-code-editor {
  flex: 1;
  position: relative;
  height: 100%;
  /* Ensure it takes available height */
  overflow-y: auto;
  /* Enable vertical scrolling */
}

#node-code-editor .CodeMirror {
  height: 100%;
  font-size: 14px;
}

#node-editor-container.expanded {
  flex-grow: 1;
  height: 100%;
  max-height: 100%;
}

/* Custom Nodes List Styles */
#custom-nodes-list {
  display: none;
}

#custom-nodes-list.active {
  display: block;
}

.custom-node-item {
  padding: 8px 12px;
  margin: 2px 0;
  background-color: #2c323c;
  border-radius: 3px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.custom-node-item:hover {
  background-color: #3e4451;
  border-left-color: #61afef;
}

.custom-node-item.selected {
  background-color: #3e4451;
  border-left-color: #e5c07b;
  color: #e5c07b;
}

.custom-node-item.builtin {
  border-left-color: #98c379;
}

.custom-node-item.user-defined {
  border-left-color: #c678dd;
}

.custom-node-item .node-type {
  font-weight: bold;
  font-size: 0.9em;
}

.custom-node-item .node-description {
  font-size: 0.8em;
  color: #5c6370;
  margin-top: 2px;
}

a {
  color: #61afef;
  text-decoration: none;
}

/* Part Property Styles */
.part-property-container {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
}

.part-name-display {
  flex-grow: 1;
  padding: 4px;
  border: 1px solid #3e4451;
  border-radius: 3px;
  background-color: #343a45;
  color: #abb2bf;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.part-name-display.drag-over-input {
  border: 2px dashed #61afef;
  background-color: #56b6c2;
}

.clear-part-button {
  background-color: #e06c75;
  /* Red for clear */
  color: white;
  padding: 4px 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8em;
  line-height: 1;
}

.clear-part-button:hover {
  background-color: #c6455b;
}

/* Node Selection Popup Styles */
.node-selection-popup {
  background-color: #21252b;
  color: #abb2bf;
  border: 1px solid #3e4451;
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 15px;
  z-index: 2000;
  /* Higher z-index than node-select-container */
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 350px;
  max-height: 80vh;
}

.node-selection-popup .node-search-input {
  width: calc(100% - 16px);
  /* Adjust for padding */
}

.node-selection-popup .node-options-container {
  flex-grow: 1;
  overflow-y: auto;
}

.node-selection-popup .node-option {
  padding: 8px 10px;
  cursor: pointer;
  font-size: 0.95em;
}

.node-selection-popup .node-option:hover,
.node-selection-popup .node-option.selected-option {
  background-color: #3e4451;
  color: #61afef;
}

.node-selection-popup button {
  background-color: #61afef;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 1em;
  margin-top: 10px;
}

.node-selection-popup button:hover {
  background-color: #529dcc;
}

.node-selection-popup button.cancel-button {
  background-color: #e06c75;
}

.node-selection-popup button.cancel-button:hover {
  background-color: #d45d68;
}

#custom-nodes-list h3 {
  margin: 0 0 10px 0;
  padding: 10px 12px;
  background-color: #21252b;
  color: #e5c07b;
  font-size: 1em;
  border-radius: 3px;
}

#custom-nodes-container {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

#game-container {
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* Custom styles for section headers in the custom nodes list */
.nodes-section-header {
  padding: 8px 12px;
  margin: 10px 0 5px 0;
  background-color: #3e4451;
  color: #e5c07b;
  font-weight: bold;
  font-size: 0.9em;
  border-radius: 3px;
  border-left: 3px solid #61afef;
}

.nodes-section-header:first-child {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

#custom-alert,
#custom-prompt {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(40, 44, 52, 0.85);
  /* Match dark overlay */
  justify-content: center;
  align-items: center;
}

#custom-alert-content,
#custom-prompt-content {
  background-color: #21252b;
  padding: 24px 28px;
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  text-align: center;
  color: #abb2bf;
  border: 1px solid #3e4451;
  min-width: 320px;
  max-width: 90vw;
}

#custom-prompt-input {
  width: 100%;
  padding: 8px;
  margin: 14px;
  background-color: #343a45;
  border: 1px solid #3e4451;
  border-radius: 3px;
  color: #abb2bf;
  font-size: 1em;
  box-sizing: border-box;
}

#custom-prompt-input:focus {
  outline: none;
  border-color: #61afef;
}

#custom-prompt-buttons {
  margin-top: 28px;
  /* Increased margin to separate from content */
  display: flex;
  justify-content: flex-end;
  /* Right-align the buttons */
  gap: 10px;
}

#custom-prompt-ok,
#custom-prompt-cancel {
  padding: 8px 18px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.95em;
  background-color: #61afef;
  color: white;
  transition: background 0.2s;
}

#custom-prompt-ok:hover {
  background-color: #529dcc;
}

#custom-prompt-cancel {
  background-color: #e06c75;
}

#custom-prompt-cancel:hover {
  background-color: #c6455b;
}

/* Alert buttons alignment */
#custom-alert-buttons {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 300px;
  z-index: 3000;
}

.notification {
  background-color: #21252b;
  color: #abb2bf;
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  margin-top: 12px;
  transition: opacity 0.3s ease;
}

.notification.info {
  border-left: 4px solid #61afef;
  /* Blue for info */
}

.notification.error {
  border-left: 4px solid #e06c75;
  /* Red for error */
}

.notification.success {
  border-left: 4px solid #98c379;
  /* Green for success */
}

.notification.fade-out {
  transition: opacity 500ms ease;
  opacity: 0;
}

.prompt-container {
  background-color: #21252b;
  border: 1px solid #3e4451;
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  color: #abb2bf;
  max-width: 90vw;
  padding: 24px 28px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2500;
}

.prompt-container .prompt-message {
  margin-bottom: 20px;
  font-size: 1em;
}

.prompt-container input[type="text"] {
  width: 100%;
  padding: 8px;
  background-color: #343a45;
  border: 1px solid #3e4451;
  border-radius: 3px;
  color: #abb2bf;
  font-size: 1em;
  box-sizing: border-box;
  margin: 8px 0px;
}

.prompt-container input[type="text"]:focus {
  outline: none;
  border-color: #61afef;
}

.prompt-container .prompt-button {
  padding: 8px 18px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.95em;
  background-color: #61afef;
  color: white;
  transition: background 0.2s;
}

.login-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  background-color: #21252b;
  padding: 24px 28px;
  border-radius: 5px;
}

#node-library-container {
  padding: 8px 4px;
}


#node-library {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: none;
  /* Hidden by default */
  flex-direction: column;
  background-color: rgba(40, 44, 52, 0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

#node-library.open {
  display: flex;
}

.node-library-inner {
  background-color: #21252b;
  padding: 24px 28px;
  border-radius: 5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  color: #abb2bf;
  max-width: 90vw;
  width: 600px;
  /* Fixed width for consistency */
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.node-library-inner input[type="text"] {
  width: 100%;
  padding: 8px;
  background-color: #343a45;
  border: 1px solid #3e4451;
  border-radius: 3px;
  color: #abb2bf;
  font-size: 1em;
  box-sizing: border-box;
}

.node-library-inner input[type="text"]:focus {
  outline: none;
  border-color: #61afef;
}

.upvote-container {
  cursor: pointer;
  color: #87898b;
  /* Default color */
  /* make it impossible to highlight */
  user-select: none;
}

.upvoted {
  /*brighten color a little from #abb2bf*/
  color: #CCC;
  /* Lighter shade for upvoted state */
}

.part-item {
  padding: 10px;
  margin: 5px 0;
  background-color: #2c323c;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  /* Changed to column */
  gap: 10px;
  /* Increased gap */
  cursor: pointer;
  transition: background-color 0.2s;
  width: 200px;
}

.part-item:hover {
  background-color: #3e4451;
}

.part-item img {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  object-fit: cover;
}

.part-item-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  padding: 40px;
  box-sizing: border-box;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #282c34;
  color: #abb2bf;
  margin: auto;
  padding: 20px;
  border: 1px solid #3e4451;
  border-radius: 5px;
  width: 80%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-content h3,
.modal-content h2 {
  color: #e5c07b;
  margin-top: 0;
}

.modal-content label {
  font-weight: bold;
}

.modal-content input[type="text"],
.modal-content textarea,
.modal-content input[type="file"] {
  width: 100%;
  padding: 8px;
  background-color: #21252b;
  border: 1px solid #3e4451;
  border-radius: 3px;
  color: #abb2bf;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.slideshow-container {
  position: relative;
  margin: auto;
  max-width: 100%;
  height: 400px;
  overflow: hidden;
}

.slide {
  display: none;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.slide.active {
  display: block;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  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.5);
}

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

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

.documentation-content {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #3e4451;
}

.close-button {
  color: white;
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9em;
  display: inline-block;
}

.inline {
  display: inline;
}

.upvote-container.inline {
  display: inline-block;
  margin: 0 5px;
}

#logs {
  background-color: #2c323c;
  color: #abb2bf;
  padding: 10px;
  border-radius: 3px;
  max-height: 300px;
  overflow-y: auto;
  font-family: monospace;
}

#logs .log-entry:nth-child(odd) {
  background-color: #323844;
  /* Slightly lighter for odd log entries */
}

#logs .log-entry {
  padding: 5px;
}

#logs .log-entry:hover {
  background-color: #3e4451;
  /* Highlight on hover */
}

#logs .log-entry.debug {
  color: #61afef;
}

#logs .log-entry.error {
  color: #e06c75;
}

.frame-gutter {
  border-top: 1px solid #3e4451;
  background-color: #21252b;
  padding: 10px;
  overflow-x: auto;
  white-space: nowrap;
  height: 150px;
}

.animation h3 {
  padding: 5px 0;
}

#logs .log-entry.warn {
  color: #e5c07b;
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #21252b;
    color: #abb2bf;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.9em;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 5px;
    border: 1px solid #3e4451;
}

.frame.drag-over-above {
  border-top: 2px solid #61afef;
}

.frame.drag-over-below {
  border-bottom: 2px solid #61afef;
}