/* DevToolBox - Developer Tools Directory
 * Design: Clean, modern, professional */

:root {
  --bg: #0a0e14;
  --bg-card: #131820;
  --bg-card-hover: #1a2030;
  --border: #1e2a3a;
  --text: #c8d6e5;
  --text-dim: #6b7d95;
  --text-bright: #e8f0fe;
  --accent: #39bae6;
  --accent-glow: rgba(57, 186, 230, 0.15);
  --green: #7fd962;
  --orange: #ffad66;
  --purple: #d2a6ff;
  --red: #f07178;
  --yellow: #ffd580;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
}

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

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

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #5ccfe6; }

/* Header */
header {
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}

header .inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo .icon { font-size: 1.5rem; }

nav { display: flex; gap: 20px; }
nav a {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
nav a:hover, nav a.active { color: var(--accent); border-color: var(--accent); }

/* Main */
main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

/* Hero */
.hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* Search */
.search-box {
  max-width: 520px;
  margin: 0 auto 40px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input::placeholder { color: var(--text-dim); }
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-box .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1.1rem;
}

/* Cards */
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.section-title .dot.cyan { background: var(--accent); }
.section-title .dot.green { background: var(--green); }
.section-title .dot.purple { background: var(--purple); }
.section-title .dot.orange { background: var(--orange); }

.grid { display: grid; gap: 16px; }

.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-6 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.25s;
  cursor: pointer;
  display: block;
  color: inherit;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card .card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.card .card-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .card-meta {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.card .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tag.free { background: rgba(127, 217, 98, 0.15); color: var(--green); }
.tag.paid { background: rgba(255, 173, 102, 0.15); color: var(--orange); }
.tag.open-source { background: rgba(210, 166, 255, 0.15); color: var(--purple); }
.tag.featured { background: rgba(57, 186, 230, 0.15); color: var(--accent); }

/* Category cards */
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
  text-align: center;
  display: block;
  color: inherit;
}

.category-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.category-card .cat-icon { font-size: 2rem; margin-bottom: 10px; }
.category-card .cat-name { font-size: 1.1rem; font-weight: 600; color: var(--text-bright); }
.category-card .cat-count { font-size: 0.85rem; color: var(--text-dim); margin-top: 4px; }

/* Featured banner */
.featured-banner {
  background: linear-gradient(135deg, rgba(57,186,230,0.08), rgba(168,123,250,0.08));
  border: 1px solid rgba(57,186,230,0.2);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.featured-banner .banner-text { color: var(--text-dim); font-size: 0.9rem; }
.featured-banner .banner-cta {
  background: var(--accent);
  color: #000;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.featured-banner .banner-cta:hover { opacity: 0.85; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 32px 24px;
  text-align: center;
}

footer .footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 12px; flex-wrap: wrap; }
footer .footer-links a { font-size: 0.9rem; color: var(--text-dim); }
footer .footer-links a:hover { color: var(--accent); }
footer .copyright { font-size: 0.82rem; color: var(--text-dim); }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 8px; color: var(--border); }

/* Tool detail page */
.tool-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
}

.tool-hero h1 { font-size: 1.8rem; color: var(--text-bright); margin-bottom: 8px; }
.tool-hero .tool-url { color: var(--accent); font-size: 0.95rem; margin-bottom: 16px; display: block; }
.tool-hero .tool-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tool-hero .tool-desc { color: var(--text); font-size: 1.05rem; line-height: 1.7; }

.tool-cta {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 16px;
  transition: opacity 0.2s;
}

.tool-cta:hover { opacity: 0.85; }

/* About page */
.about-section { margin-bottom: 40px; }
.about-section h2 {
  font-size: 1.4rem;
  color: var(--text-bright);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.about-section p { color: var(--text); line-height: 1.8; margin-bottom: 12px; }
.about-section ul { padding-left: 20px; color: var(--text); }
.about-section li { margin-bottom: 8px; line-height: 1.6; }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.6rem; }
  .grid-2, .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr; }
  nav { gap: 12px; }
  nav a { font-size: 0.82rem; }
}
