
:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --success: #16a34a;
  --error: #dc2626;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --text: #111827;
  --radius: 8px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.dark {
  --bg: #1f2937;
  --card-bg: #111827;
  --text: #f9fafb;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

header, footer {
  background: var(--card-bg);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: background 0.3s;
}

header h1 {
  margin: 0;
  color: var(--primary);
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: var(--primary);
}

nav a:hover {
  color: var(--primary-dark);
}

main {
  flex: 1;
  max-width: 800px;
  margin: 2rem auto;
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: background 0.3s;
}

.toggle-theme {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--primary);
}

footer {
  font-size: 0.9rem;
  color: #6b7280;
}

.tool-album {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tool-tile {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-tile img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: var(--radius);
  margin-bottom: 0.8rem;
}

.tool-tile h3 {
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.tool-tile p {
  font-size: 0.9rem;
  color: var(--text);
}

.tool-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.tool-row {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap; /* allows stacking on small screens */
  margin-top: 1.5rem;
}

.tool-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  width: 250px;
  height: 250px; /* makes them square */
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-box img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.8rem;
}

.tool-box h3 {
  margin-bottom: 0.4rem;
  color: var(--primary);
}

.tool-box p {
  font-size: 0.85rem;
  line-height: 1.3;
}

.tool-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .tool-box {
    width: 100%;
    height: auto;
  }
}
