body {
  font-family: Arial, sans-serif;
  background: #f2f2f2;
  padding: 30px;
  margin: 0;
}

.container {
  max-width: 700px;
  margin: auto;
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

h2 {
  text-align: center;
  color: #333;
}

form {
  margin-top: 20px;
  position: relative;
}

textarea {
  width: 100%;
  height: 180px;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
}

.btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-top: 15px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 6px;
  border: none;
  color: #fff;
}

.btn-submit {
  background-color: #4CAF50;
}

.btn-submit:hover {
  background-color: #45a049;
}

#clearIcon {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 18px;
  color: gray;
  cursor: pointer;
  user-select: none;
}

.stats {
  margin-top: 10px;
  font-weight: bold;
  color: #555;
  text-align: right;
}

.result {
  margin-top: 25px;
  background: #f9f9f9;
  padding: 15px;
  border-left: 5px solid #4CAF50;
  border-radius: 6px;
}

.result h3 {
  margin-top: 0;
}

.highlight {
  background: #ffdddd;
  border-bottom: 2px dotted #d8000c;
  cursor: help;
}

.errors {
  color: #d8000c;
  margin-top: 15px;
}

.errors ul {
  padding-left: 20px;
}

#toggleCorrectedBtn {
  margin-top: 20px;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  background: #4CAF50;
  color: #fff;
  border-radius: 6px;
}

#toggleCorrectedBtn:hover {
  background-color: #45a049;
}

#correctedTextDiv {
  display: none;
  margin-top: 15px;
  background: #e8f5e9;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #4CAF50;
}

#downloadPdfBtn {
  margin-top: 15px;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  background: #2196F3;
  color: #fff;
  border-radius: 6px;
}

#downloadPdfBtn:hover {
  background-color: #1769aa;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #4CAF50;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  display: none;
  vertical-align: middle;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.charCount {
  margin-top: 5px;
  text-align: right;
  font-size: 14px;
  color: #555;
}
