body {
  font-family: "Georgia", "Times New Roman", serif;
  margin: 0;
  padding: 20px;
  background: #f9f9f9;
  display: flex;
  justify-content: center;
  color: #333;
}

.wrapper {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  font-family: inherit;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

h2, p, textarea, select, button, label, table, th, td, #wordCount {
  font-family: inherit;
}

h2 {
  text-align: center;
  margin: 10px 0;
}

p {
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: justify;
  padding: 0.5em;
}

textarea {
  width: 98%;
  height: 78px;
  margin-bottom: 10px;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: vertical;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

#wordCount {
  font-style: italic;
}

select {
  padding: 0.4em 0.8em;
  font-size: 14px;
  border: 1.5px solid #4CAF50;
  border-radius: 5px;
  background-color: #fff;
  color: #333;
  cursor: pointer;
  transition: border-color 0.2s;
}

select:hover,
select:focus {
  border-color: #388E3C;
  outline: none;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 30px;
}

#results {
  max-height: 400px;
  overflow-y: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

th, td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
}

th {
  background-color: #f0f0f0;
  position: sticky;
  top: 0;
}

input[type="file"] {
  display: none;
}

.custom-file-upload {
  display: inline-block;
  padding: 5px 10px;
  cursor: pointer;
  background-color: #f0f0f0;
  border-radius: 5px;
  border: none;
  margin: 4px 0;
}

.custom-file-upload:hover {
  background-color: #e0e0e0;
}

#analyzeBtn {
  padding: 5px 10px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  font-family: inherit;
  background-color: #f0f0f0;
}

#scaleToggleBtn {
  padding: 5px 10px;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  font-family: inherit;
  background-color: #f0f0f0;
}

#scaleToggleBtn:hover {
  background-color: #e0e0e0;
}

#chartContainer {
  width: 100%;
  height: 330px;
}

#zipfChart {
  width: 100% !important;
  height: 280px !important;
}

footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.75rem;
  color: #999;

  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 10px;
}

footer a {
  color: #999;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
@media (max-width: 650px) {
  .container { grid-template-columns: 1fr; }
}