* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 15px 20px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header h1 {
  font-size: 24px;
  font-weight: 500;
  color: #333;
}

nav ul {
  list-style: none;
  display: flex;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  text-decoration: none;
  color: #007BFF;
  font-weight: 500;
}

nav ul li a:hover {
  color: #0056b3;
}

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

.word-counter-section {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.word-counter-section h2 {
  margin-bottom: 15px;
  font-size: 22px;
  text-align: center;
}

textarea {
  width: 100%;
  height: 150px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  font-size: 16px;
  resize: vertical;
  margin-bottom: 20px;
}

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

.result {
  background: #f8f9fa;
  padding: 10px 15px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
}

.result span:first-child {
  font-weight: 500;
}

.tool-links {
  margin-top: 30px;
  text-align: center;
}

.tool-links h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

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

.button-group .button {
  display: inline-block;
  text-decoration: none;
  background-color: #007BFF;
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 16px;
  text-align: center;
  transition: background-color 0.3s;
}

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

.action-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

button {
  background-color: #007BFF;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

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

footer {
  text-align: center;
  padding: 30px 20px;
  background: #fff;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  font-size: 14px;
  color: #333;
}

footer .footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  text-align: left;
}

footer .footer-container .footer-section {
  flex: 1;
  margin: 10px;
  min-width: 200px;
}

footer .footer-container .footer-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
}

footer .footer-container .footer-section ul {
  list-style-type: none;
  padding: 0;
}

footer .footer-container .footer-section ul li {
  margin-bottom: 10px;
}

footer .footer-container .footer-section ul li a {
  text-decoration: none;
  color: #007BFF;
  font-weight: 500;
  transition: color 0.3s;
}

footer .footer-container .footer-section ul li a:hover {
  color: #0056b3;
}

footer .footer-container .footer-socials {
  display: flex;
  justify-content: space-around;
  align-items: center;
  font-size: 18px;
}

footer .footer-container .footer-socials a {
  color: #333;
  padding: 5px;
  transition: color 0.3s ease;
}

footer .footer-container .footer-socials a:hover {
  color: #007BFF;
}

footer .footer-bottom {
  margin-top: 20px;
  font-size: 14px;
}

@media (max-width: 768px) {
  header {
    padding: 10px 15px;
  }

  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  header h1 {
    font-size: 20px;
    margin-bottom: 10px;
  }

  nav ul {
    width: 100%;
    padding-left: 0;
  }

  nav ul li {
    margin: 5px 0;
  }

  nav ul li a {
    padding: 5px 10px;
    font-size: 14px;
  }

  .word-counter-section {
    padding: 15px;
    margin: 10px;
  }

  .word-counter-section h2 {
    font-size: 18px;
  }

  .results {
    grid-template-columns: 1fr;
  }

  .button-group {
    flex-direction: column;
    gap: 10px;
  }

  .tool-links .button-group a {
    width: 100%;
    text-align: center;
  }

  .action-buttons button {
    width: 100%;
    padding: 12px;
  }

  footer .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  footer .footer-container .footer-section {
    margin-bottom: 20px;
    text-align: center;
  }

  footer .footer-container .footer-socials {
    justify-content: center;
  }
}