/* Agent Fly — Dark Theme */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #0a0a10; color: #e0e0e0; min-height: 100vh; }
.container { max-width: 1040px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Header ── */
header { text-align: center; padding: 3.5rem 0 2.5rem; }
header h1 { font-size: 2.6rem; font-weight: 800; background: linear-gradient(135deg, #a78bfa, #6366f1, #3b82f6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -0.02em; }
header p { color: #6b7280; margin-top: 0.6rem; font-size: 1.05rem; }

/* ── Section headings ── */
h2 { font-size: 1.35rem; font-weight: 700; color: #e0e0e0; margin-bottom: 1.2rem; padding-bottom: 0.6rem; border-bottom: 2px solid #1e1e2e; position: relative; }
h2::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 48px; height: 2px; background: linear-gradient(90deg, #6366f1, #a78bfa); border-radius: 1px; }

/* ── Cards ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.2rem; }
.card { background: #12121c; border: 1px solid #1e1e2e; border-radius: 12px; padding: 1.4rem; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; position: relative; overflow: hidden; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, #6366f1, #a78bfa); opacity: 0; transition: opacity 0.2s; }
.card:hover { transform: translateY(-3px); border-color: #6366f144; box-shadow: 0 8px 30px rgba(99, 102, 241, 0.08); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: #f0f0f0; }
.card .meta { font-size: 0.8rem; color: #6b7280; margin-bottom: 0.5rem; }
.card .desc { color: #9ca3af; font-size: 0.85rem; margin-bottom: 0.8rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.card .tags span { background: rgba(99, 102, 241, 0.1); color: #818cf8; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.7rem; border: 1px solid rgba(99, 102, 241, 0.12); }
.empty { text-align: center; color: #4b5563; padding: 4rem 0; }
footer { text-align: center; color: #4b5563; padding: 3.5rem 0 1.5rem; font-size: 0.8rem; border-top: 1px solid #1e1e2e; margin-top: 2rem; }
footer a { color: #818cf8; text-decoration: none; }
.badge { display: inline-block; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; padding: 0.1rem 0.45rem; border-radius: 4px; font-size: 0.65rem; margin-left: 0.4rem; font-weight: 600; vertical-align: middle; }
.badge.free { background: linear-gradient(135deg, #10b981, #059669); }

/* ── Stats bar ── */
.stats-bar { display: flex; justify-content: center; gap: 1.2rem; margin: 1rem 0 1.8rem; }
.stat { text-align: center; background: #12121c; border: 1px solid #1e1e2e; border-radius: 12px; padding: 1.2rem 1.8rem; min-width: 130px; transition: border-color 0.2s, box-shadow 0.2s; }
.stat:hover { border-color: #6366f133; box-shadow: 0 4px 20px rgba(99, 102, 241, 0.06); }
.stat-num { display: block; font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, #818cf8, #6366f1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 0.78rem; color: #6b7280; margin-top: 0.2rem; display: block; }

/* ── Install card ── */
.install-card { display: flex; align-items: flex-start; gap: 1.5rem; background: linear-gradient(135deg, #12122a, #0f1a2e); border: 1px solid rgba(99, 102, 241, 0.2); border-radius: 16px; padding: 1.8rem 2rem; margin: 0 0 2.5rem; position: relative; overflow: hidden; }
.install-card::before { content: ''; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%); border-radius: 50%; }
.install-card-icon { font-size: 2.5rem; line-height: 1; flex-shrink: 0; }
.install-card-content { flex: 1; }
.install-card-content h3 { margin-bottom: 0.4rem; color: #e0e0e0; font-size: 1.15rem; }
.install-card-content p { color: #9ca3af; font-size: 0.9rem; margin-bottom: 1rem; }
.install-card-meta { color: #6b7280; font-size: 0.78rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid #1e1e2e; }
.code-block { display: flex; align-items: center; justify-content: space-between; background: #080810; border: 1px solid #1e1e30; border-radius: 8px; padding: 0.65rem 1rem; cursor: pointer; transition: border-color 0.2s; }
.code-block:hover { border-color: #6366f1; }
.code-block code { color: #93c5fd; font-family: 'Consolas', 'Courier New', monospace; font-size: 0.82rem; user-select: all; }
.copy-hint { color: #818cf8; font-size: 0.75rem; opacity: 0.6; transition: opacity 0.2s; }
.code-block:hover .copy-hint { opacity: 1; }
.code-block.copied { border-color: #10b981; }
.code-block.copied .copy-hint { color: #10b981; opacity: 1; }
.install-step { display: flex; align-items: flex-start; gap: 0.8rem; margin-top: 0.7rem; }
.step-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; }
.step-content { flex: 1; }
.step-desc { color: #6b7280; font-size: 0.78rem; margin-top: 0.25rem; }
.code-block-plain { display: flex; align-items: center; background: transparent; border: 1px dashed #1e1e30; border-radius: 8px; padding: 0.65rem 1rem; }
.code-block-plain code { color: #a5b4fc; font-family: 'Consolas', 'Courier New', monospace; font-size: 0.82rem; }

/* ── Eco summary ── */
.eco-summary { margin: 2.5rem 0; }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.2rem; }
.eco-item { background: #12121c; border: 1px solid #1e1e2e; border-radius: 14px; padding: 1.5rem 1.3rem; text-align: center; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.eco-item:hover { border-color: #6366f133; transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.2); }
.eco-icon { font-size: 1.8rem; margin-bottom: 0.6rem; display: inline-block; width: 52px; height: 52px; line-height: 52px; border-radius: 14px; background: #1a1a2a; }
.eco-item:nth-child(1) .eco-icon { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(251,191,36,0.1)); }
.eco-item:nth-child(2) .eco-icon { background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(52,211,153,0.1)); }
.eco-item:nth-child(3) .eco-icon { background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(99,102,241,0.1)); }
.eco-item:nth-child(4) .eco-icon { background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(168,85,247,0.1)); }
.eco-item h3 { font-size: 1rem; color: #e0e0e0; margin-bottom: 0.4rem; font-weight: 700; }
.eco-item p { font-size: 0.82rem; color: #9ca3af; line-height: 1.6; }

/* ── Detail page ── */
.detail-card { background: #1a1a24; border: 1px solid #2a2a36; border-radius: 12px; padding: 2rem; margin: 1.5rem 0; }
.detail-section { margin-bottom: 1.5rem; }
.detail-section h3 { color: #667eea; margin-bottom: 0.8rem; font-size: 1rem; }
.detail-section table { width: 100%; }
.detail-section table td { padding: 0.3rem 0.5rem; }
.detail-section table td:first-child { color: #888; width: 100px; }
.detail-section p { color: #ccc; line-height: 1.6; }
.detail-actions { text-align: center; margin-top: 2rem; }
.btn { display: inline-block; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; padding: 0.7rem 1.8rem; border-radius: 8px; text-decoration: none; font-weight: 600; transition: opacity 0.2s, box-shadow 0.2s; }
.btn:hover { opacity: 0.9; box-shadow: 0 4px 16px rgba(99,102,241,0.3); }

/* ── Responsive ── */
@media (max-width: 640px) {
  .container { padding: 1.2rem; }
  header h1 { font-size: 1.8rem; }
  .eco-grid { grid-template-columns: 1fr; }
  .stats-bar { flex-wrap: wrap; gap: 0.8rem; }
  .stat { min-width: 90px; padding: 0.8rem 1rem; }
  .install-card { flex-direction: column; padding: 1.3rem; }
}
