/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

.logo a {
  text-decoration: none;
}

.logo-text {
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: bold;
  color: #6c63ff;
}

.logo-dot {
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: bold;
  color: #333;
}

.logo-domain {
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: bold;
  color: #333;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 15px;
}

/* Updated a tag hover style */
.nav-menu li a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-menu li a::after {
  content: '';
  opacity: 0;
  position: absolute;
  bottom: -4px;
  left: -10%;
  width: 100%;
  height: 2px;
  background-color: #6c63ff;
  transition: left 0.3s ease;
}

.nav-menu li a.active {
  color: #6c63ff;
}

.nav-menu li a.active::after {
  left: 0;
  opacity: 1;
}

.nav-menu li a:hover {
  color: #6c63ff;
}

.nav-menu li a:hover::after {
  left: 0;
  opacity: 1;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* Mobile Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 998;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-close {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  position: absolute;
  top: 20px;
  right: 20px;
}

/* Main Content Styles */
.main {
  padding: 20px 0;
}

.category-nav {
  background-color: #fff;
  border-radius: 8px;
  padding: 10px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-nav ul {
  display: flex;
  list-style: none;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 5px 0;
}

/* Updated category nav a tag hover style */
.category-nav ul li a {
  text-decoration: none;
  color: #333;
  font-size: 14px;
  padding: 8px 15px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.category-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  opacity: 0;
  left: -10%;
  width: 100%;
  height: 2px;
  background-color: #6c63ff;
  transition: left 0.3s ease;
}

.category-nav ul li a.active {
  background-color: #6c63ff;
  color: #fff;
}

.category-nav ul li a:hover:not(.active) {
  color: #6c63ff;
}

.category-nav ul li a:hover:not(.active)::after {
  left: 0;
  opacity: 1;
}

/* Tool Search Styles */
.tool-search {
  margin-bottom: 20px;
  position: relative;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

#tool-search-input {
  width: 100%;
  padding: 12px 45px 12px 15px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 16px;
  background-color: #fff;
  transition: border-color 0.3s, box-shadow 0.3s;
}

#tool-search-input:focus {
  outline: none;
  border-color: #6c63ff;
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

#search-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 5px;
  transition: color 0.3s;
}

#search-button:hover {
  color: #6c63ff;
}

/* No Results Message Styles */
.no-results {
  text-align: center;
  padding: 10rem 2rem;
  background-color: #fff;
  border-radius: 8px;
  margin: 3rem 0px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: none;
}

.no-results p {
  color: #666;
  margin: 0;
}

/* Tool Grid Styles */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tool-item {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  height: 100%;
}

.tool-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Updated tool link hover style */
.tool-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: transform 0.3s ease;
}

.tool-link:hover {
  transform: scale(1.02);
}

.tool-icon {
  font-size: 40px;
  color: #6c63ff;
  margin-bottom: 15px;
}

.tool-item h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

.tool-item p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.tool-actions {
  position: absolute;
  top: 15px;
  right: 15px;
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #ccc;
  cursor: pointer;
  transition: color 0.3s;
}

.favorite-btn:hover {
  color: #ffc107;
}

.favorite-btn.active {
  color: #ffc107;
}

/* Footer Styles */
.footer {
  background-color: #333;
  color: #fff;
  padding: 30px 0;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-links h4 {
  margin-bottom: 15px;
  font-size: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 8px;
}

/* Updated footer link hover style */
.footer-links ul li a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.footer-links ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -100%;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transition: left 0.3s ease;
}

.footer-links ul li a:hover {
  color: #fff;
}

.footer-links ul li a:hover::after {
  left: 0;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #6c63ff;
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #5a52e0;
  transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .logo-text,
  .logo-dot,
  .logo-domain {
    font-size: 30px;
  }
}

@media (max-width: 768px) {
  .category-nav ul {
    gap: 0px;
  }
  .menu-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: #fff;
    box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
    transition: right 0.3s;
    z-index: 999;
    padding: 20px;
  }

  .nav.open {
    right: 0;
  }

  .nav-close {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    margin-top: 60px;
  }

  .nav-menu li a {
    display: block;
    padding: 10px;
  }

  .tool-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .logo-text,
  .logo-dot,
  .logo-domain {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 15px;
  }

  .logo-text,
  .logo-dot,
  .logo-domain {
    font-size: 20px;
  }
}

/* About Page Styles */
.about-section {
  padding: 40px 0;
}

.about-section h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
}

.about-image {
  margin-bottom: 30px;
  color: #6c63ff;
}

.about-text {
  max-width: 800px;
}

.about-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.about-features {
  text-align: center;
}

.about-features h2 {
  margin-bottom: 30px;
  font-size: 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-item {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2rem;
  color: #6c63ff;
  margin-bottom: 15px;
}

.feature-item h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.feature-item p {
  color: #666;
}

/* Contact Page Styles */
.contact-section {
  padding: 40px 0;
}

.contact-section h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.contact-section p {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.contact-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-info,
.contact-form {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-info h2,
.contact-form h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-icon {
  font-size: 1.5rem;
  color: #6c63ff;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f0f0f0;
  border-radius: 50%;
}

.contact-details h3 {
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.contact-details p {
  margin: 0;
  color: #666;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #6c63ff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-btn:hover {
  background-color: #5a52d1;
}

/* Privacy & Terms Pages Styles */
.privacy-section,
.terms-section {
  padding: 40px 0;
}

.privacy-section h1,
.terms-section h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
}

.privacy-section .privacy-date,
.terms-section .privacy-date {
  text-align: center;
  margin-bottom: 40px;
  font-style: italic;
}

.privacy-content,
.terms-content {
  max-width: 1000px;
  margin: 0 auto;
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.privacy-item,
.terms-item {
  margin-bottom: 30px;
}

.privacy-item:last-child,
.terms-item:last-child {
  margin-bottom: 0;
}

.privacy-item h2,
.terms-item h2 {
  margin-bottom: 15px;
  font-size: 1.5rem;
  color: #6c63ff;
}

.privacy-item p,
.terms-item p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.privacy-item ul,
.terms-item ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.privacy-item li,
.terms-item li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Responsive Styles for New Pages */
@media (min-width: 768px) {
  .about-content {
    flex-direction: row;
    text-align: left;
  }

  .about-image {
    margin-right: 40px;
    margin-bottom: 0;
  }

  .contact-container {
    flex-direction: row;
  }

  .contact-info,
  .contact-form {
    flex: 1;
  }
}

@media (max-width: 767px) {
  .about-section h1,
  .contact-section h1,
  .privacy-section h1,
  .terms-section h1 {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .about-content {
    padding: 0 20px;
  }

  .contact-method {
    flex-direction: column;
    text-align: center;
  }

  .privacy-content,
  .terms-content {
    padding: 20px;
  }
}
