/* cf-static — Global Styles */

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --text: #e4e4e7;
  --text2: #9ca3af;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --success: #22c55e;
  --radius: 12px;
  --max-w: 960px;
}

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

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

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

/* ── Main ── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem;
}

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

.hero h1 {
  font-size: 2.2rem;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.8rem;
}

.hero .description {
  color: var(--text2);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

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

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s;
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tool-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.8rem;
}

.tool-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.tool-card p {
  color: var(--text2);
  font-size: 0.85rem;
}

/* ── Tool Area ── */
.tool-area {
  margin: 2rem 0;
}

.tool-container textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 1rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.9rem;
  resize: vertical;
}

.tool-actions {
  display: flex;
  gap: 0.8rem;
  margin: 1rem 0;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
}

.btn-secondary:hover { border-color: var(--accent); }

/* ── FAQ ── */
.faq {
  margin-top: 3rem;
}

.faq h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.8rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin-top: 0.8rem;
  color: var(--text2);
}

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

footer nav {
  justify-content: center;
  margin-top: 0.5rem;
}

footer nav a {
  color: var(--text2);
  text-decoration: none;
  margin: 0 0.8rem;
}

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

/* ── Responsive ── */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .tools-grid { grid-template-columns: 1fr; }
  main { padding: 1rem; }
}
