* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(to bottom right, #0f9b8e, #56ccf2);
  color: #222;
  min-height: 100vh;
  transition: 0.3s;
}

header {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#darkModeToggle {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}

main {
  padding: 20px;
  max-width: 900px;
  margin: auto;
}

textarea {
  width: 100%;
  height: 200px;
  padding: 15px;
  border-radius: 10px;
  border: none;
  outline: none;
  font-size: 1rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  resize: none;
}

.button-group {
  margin: 15px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.button-group button {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  background: #0f9b8e;
  color: white;
  transition: 0.3s;
}

.button-group button:hover {
  background: #00796b;
}

.stats {
  background: white;
  border-radius: 20px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 15px;
}

#freqList {
  list-style: none;
  padding-left: 10px;
}

footer {
  text-align: center;
  padding: 20px;
  color: white;
}

.dark-mode {
  background: #1e1e1e;
  color: #f5f5f5;
}

.dark-mode textarea {
  background: #2b2b2b;
  color: #fff;
}

.dark-mode .stats {
  background: #333;
}

.dark-mode #darkModeToggle {
  background: #eee;
  color: #000;
}
