
body {
  font-family: "Press Start 2P", monospace;
  background-color: #1a1a2e; 
  color: #e94560; 
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden; 
  display: flex;
  justify-content: center;
  align-items: center;
}


#app {
  background-color: #0f3460; 
  width: 100%; 
  height: 100%; 
  border: 2px solid #e94560; 
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto; 
}


header {
  text-align: center;
}

header .logo {
  font-size: 28px; 
  color: #f8f8f8; 
  text-shadow: 
    2px 2px #53354a, 
    4px 4px #e94560, 
    6px 6px #1a1a2e; 
  text-align: center;
  margin: 0 auto; 
  margin-bottom: 20px;
  display: inline-block; 
  animation: glow-red 2s infinite alternate; 
}


@keyframes glow-red {
  0% {
    text-shadow: 
      2px 2px #53354a, 
      4px 4px #e94560, 
      6px 6px #1a1a2e;
  }
  50% {
    text-shadow: 
      2px 2px #53354a, 
      4px 4px rgba(233, 69, 96, 0.8), 
      6px 6px #1a1a2e;
  }
  100% {
    text-shadow: 
      2px 2px #53354a, 
      4px 4px rgba(233, 69, 96, 1), 
      6px 6px #1a1a2e;
  }
}



textarea {
  width: 100%;
  height: 200px;
  background-color: #16213e;
  color: #e94560;
  border: 2px solid #e94560;
  border-radius: 10px;
  font-size: 16px;
  padding: 15px;
  margin-bottom: 20px;
  box-sizing: border-box;
  resize: none;
  margin-top:20px;
}


button {
  background-color: #53354a;
  color: #ffffff;
  border: 2px solid #e94560;
  border-radius: 10px;
  padding: 15px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

button:hover {
  background-color: #e94560;
  color: #16213e;
}


#button-group {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
  gap: 15px;
  margin-bottom: 20px;
}


#transforms {
  display: flex;
  flex-wrap: wrap;
  max-height: 150px; 
  overflow-y: scroll; 
  gap: 10px;
  justify-content: center;
}


#settings .btn {
  padding: 5px 10px; 
  font-size: 12px; 
  height: auto; 
  line-height: 1.2; 
  border-radius: 5px; 
}


#settings select {
  padding: 5px; 
  font-size: 12px; 
  height: auto; 
  border-radius: 5px; 
}


#settings input[type="file"] {
  padding: 5px 10px; 
  font-size: 12px; 
  height: auto; 
  line-height: 1.2; 
  border-radius: 5px; 
  box-sizing: border-box; 
}


#settings input[type="file"]::-webkit-file-upload-button {
  padding: 5px 10px; 
  font-size: 12px; 
  border: 1px solid rgba(255, 255, 255, 0.2); 
  border-radius: 5px; 
  background-color: #3b3b58; 
  color: white; 
  cursor: pointer; 
}



#settings {
  display: flex;
  flex-wrap: wrap;      
  align-items: center;
  gap: 8px;              
  overflow-x: auto;     
  padding: 4px;
  box-sizing: border-box;
}

#settings .btn,
#settings select,
#settings input[type="text"],
#settings input[type="file"],
#settings input[type="color"] {
  flex-shrink: 0;        
}

#project-management {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}


#prompts {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  background-color: #16213e;
  border: 2px solid #53354a;
  border-radius: 10px;
}

#prompts li {
  padding: 10px;
  color: #f8f8f8;
  border-bottom: 1px solid #53354a;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}




.horizontal-group {
  display: flex;
  gap: 10px; 
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.dropdown {
  padding: 5px;
  font-size: 14px;
  border-radius: 5px;
  border: 1px solid #e94560;
  background-color: #0f3460;
  color: #e94560;
}


.prompt-list {
  margin-top: 20px;
  padding: 10px;
  background-color: #162447;
  border-radius: 5px;
  max-height: 200px; 
  overflow-y: auto; 
  border: 1px solid #e94560;
}

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

.prompt-text {
  font-size: 14px;
  color: #ffffff;
  margin: 0;
}

.prompt-list li {
  padding: 10px;
  color: #f8f8f8;
  border-bottom: 1px solid #53354a;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.prompt-list li .actions {
  display: flex;
  gap: 5px;
}

#search-input {
  padding: 10px;
  border: 1px solid #4f5b66;
  border-radius: 4px;
  background-color: #343d46;
  color: #c0c5ce;
  font-size: 1em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease-in-out;
}

#search-input:focus {
  outline: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}


.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup.hidden {
  display: none;
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 10px; 
    padding: 20px;
}

.popup-content .prompt-full-text {
  color: #e94560;
  margin-bottom: 10px;
}

.popup-content textarea {
  width: 100%;
  height: 150px;
  background-color: #0f3460;
  color: #e94560;
  border: 1px solid #e94560;
  border-radius: 10px;
  font-size: 14px;
  padding: 10px;
  margin-bottom: 15px;
}

.popup-content .btn {
  margin-top: 10px;
}

.actions {
  display: flex;
  justify-content: flex-end; 
  align-items: center;
  gap: 5px; 
}


.actions .btn {
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 5px;
  border: 1px solid #e94560;
  background-color: #0f3460;
  color: #e94560;
  cursor: pointer;
}

.actions .btn:hover {
  background-color: #e94560;
  color: #16213e;
}

#save-button-container {
  display: flex; 
  justify-content: center; 
  align-items: center; 
  height: 100px; 
}

#save-prompt {
  margin: 2px;
  font-size: 16px; 
  border-radius: 5px; 
  color: white; 
  border: 1px solid #e94560; 
  cursor: pointer; 
  text-align: center; 
}

#save-prompt:hover {
  background-color: #e94560; 
  color: #ffffff; 
}

#undo-btn {
  margin: 2px;
  font-size: 16px; 
  border-radius: 5px; 
  color: white; 
  border: 1px solid #e94560; 
  cursor: pointer; 
  text-align: center; 
}

#undo-btn:hover {
  background-color: #e94560; 
  color: #ffffff; 
}

#copy-prompt {
  margin: 2px;
  font-size: 16px; 
  border-radius: 5px; 
  color: white; 
  border: 1px solid #e94560; 
  cursor: pointer; 
  text-align: center; 
}

#copy-prompt:hover {
  background-color: #e94560; 
  color: #ffffff; 
}


#punctuation-popup {
  position: fixed;
  top: 40%;
  left: 80%;
  transform: translate(-50%, -50%);
  background-color: #1a1a2e;
  color: #ffffff;
  padding: 50px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  width: 500px;
  max-height: 500px;
  overflow-y: auto;
}

#punctuation-popup.hidden {
  display: none;
}

#punctuation-popup h3 {
  margin-top: 0;
  font-size: 18px;
}

.punctuation-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.punctuation-list li {
  padding: 10px;
  margin: 5px 0;
  background-color: #3b3e47;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.punctuation-list li:hover {
  background-color: #e94560;
  color: #ffffff;
}

#close-punctuation-popup {
  margin-top: 10px;
  display: block;
  width: 100%;
  text-align: center;
}


#unicode-popup {
    position: fixed;
    top: 10%; 
    left: 80%;
    transform: translate(-50%, 0); 
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 90%; 
    max-width: 700px; 
    max-height: 80vh; 
    overflow-y: auto; 
}


#unicode-popup.hidden {
  display: none;
}

#unicode-popup h3 {
  margin-top: 0;
  font-size: 18px;
}


.unicode-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    padding: 10px; 
    list-style: none; 
    margin: 0; 
}


.unicode-list li {
    padding: 10px;
    text-align: center;
    background-color: #3b3e47;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.unicode-list li:hover {
    background-color: #e94560;
    color: #ffffff;
}


#close-unicode-popup {
    margin-top: 10px;
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #e94560;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#close-unicode-popup:hover {
    background-color: #1a1a2e;
    color: #e94560;
}

.toggle-status-btn {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}


#emoji-popup {
    position: fixed;
    top: 10%; 
    left: 80%;
    transform: translate(-50%, 0); 
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 90%; 
    max-width: 700px; 
    max-height: 80vh; 
    overflow-y: auto; 
}


#emoji-popup.hidden {
  display: none;
}

#emoji-popup h3 {
  margin-top: 0;
  font-size: 18px;
}


.emoji-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    padding: 10px; 
    list-style: none; 
    margin: 0; 
}


.emoji-list li {
    padding: 10px;
    text-align: center;
    background-color: #3b3e47;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.emoji-list li:hover {
    background-color: #e94560;
    color: #ffffff;
}


#close-emoji-popup {
    margin-top: 10px;
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    background-color: #e94560;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#close-emoji-popup:hover {
    background-color: #1a1a2e;
    color: #e94560;
}

.toggle-status-btn {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}


.split-container {
  display: flex;
  width: 100%;
  height: 25%; 
}


.split-left {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

.split-left textarea {
  width: 95%;
  height: 95%;
  border: 2px solid #e94560;
  background-color: #16213e;
  color: #e94560;
  border-radius: 10px;
  font-size: 16px;
  resize: none; 
  box-sizing: border-box;
}


.split-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  box-sizing: border-box;
}

.split-right img {
  max-width: 95%;
  max-height: 95%;
  border: 2px solid #e94560;
  border-radius: 10px;
}


#save-button-container {
  display: flex;
  justify-content: center;
  gap: 15px;
}


#settings {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}


  

.token-container {
  max-width: 100%; 
  overflow: hidden; 
}

#tokenized {
  display: flex;
  flex-wrap: wrap; 
  gap: 5px; 
  align-items: flex-start; 
  max-width: 100%; 
  overflow-y: auto; 
  overflow-x: hidden; 
  padding: 10px;
  box-sizing: border-box;
  height: 200px; 
  width: calc(100% - 20px); 
  border: 1px solid rgba(255, 255, 255, 0.2); 
  border-radius: 5px; 
  background-color: rgba(0, 0, 0, 0.2); 
  justify-content: flex-start; 
  text-align: left; 
  visibility: visible; 
}




#tokenized h3 {
  font-family: 'Press Start 2P', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 10px;
  width: 100%;
}

#tokenized .token {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#tokenized .token-id {
  font-size: 0.7rem;
  margin-top: 3px;
  opacity: 0.8;
}


.token {
  display: inline-block; 
  padding: 5px;
  border-radius: 5px;
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  position: relative; 
}

.token .token-id {
  display: block; 
  font-size: 0.8em; 
  color: rgba(0, 0, 0, 0.6); 
  margin-top: 2px; 
  text-align: center;
}

#tokenized h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #fff;
}


#notes-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #1e1e2f; 
  color: white;
  padding: 20px;
  border: 2px solid #4a4a9c; 
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); 
  z-index: 1000; 
  display: none; 
}


#notes-popup:not(.hidden) {
  display: block;
}


#notes-textarea {
  width: 100%;
  height: 100px;
  margin-bottom: 15px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #2b2b3d; 
  color: white;
  font-size: 14px;
}


#notes-popup .btn {
  display: block;
  width: 100%;
  margin: 5px 0;
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  cursor: pointer;
  background-color: #4a4a9c;
  color: white;
}

#notes-popup .btn:hover {
  background-color: #6c6cd9;
}

.hidden {
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
#result-container {
    border: 1px solid #ccc;
    padding: 10px;
    margin-top: 20px;
    max-height: 300px;
    overflow-y: auto;
}
.result-item {
    padding: 5px;
    border-bottom: 1px solid #eee;
}
.error-item {
    padding: 5px;
    color: red;
    border-bottom: 1px solid #eee;
}

#controls {
  display: flex;
  align-items: center;
  gap: 1rem;         
}

#visual-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;        
}
 

#cloakText-popup{
  position: fixed;
  inset: 0;                         
  display: flex;
  justify-content: flex-end;        
  align-items: flex-start;          
  padding: 72px 32px 0 0;           
  background: transparent !important; 
  box-shadow: none !important;
  pointer-events: none;            
  z-index: 10000;
}


#cloakText-popup .popup-content{
  pointer-events: auto;
  width: clamp(320px, 30vw, 480px); 
  height: auto;
  max-height: calc(100vh - 96px);
  background: #1a1a2e;
  color: #fff;
  padding: 16px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}


#cloakText-popup .cloakText-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 10px 0;
  padding: 0;
  list-style: none;
}
#cloakText-popup .cloakText-list li{
  width: 100%;
  padding: 10px 12px;
  background: #3b3e47;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  word-break: break-word;
}
#cloakText-popup .cloakText-list li:hover{
  background: #e94560; color: #fff;
}

#close-cloakText-popup{ display:block; width:100%; }
