* {
  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;
  position: relative;
}

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

header h1 a {
  text-decoration: none;
  color: #333;
  font-size: 24px;
  font-weight: 500;
  transition: color 0.3s;
}

header h1 a:hover {
  color: #007BFF;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  padding: 5px;
  z-index: 100;
}

.main-nav {
  display: flex;
  transition: all 0.3s ease-in-out;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.main-nav ul li {
  margin: 0;
}

.main-nav ul li a {
  text-decoration: none;
  color: #007BFF;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: #0056b3;
  background-color: #f0f4ff;
}

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;
  color: #2c3e50;
}

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

textarea:focus {
  outline: none;
  border-color: #007BFF;
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

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

.result {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result span:first-child {
  font-weight: 500;
  color: #2c3e50;
}

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

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

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

.footer-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #2c3e50;
}

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

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

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

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

.footer-socials {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
}

.footer-socials a {
  text-decoration: none;
  color: #333;
  font-size: 20px;
  transition: color 0.3s;
}

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

.footer-bottom {
  margin-top: 30px;
  font-size: 12px;
  color: #777;
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
  }

  .main-nav.active {
    max-height: 500px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 20px;
    width: 100%;
  }

  .main-nav ul li {
    margin: 5px 0;
  }

  .main-nav ul li a {
    display: block;
    padding: 12px 15px;
  }

  header {
    padding: 10px 15px;
  }

  header h1 a {
    font-size: 20px;
  }

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

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

  textarea {
    height: 200px;
    font-size: 14px;
    padding: 12px;
  }

  .result {
    padding: 12px;
    font-size: 14px;
  }

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

  .footer-section {
    text-align: center;
  }

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

@media (max-width: 480px) {
  .word-counter-section h2 {
    font-size: 20px;
  }

  textarea {
    height: 180px;
  }

  .result {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .result span:first-child {
    font-size: 13px;
  }
}