body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #fff;
  color: #111;
  text-align: center;
}

header {
  padding: 1rem;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.75rem;
  font-weight: bold;
}

.logo img {
  width: 40px;
  height: 40px;
}

nav {
  margin-top: 0.75rem;
}

nav a {
  margin: 5px 0.75rem;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  display: inline-block;
}

nav a:hover {
  color: rgba(0, 0, 0, 0.6);
}

main {
  padding: 2rem 1rem;
  max-width: 960px;
  margin: auto;
  text-align: center;
  box-sizing: border-box;
}

textarea#textInput {
  width: 100%;
  max-width: 100%;
  min-height: 200px;
  padding: 1rem;
  font-size: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  border: 1px solid #ccc;
  resize: vertical;
  box-sizing: border-box;
}

.stats-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  font-size: 1rem;
  text-align: left;
  max-width: 100%;
  box-sizing: border-box;
}

#keywordList {
  list-style: none;
  padding: 0 1rem;
  max-width: 100%;
  margin: auto;
  text-align: left;
  line-height: 1.6;
  box-sizing: border-box;
}

#keywordList li {
  border-bottom: 1px solid #eee;
  padding: 0.25rem 0;
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }

  h1 {
    font-size: 1.6rem;
    line-height: 1.2;
    text-align: center;
  }

  p.subtitle {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }

  .tool-section {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    overflow-x: hidden;
  }

  .upload-area,
  .output-box {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  .output-box pre {
    font-size: 0.9rem;
    overflow-x: auto;
    word-wrap: break-word;
  }

  button,
  input[type="file"] {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem;
  }

  .tool-section,
  .output-box,
  .upload-area {
    margin-bottom: 1rem;
  }

  textarea#textInput {
    font-size: 1rem;
    padding: 0.8rem;
    margin: 1rem 0;
  }

  .stats-box {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1.5rem 0;
  }

  #keywordList {
    padding: 0 1rem;
  }
}

textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  font-size: 1rem;
  margin: 1rem 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
  box-sizing: border-box;
  font-family: monospace;
}

.json-inputs {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.json-inputs textarea {
  flex: 1 1 48%;
}

button {
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border: none;
  border-radius: 6px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

.diff-output {
  margin-top: 2rem;
  text-align: left;
  font-family: monospace;
  white-space: pre-wrap;
  background: #f9f9f9;
  border-radius: 6px;
  padding: 1rem;
  border: 1px solid #ddd;
}

.added {
  background-color: #e6ffed;
  color: #267a3e;
}

.removed {
  background-color: #ffeef0;
  color: #b31d28;
}

.modified {
  background-color: #fff5b1;
  color: #6f5500;
}
