/* @tweakable the default font family for all text */
:root {
  --main-font-family: Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; */
  font-family: var(--main-font-family); /* @tweakable base app font */
  background-color: black;
  color: #00BFFF;
}

/* Ensure all textual elements use Arial by default, unless overridden via @tweakable */
h1, h2, h3, h4, h5, h6,
button,
label,
select,
input,
textarea,
pre,
code,
span,
div,
p,
a,
li,
ul,
ol,
#ai-model-selector,
#user-input {
  font-family: var(--main-font-family) !important; /* @tweakable override for all displayed text */
  font-weight: 400;
}

/* Keep monospace for code blocks, but you can tweak if you want */
pre, code {
  font-family: 'Courier New', Courier, monospace;
}

/* BUTTONS */
#pretty-print-button, #knowledge-access-button, #algorithm-button, #data-source-button {
  font-family: var(--main-font-family) !important; /* @tweakable tools button font */
  background-color: black;
  color: #00BFFF;
  border: 2px solid #00BFFF;
  padding: 5px;
  font-size: 10px;
  cursor: pointer;
}

#pretty-print-button {
  position: absolute;
  top: 60px;
  right: 20px;
}

#knowledge-access-button {
  position: absolute;
  top: 100px;
  right: 20px;
}

#algorithm-button {
  position: absolute;
  top: 140px;
  right: 20px;
}

#data-source-button {
  position: absolute;
  top: 180px;
  right: 20px;
}

#pretty-print-button:hover, #knowledge-access-button:hover, #algorithm-button:hover, #data-source-button:hover {
  background-color: #001a20;
}

/* Styles for generated video content */
.generated-video {
  display: block;
  margin-top: 10px;
  max-width: 640px;
  max-height: 400px;
  border: 3px solid #00BFFF !important;
}

/* Audio controls styling */
audio.narration {
  display: block;
  width: 100%;
  max-width: 500px;
  margin-top: 5px;
  background-color: black;
  border: 2px solid #00BFFF;
}

/* Video player controls */
.video-player-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  border: 3px solid #00BFFF;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.9);
}

/* Styles for document preview */
.document-container {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.document-preview {
  width: 100%;
  height: 400px;
  border: 3px solid #00BFFF;
  margin-bottom: 10px;
}

.document-download {
  display: inline-block;
  background: #00BFFF;
  color: black;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 4px;
  font-family: var(--main-font-family);
  font-size: 12px;
  text-align: center;
}

.document-download:hover {
  background: #008fb8;
}

/* Knowledge display styling */
.knowledge-display {
  margin-top: 10px;
  padding: 10px;
  border: 2px solid #00BFFF;
  background-color: rgba(0, 191, 255, 0.1);
}

.knowledge-display h3 {
  color: #00BFFF;
  margin-bottom: 5px;
}

.knowledge-source {
  font-size: 0.8em;
  color: #007999;
  margin-top: 5px;
}

/* Dropdown menu styling */
.dropdown-container {
  position: absolute;
  top: 20px;
  right: 20px;
  display: inline-block;
}

.dropdown-button {
  font-family: var(--main-font-family);
  background-color: black;
  color: #00BFFF;
  border: 2px solid #00BFFF;
  padding: 5px;
  font-size: 10px;
  cursor: pointer;
}

.dropdown-button:hover {
  background-color: #001a20;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: black;
  min-width: 200px;
  border: 2px solid #00BFFF;
  z-index: 10;
}

.dropdown-content a {
  color: #00BFFF;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-family: var(--main-font-family);
  font-size: 12px;
}

.dropdown-content a:hover {
  background-color: rgba(0, 191, 255, 0.2);
}

.show {
  display: block;
}

#clear-button {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-family: var(--main-font-family);
  background-color: black;
  color: #00BFFF;
  border: 2px solid #00BFFF;
  padding: 5px;
  font-size: 10px;
  cursor: pointer;
}

#clear-button:hover {
  background-color: #001a20;
}

/* Universal Tweak Panel styling */
.universal-tweak-panel {
  margin-top: 10px;
  padding: 15px;
  border: 2px solid #00BFFF;
  background-color: black;
  border-radius: 8px;
  position: relative;
  z-index: 100;
}

.universal-tweak-panel h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #00BFFF;
  font-size: 14px;
}

.universal-tweak-panel p {
  margin-bottom: 10px;
  font-size: 12px;
}

.universal-tweak-panel textarea {
  background-color: black;
  color: #00BFFF;
  border: 1px solid #00BFFF;
  padding: 8px;
  font-family: var(--main-font-family);
  margin-bottom: 10px;
}

.tweak-context {
  margin-bottom: 15px;
}

.tweak-context label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.tweak-context select {
  width: 100%;
  padding: 5px;
  background-color: black;
  color: #00BFFF;
  border: 1px solid #00BFFF;
}

.universal-tweak-panel .tweak-buttons {
  display: flex;
  justify-content: space-between;
}

/* Context menu styling */
.context-menu {
  position: absolute;
  background-color: black;
  border: 2px solid #00BFFF;
  z-index: 1000;
  padding: 5px 0;
  min-width: 150px;
}

.context-menu-item {
  padding: 8px 15px;
  cursor: pointer;
  color: #00BFFF;
  font-size: 12px;
}

.context-menu-item:hover {
  background-color: rgba(0, 191, 255, 0.2);
}

/* New styles for tweakable elements indicator */
.tweakable {
  position: relative;
}

.tweakable::after {
  content: "✏️";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  opacity: 0.7;
}

.tweakable:hover {
  outline: 1px dashed #00BFFF;
  cursor: pointer;
}

/* Tweak panel styling */
.tweak-panel {
  margin-top: 10px;
  padding: 15px;
  border: 2px solid #00BFFF;
  background-color: black;
  border-radius: 8px;
}

.tweak-panel h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #00BFFF;
  font-size: 14px;
}

.tweak-control {
  margin-bottom: 10px;
}

.tweak-control label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

.tweak-control input[type="range"] {
  width: 100%;
  accent-color: #00BFFF;
}

.tweak-control select {
  width: 100%;
  padding: 5px;
  background-color: black;
  color: #00BFFF;
  border: 1px solid #00BFFF;
}

.tweak-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.tweak-buttons button {
  font-family: var(--main-font-family);
  background-color: black;
  color: #00BFFF;
  border: 2px solid #00BFFF;
  padding: 5px;
  font-size: 10px;
  cursor: pointer;
}

.tweak-buttons button:hover {
  background-color: #001a20;
}

button {
  font-family: var(--main-font-family);
  padding: 5px 10px;
  font-size: 10px;
  background-color: black;
  color: #00BFFF;
  border: 2px solid #00BFFF;
  cursor: pointer;
}

button:hover {
  background-color: #001a20;
}

.message-content {
  white-space: pre-wrap;
}