:root {
  --bg-dark: #0a0a0f;
  --bg-card: rgba(20, 20, 25, 0.7);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #818cf8;
  --accent-glow: rgba(129, 140, 248, 0.5);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.glow {
  position: fixed;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.15;
  z-index: -1;
  pointer-events: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.logo-icon {
  font-size: 1.5rem;
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  color: transparent;
}

h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

h1 span {
  color: var(--text-muted);
  font-weight: 400;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-left: 2rem;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

.hero {
  text-align: center;
  padding: 5rem 0 3rem;
}

.hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #f8fafc, #94a3b8);
  -webkit-background-clip: text;
  color: transparent;
  letter-spacing: -1px;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.category-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  fontSize: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 5rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.8rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #818cf8, #a78bfa);
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-color: rgba(129, 140, 248, 0.3);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.tool-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
}

.tool-category {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tool-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.tool-views {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.tool-btn {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
}

footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer a {
  color: var(--text-main);
  text-decoration: none;
}

.copyright {
  margin-top: 0.5rem;
  font-size: 0.8rem !important;
  opacity: 0.6;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
}
