:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo span { color: var(--text); }

.nav a {
  margin-left: 1.5rem;
  color: var(--text-light);
  font-weight: 500;
}

.nav a:hover { color: var(--primary); text-decoration: none; }

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1rem; }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero p { color: var(--text-light); font-size: 1.2rem; max-width: 600px; margin: 0 auto; }

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.tool-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
  color: var(--text);
}

.tool-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-card .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.tool-card h3 { margin-bottom: 0.3rem; }
.tool-card p { color: var(--text-light); font-size: 0.9rem; }

/* Tool Page Layout */
.tool-page { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; }
.tool-page h1 { margin-bottom: 0.5rem; }
.tool-page .desc { color: var(--text-light); margin-bottom: 1.5rem; }

.tool-area {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  resize: vertical;
  background: var(--bg);
}

textarea:focus, input:focus { outline: 2px solid var(--primary); border-color: transparent; }

.btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.75rem;
  margin-right: 0.5rem;
  transition: background 0.2s;
}

.btn:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--text-light); }
.btn-secondary:hover { background: var(--text); }

label { display: block; font-weight: 600; margin-bottom: 0.4rem; margin-top: 0.75rem; }

/* Ad placeholder */
.ad-slot {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  margin: 1.5rem 0;
  min-height: 90px;
}

/* SEO content section */
.seo-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.seo-content h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.seo-content p, .seo-content li { color: var(--text-light); font-size: 0.95rem; }
.seo-content ul { padding-left: 1.5rem; margin: 0.5rem 0; }

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* Responsive */
@media (max-width: 600px) {
  .header { padding: 0.75rem 1rem; }
  .hero h1 { font-size: 1.8rem; }
  .tool-grid { grid-template-columns: 1fr; }
  .nav a { margin-left: 1rem; font-size: 0.9rem; }
}
