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

body {
  font-family: 'Segoe UI', 'Liberation Sans', 'Cantarell', 'DejaVu Sans', sans-serif;
  background: #0D1117;
  min-height: 100vh;
  color: #C9D1D9;
}

.header {
  text-align: center;
  padding: 60px 20px 40px;
  background: #161B22;
  border-bottom: 2px solid #1793D1;
}

.header h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  color: #1793D1;
  text-shadow: 0 0 20px rgba(23, 147, 209, 0.3);
  font-weight: 700;
}

.header p {
  font-size: 1.2rem;
  color: #8B949E;
}

/* Controls Section */
.controls {
  background: #161B22;
  padding: 20px 20px 40px;
  border-bottom: 1px solid #21262D;
}

.controls-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.search-container {
  position: relative;
  flex: 1;
  min-width: 300px;
  max-width: 400px;
}

#search-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border-radius: 6px;
  border: 1px solid #30363D;
  background: #0D1117;
  color: #C9D1D9;
  font-size: 1rem;
  transition: all 0.3s ease;
}

#search-input:focus {
  outline: none;
  border-color: #1793D1;
  box-shadow: 0 0 0 3px rgba(23, 147, 209, 0.2);
  background: #161B22;
}

#search-input::placeholder {
  color: #6E7681;
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #6E7681;
}

.filter-container,
.sort-container {
  min-width: 180px;
}

#tag-filter,
#sort-select {
  width: 100%;
  padding: 15px 20px;
  border-radius: 6px;
  border: 1px solid #30363D;
  background: #0D1117;
  color: #C9D1D9;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#tag-filter:focus,
#sort-select:focus {
  outline: none;
  border-color: #1793D1;
  box-shadow: 0 0 0 3px rgba(23, 147, 209, 0.2);
  background: #161B22;
}

#tag-filter option,
#sort-select option {
  background: #161B22;
  color: #C9D1D9;
}

.main-content {
  padding: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.results-info {
  margin-bottom: 20px;
  text-align: center;
  color: #8B949E;
  font-size: 1rem;
}

#tool-list {
  display: block;
  margin-bottom: 40px;
}

/* Category Header Styles */
.category-header {
  display: flex;
  align-items: center;
  margin: 60px 0 30px 0;
  position: relative;
}

.category-header:first-child {
  margin-top: 20px;
}

.category-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1793D1;
  text-align: center;
  padding: 0 30px;
  background: #0D1117;
  white-space: nowrap;
  text-shadow: 0 0 15px rgba(23, 147, 209, 0.3);
  position: relative;
  z-index: 1;
}

.category-divider {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #21262D 20%, 
    #1793D1 50%, 
    #21262D 80%, 
    transparent 100%
  );
  position: relative;
}

.category-divider::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(23, 147, 209, 0.5) 50%, 
    transparent 100%
  );
}

/* Category Tools Container */
.category-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.tool-card {
  background: #161B22;
  border-radius: 6px;
  padding: 25px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  border: 1px solid #30363D;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  opacity: 1;
  transform: scale(1);
  position: relative;
}

.tool-card:hover {
  transform: translateY(-3px);
  background: #1C2128;
  border-color: #1793D1;
  box-shadow: 0 8px 24px rgba(23, 147, 209, 0.15);
}

.tool-card:active {
  transform: translateY(-1px) scale(0.99);
}

.tool-card.hidden {
  display: none;
}

.tool-icon {
  font-size: 2.5rem;
  min-width: 60px;
  text-align: center;
}

.tool-meta {
  flex: 1;
}

.tool-meta strong {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: #C9D1D9;
  font-weight: 600;
}

.tool-meta p {
  color: #8B949E;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  background: #0D1117;
  color: #58A6FF;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
  border: 1px solid #30363D;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #8B949E;
}

.no-results .icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #C9D1D9;
}

.no-results p {
  font-size: 1rem;
}

.footer {
  background: #161B22;
  padding: 40px 20px;
  margin-top: 60px;
  border-top: 1px solid #30363D;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-logo {
  font-size: 2rem;
}

.footer-text {
  color: #8B949E;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #58A6FF;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #1793D1;
  text-decoration: underline;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icon {
  display: block;
  width: 40px;
  height: 40px;
  background: #21262D;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid #30363D;
  transition: all 0.3s;
}

.social-icon:hover {
  background: #30363D;
  border-color: #1793D1;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .header h1 {
    font-size: 2.5rem;
  }
  
  .header p {
    font-size: 1rem;
  }
  
  .controls-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-container {
    min-width: unset;
    max-width: unset;
  }
  
  .filter-container,
  .sort-container {
    min-width: unset;
  }
  
  .category-tools {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .tool-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .tool-meta {
    text-align: center;
  }
  
  .category-title {
    font-size: 1.4rem;
    padding: 0 20px;
  }
  
  .category-header {
    margin: 40px 0 20px 0;
  }
}