/*Base*/

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Funnel Display", sans-serif;
  background: radial-gradient(circle at center, #2d3436 0%, #000 100%);
  color: #eee;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 95%;
  max-width: 900px;
  background-color: #1a1a1a;
  padding: 40px 20px;
  border-radius: 40px;
  border: 4px solid #333;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(108, 92, 231, 0.2);
  position: relative;
}

main::after {
  content: "";
  width: 50px;
  height: 5px;
  background: #333;
  border-radius: 10px;
  margin-top: 20px;
}

h1 {
  color: #a29bfe;
  text-shadow: 0 0 10px rgba(162, 155, 254, 0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 1.8rem;
}

/*Fonts*/

.funnel-display-font {
  font-family: "Funnel Display", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
}

/*Word Search Container*/

.word-search-container {
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 25px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

#word-search {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #444;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
}

#word-search:focus {
  border-color: #6c5ce7;
}

/*Text Container*/

.text-container {
  display: none;
  background-color: #0c0c0c;
  color: #00ff9d;
  padding: 30px;
  border-radius: 10px;
  border: 1px solid #1f4037;
  max-height: 400px;
  overflow-y: auto;
  font-family: "Courier New", monospace;
  box-shadow: inset 0 0 15px rgba(0, 255, 157, 0.1);
}

.text-container::-webkit-scrollbar {
  width: 8px;
}
.text-container::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

.text-container.show {
  display: block;
  animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*USER'S TEXT*/

/*User's text container*/
.user-text-container {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 80%;
  background: rgba(30, 30, 30, 0.9);
  padding: 20px;
  border-radius: 15px;
  border: 1px solid #444;
}

.user-text-container.show {
  display: flex;
}

/*Textarea*/

#user-text-area {
  height: 150px;
  background: rgba(0, 0, 0, 0.4);
  color: #00ff9d;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 15px;
  font-family: "Courier New", monospace;
  resize: none;
  margin-top: 20px;
  outline: none;
}

#user-text-area:focus {
  border-color: #00ff9d;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

/*Test text*/

#test-text p {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

#test-text p:last-child {
  margin-bottom: 0;
}

/*Highlight Word*/

.word-search-span {
  background-color: #00ff9d;
  color: #000;
  font-weight: bold;
  border-radius: 2px;
  padding: 0 4px;
  box-shadow: 0 0 10px #00ff9d;
}

/*BUTTONS*/

.button-container {
  margin: 25px;
}

/*Test text button*/

.test-text-button {
  padding: 10px;
  width: 200px;
  background-color: #6c5ce7;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.test-text-button:hover {
  background-color: #a29bfe;
}

/*Reset button*/
.reset-button {
  padding: 10px;
  width: 200px;
  background-color: #ff7675;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  margin-right: 5px;
}

.reset-button:hover {
  background-color: #d63031;
}

/*User's text button*/

.user-text-button {
  padding: 10px;
  width: 200px;
  background-color: #5189c9;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
  margin-right: 5px;
}

.user-text-button:hover {
  background-color: #6b9acf;
}

/*Text area button*/

.save-text-button {
  background-color: #00ff9d;
  color: #000;
  padding: 10px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

/*Errors*/

#error-message {
  width: 100%;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

/*MEDIA QUERY*/

@media (max-width: 600px) {
  .text-container {
    padding: 20px;
    font-size: 1rem;
  }

  main h1 {
    font-size: 1.5rem;
  }
}
