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

body {
  font-family: 'Roboto', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(to right, #6dd5ed, #2193b0);
  animation: gradient-animation 8s infinite alternate;
}

@keyframes gradient-animation {
  0% { background: linear-gradient(to right, #6dd5ed, #2193b0); }
  50% { background: linear-gradient(to right, #2193b0, #6dd5ed); }
  100% { background: linear-gradient(to left, #6dd5ed, #2193b0); }
}

.container {
  text-align: center;
  padding: 80px;
  background: linear-gradient(145deg, #ffffff, #f3f3f3);
  border-radius: 20px;
  box-shadow: 12px 12px 30px rgba(0, 0, 0, 0.2), -10px -10px 20px rgba(255, 255, 255, 0.8);
  width: 100%;
  max-width: 900px;
  margin-top: 30px;
  margin-left: 30px;
  margin-right: 30px;
  margin-bottom: 30px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  position: relative;
}


h1 {
  font-size: 2.8em;
  color: #333;
  margin-bottom: 20px;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.container p {
  font-size: 1em;
  color: #555;
  line-height: 1.7;
  margin-bottom: 20px;
}

textarea {
  width: 100%;
  padding: 15px;
  font-size: 1.1em;
  margin-bottom: 20px;
  border: none;
  border-radius: 10px;
  box-shadow: inset 5px 5px 10px rgba(0, 0, 0, 0.1), inset -5px -5px 10px rgba(255, 255, 255, 0.7);
  resize: vertical;
  outline: none;
  transition: box-shadow 0.3s ease;
}

textarea:focus {
  box-shadow: 0 0 10px rgba(33, 147, 176, 0.7);
}

.controls {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

button {
  padding: 12px 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(to right, #28a745, #218838);
  color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1), -4px -4px 10px rgba(255, 255, 255, 0.5);
  transition: transform 0.2s, box-shadow 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 12px rgba(0, 0, 0, 0.2), -6px -6px 12px rgba(255, 255, 255, 0.8);
}

#wordCloudContainer {
  width: 100%;
  height: 500px;
  margin-top: 20px;
  border: 2px dashed #ccc;
  border-radius: 10px;
  background: linear-gradient(to top, #f9f9f9, #eaeaea);
  position: relative;
  overflow: hidden;
  animation: pulse 6s infinite;
}

@keyframes pulse {
  0%, 100% { background: linear-gradient(to top, #f9f9f9, #eaeaea); }
  50% { background: linear-gradient(to bottom, #eaeaea, #f9f9f9); }
}

footer {
  background-color: #fff; /* Dark background for contrast */
  color: #333; /* White text for readability */
  text-align: center; /* Center-align text */
  padding: 20px 10px; /* Padding for spacing */
  font-size: 14px; /* Slightly smaller font size */
  border-top: 1px solid #000; /* Accent border for visual appeal */
}

footer p {
  margin: 0; /* Remove default margins */
  margin-top: 40px;
  font-family: 'DM Sans', Arial, sans-serif; /* Clean, modern font */
}

.floating-back-button {
      position: fixed;
      bottom: 20px;
      right: 20px;
      background-color: #000;
      color: white;
      text-decoration: none;
      padding: 10px 15px;
      border-radius: 50px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
      font-size: 14px;
      font-weight: bold;
      z-index: 1000;
      transition: background-color 0.3s, transform 0.3s;
    }

    .floating-back-button:hover {
      background-color: #0056b3;
      transform: scale(1.1);
    }

    .blinking-text {
      animation: none;
    }

    .blinking-text.blink {
      animation: fadeBlink 1.5s infinite ease-in-out;
    }

    @keyframes fadeBlink {
      0%, 100% {
        opacity: 1;
      }
      50% {
        opacity: 0;
      }
    }
    
/* Media Queries */
@media (max-width: 768px) {
  h1 {
    font-size: 2.2em;
  }

  textarea {
    font-size: 1em;
  }

  button {
    font-size: 1em;
  }

  #wordCloudContainer {
    height: 400px;
  }
}

@media (max-width: 576px) {
  textarea {
    font-size: 0.9em;
  }

  button {
    font-size: 0.9em;
  }

  #wordCloudContainer {
    height: 350px;
  }
}
