/* General body styling */
body {
  font-family: 'Arial', sans-serif;
  background: #121212; /* Dark background */
  color: #e0e0e0; /* Light gray text */
  margin: 0;
  padding: 20px;
  line-height: 1.6;
}

h1 {
  color: #f1f1f1;
  text-align: center;
  margin-bottom: 20px;
}

textarea, input {
  background: #1e1e1e; /* Darker gray background */
  border: 1px solid #333; /* Subtle border */
  color: #e0e0e0; /* Light gray text */
  padding: 10px;
  border-radius: 5px;
  font-family: 'Courier New', monospace; /* Matches Minecraft aesthetic */
  width: 100%;
  margin-bottom: 10px;
}

textarea {
  resize: vertical;
}

/* Preview styling */
.preview {
  background: #0d0d0d; /* Almost black */
  color: white;
  padding: 15px;
  font-size: 16px;
  white-space: pre-line;
  border-radius: 5px;
  border: 1px solid #333;
  font-family: 'Courier New', monospace; /* For Minecraft-like text */
  overflow-x: auto;
  width: 400px; /* Fixed width for rectangular shape */
  height: 200px; /* Fixed height for rectangular shape */
  margin: 0; /* Remove centering */
  position: relative;
  left: 0; /* Align left */
}

/* Color palette */
.color-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.color-palette span {
  display: inline-block;
  width: 30px;
  height: 30px;
  cursor: pointer;
  border: 1px solid #333;
  border-radius: 5px;
}

.color-palette span:hover {
  outline: 2px solid #e0e0e0;
}

/* Text formatting buttons */
.text-functions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.text-functions button {
  background-color: #333;
  color: #e0e0e0;
  padding: 10px;
  border: 1px solid #555;
  border-radius: 5px;
  cursor: pointer;
}

.text-functions button:hover {
  background-color: #444;
}

/* Minecraft MOTD colors */
.color-0 { color: black; }
.color-1 { color: darkblue; }
.color-2 { color: darkgreen; }
.color-3 { color: darkcyan; }
.color-4 { color: darkred; }
.color-5 { color: purple; }
.color-6 { color: gold; }
.color-7 { color: gray; }
.color-8 { color: darkgray; }
.color-9 { color: blue; }
.color-a { color: green; }
.color-b { color: aqua; }
.color-c { color: red; }
.color-d { color: pink; }
.color-e { color: yellow; }
.color-f { color: white; }

/* Text formatting styles */
.preview b {
  font-weight: bold;
}

.preview i {
  font-style: italic;
}

.preview u {
  text-decoration: underline;
}

.preview s {
  text-decoration: line-through;
}

/* Obfuscated (enchanted) text effect */
.preview .obfuscated {
  font-family: "Courier New", monospace;
  color: #FFFFFF; /* Default color for obfuscated text */
  background-image: linear-gradient(90deg, rgba(0,0,0,.1) 25%, rgba(255,255,255,.5) 50%, rgba(0,0,0,.1) 75%);
  background-size: 200% 100%;
  animation: obfuscate 0.2s linear infinite;
}

@keyframes obfuscate {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

