body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  margin: 0;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.editor {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 100%;
  max-width: 600px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.control-panel {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  align-items: center;
  transition: transform 0.2s, background-color 0.3s;
}

.control-panel select, .control-panel button, .control-panel input[type="color"] {
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
}

.control-panel select option {
  font-family: inherit;
}

.control-panel button:hover, .control-panel select:focus, .control-panel input[type="color"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
  outline: none;
}

.control-panel button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-size: 18px;
  border: none;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: background-color 0.2s;
  border-radius: 4px;
}

.control-panel button:hover {
  background-color: #e0e0e0;
}

.control-panel button i {
  margin: 0; 
}

.control-panel button.active {
  transform: scale(1.1);
  background-color: #0056b3;
  color: #fff;
}

.textarea-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;  
  overflow: auto;    
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

textarea:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.3);

}

#trashIcon {
  position: absolute;
  top: 4%; 
  right: 8px; 
  transform: translateY(5%); 
  font-size: 20px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

#trashIcon:hover {
  color: #e74c3c;
  transform: scale(1.1);
}


#counter {
  font-size: 14px;
  margin-top: 10px;
  color: #555;
  text-align: right;
}

#preview {
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #f9f9f9;
  min-height: 50px;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

footer {
  margin-top: 20px;
  font-size: 18px;
  text-align: center;
  color: #555;
  font-style: italic;
  width: 100%;
  max-width: 600px;
}

#signature a {
  color: #007bff;
  text-decoration: none;
}

#signature a:hover {
  text-shadow: 0 0 15px #007bff;  
}

@keyframes coffeeRain {
  0% {
    transform: translateY(-100px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.coffee-bean {
  display: block;
  position: fixed ;
  top: -100px;
  width: 30px;  
  height: auto;
  opacity: 0.9;
  pointer-events: none;
  z-index: 1000;
}

#coffee {
  cursor: pointer;  
  font-size: 1.5em; 
  transition: text-shadow 0.3s ease-in-out;
}

#coffee:hover {
  text-shadow: 0 0 15px #8B4513;  
}

.active {
  transform: scale(1.1);
  background-color: #0056b3;
  color: #fff;
}

#naveedLink {
  color: #007bff;
  text-decoration: none;
  transition: text-shadow 0.3s ease;
}

#naveedLink:hover {
  text-shadow: 0 0 10px #007bff, 0 0 20px #007bff;
}

footer a {
  color: #007bff; 
  text-decoration: none; 
  transition: text-shadow 0.3s ease; 
}

footer a:hover {
  text-shadow: 0 0 10px #007bff, 0 0 20px #007bff; 
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Ensure it appears above other content */
}

.loading-screen img {
  width: 100px; /* Adjust size as needed */
  height: auto;
}