/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* ===== BASE ===== */
/* Define Colors */
:root {
  --bg-body: #0f172a;
  --bg-card: #020617;
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #38bdf8;
  --border: #1e293b;
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --accent: #0ea5e9;
  --border: #e2e8f0;
}

body {
  background: var(--bg-body);
  color: var(--text-main);
  transition: background 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  /* ... keep your other card styles ... */
}

h1, h2, .tool-card h3 {
  color: var(--accent);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.btn {
  margin-top: 1.2rem;
  padding: 1rem 2rem;
  border: 1px solid #38bdf8;
  color: #38bdf8;
  text-decoration: none;
  border-radius: 10px;
}

/* ===== AI TOOLS SECTION ===== */
.ai-tools-section {
  background: #020617;
}

.ai-tools-section .subtitle {
  text-align: center;
  color: #9ca3af;
  margin-bottom: 2.5rem;
}

/* ===== SEARCH ===== */
.tools-search {
  max-width: 500px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.tools-search input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 30px;
  border: 1px solid #334155;
  background: #020617;
  color: #fff;
  font-size: 16px;
}

.tools-search input:focus {
  outline: none;
  border-color: #38bdf8;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
  min-height: 400px; /* This prevents the section below from jumping up */
  margin-top: 2rem;
}

/* ===== CARD ===== */
.tool-card {
  background: #020617;
  border: 1px solid #1e293b;
  padding: 1.8rem;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column; /* Allows us to use margin-top: auto for the button */
  /* ... keep your existing styles ... */
}

/* hover */
.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}

.tool-card h3 {
  color: #38bdf8;
  margin-bottom: 0.4rem;
}

.tool-card .purpose {
  font-size: 0.85rem;
  color: #22d3ee;
  margin-bottom: 0.8rem;
}

.tool-card .desc {
  font-size: 0.95rem;
  color: #d1d5db;
  margin-bottom: 1.4rem;
}

.tool-card a {
  display: block; /* Make it full width of the card */
  text-align: center;
  margin-top: auto; /* Pushes button to bottom if descriptions vary in length */
  padding: 12px;
  background: #38bdf8;
  color: #020617;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  transition: filter 0.2s ease;
}
.tool-card a:hover {
  filter: brightness(1.2); /* Subtle glow effect */
}

/* ===== REVEAL ANIMATION (SAFE) ===== */
.reveal {
  opacity: 0; /* Start hidden for the animation to work */
}

.reveal.active {
  animation: fadeUp 0.6s cubic-bezier(0.2, 1, 0.3, 1) forwards;
}
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FOOTER ===== */
footer {
  text-align: center;
  padding: 2rem;
  background: #020617;
  color: #9ca3af;
}

#noResults {
  text-align: center;
  margin-top: 30px;
  font-size: 1rem;
  opacity: 0.6;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #38bdf8;
  background: transparent;
  color: #38bdf8;
  cursor: pointer;
  transition: 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
  background: #38bdf8;
  color: #0f172a;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.share-btn:hover {
  transform: scale(1.2);
}

.my-review {
  background: rgba(56, 189, 248, 0.1); /* Subtle blue tint */
  border-left: 3px solid #38bdf8;
  padding: 10px;
  margin: 15px 0;
  border-radius: 4px;
}

.my-review h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #38bdf8;
  margin-bottom: 5px;
}

.my-review p {
  font-style: italic;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.theme-switch-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

#themeToggle {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
section {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  position: relative; /* Keeps child elements contained */
  width: 100%;
}
.category-badge {
  background: var(--accent);
  color: var(--bg-card);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: bold;
}
.legal-disclaimer {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.legal-disclaimer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}











