/* === styles.css - Modern, clean design inspired by FutureTools.io === */

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #ffffff;
  margin: 0;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

body.dark {
  background: #121212;
  color: #e0e0e0;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* === Hero Section === */
.hero {
  text-align: center;
  padding: 50px 20px 30px;
  margin-bottom: 20px;
}

.logo {
  font-size: 2.5em;
  font-weight: 700;
  color: #005cbf;
}

.tagline {
  font-size: 1.1em;
  color: #666;
  margin: 10px 0 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* === Search Bar === */
.search-container {
  max-width: 600px;
  margin: 0 auto 30px;
}

#search {
  width: 100%;
  padding: 14px 20px;
  font-size: 1em;
  border: 2px solid #ddd;
  border-radius: 12px;
  outline: none;
  transition: border 0.2s;
}

#search:focus {
  border-color: #005cbf;
}

body.dark #search {
  background: #1e1e1e;
  color: #fff;
  border-color: #444;
}

/* === Top Navigation Tabs === */
.top-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  background: #fcfcfc;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  color: #555;
  text-decoration: none;
  padding: 8px 16px;
  font-size: 0.95em;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #005cbf;
  background: #f0f7ff;
}

.nav-link.active {
  color: #005cbf;
  background: #e6f0ff;
  font-weight: 600;
}

body.dark .top-nav {
  border-bottom-color: #444;
  background: #1a1a1a;
}

body.dark .nav-link {
  color: #bbb;
}

body.dark .nav-link:hover,
body.dark .nav-link.active {
  color: #8fc1e3;
  background: #2a4566;
}

/* === Tool Cards Grid === */
#tool-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.tool-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 18px;
  background: #fdfdfd;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  border-color: #ccc;
}

body.dark .tool-card {
  background: #1e1e1e;
  border-color: #333;
}

/* Tool Card Header */
.tool-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-card h3 a {
  color: #005cbf;
  text-decoration: none;
  font-weight: 600;
}

.tool-card h3 a:hover {
  text-decoration: underline;
}

.github-link {
  font-size: 0.85em;
  color: #005cbf;
  text-decoration: none;
  margin-left: 8px;
  font-weight: 500;
}

/* Description */
.tool-card p {
  margin: 0 0 12px 0;
  font-size: 0.95em;
  color: #555;
  flex-grow: 1;
}

body.dark .tool-card p {
  color: #bbb;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  padding: 4px 10px;
  background: #e1f2ff;
  color: #005fcc;
  font-size: 0.75em;
  border-radius: 8px;
  font-weight: 500;
}

body.dark .tag {
  background: #2d4566;
  color: #8fc1e3;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 60px;
  color: #888;
  font-size: 0.9em;
  padding: 20px;
}

footer a {
  color: #005cbf;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Dark Mode Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2em;
  z-index: 100;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

body.dark .theme-toggle {
  background: #2a2a2a;
  color: #fff;
  border-color: #555;
}

/* Responsive */
@media (max-width: 600px) {
  .logo {
    font-size: 2em;
  }
  #tool-list {
    grid-template-columns: 1fr;
  }
}