/* Reset and base styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  color: #333;
}

header, footer {
  background: #eee;
  padding: 20px 10px;
  text-align: center;
}

header h1 {
  margin: 0 0 5px 0;
}

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

/* Typography */
h1, h2, h3 {
  line-height: 1.2;
}

p {
  line-height: 1.6;
}

/* Navigation */
nav {
  margin-top: 10px;
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #0055aa;
}

/* Mobile nav */
@media (max-width: 600px) {
  nav a {
    display: block;
    margin: 10px 0;
    font-size: 18px;
    padding: 10px;
    background: #ddd;
    border-radius: 5px;
    text-align: center;
  }
}

/* Updated Tool index links - Only this section has changed */
.tool-index {
  list-style: none;
  padding: 0;
  margin: 15px 0 25px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tool-index li a {
  display: inline-block;
  background: #e0e0e0;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.2s ease;
  border: 1px solid #d0d0d0;
  text-align: center;
}

.tool-index li a:hover {
  background: #d0d0d0;
  transform: translateY(-1px);
}

@media (min-width: 601px) {
  .tool-index {
    gap: 12px;
    margin: 20px 0 30px 0;
  }
  .tool-index li a {
    padding: 8px 16px;
    font-size: 1em;
  }
}

@media (max-width: 600px) {
  .tool-index {
    gap: 6px;
  }
  .tool-index li a {
    padding: 7px 12px;
    font-size: 0.9em;
  }
}

/* Tools container and cards */
.tools-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.tool-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  width: 280px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.tool-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.tool-card button {
  background: #FF9900;
  border: none;
  padding: 10px 16px;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

/* Mobile layout override */
@media (max-width: 600px) {
  body {
    font-size: 16px;
    padding: 0 10px;
  }

  main {
    padding: 15px;
  }

  .tools-container {
    display: block;
    padding: 0 10px;
  }

  .tool-card {
    width: 100%;
    max-width: none;
    margin-bottom: 20px;
  }

  .tool-index li {
    margin-bottom: 10px;
  }

  .tool-index li:last-child {
    margin-bottom: 0;
  }
}
