/* ═══════════════════════════════════════════════════════════════════
   SLATE THEME
   Dark, minimal, developer-friendly. Teal accent on deep navy.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: #0b1120; color: #cbd5e1; line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(16,185,129,0.3); }

/* ── Header ──────────────────────────────────────────────────────── */
header {
    background: rgba(11,17,32,0.85); backdrop-filter: blur(12px);
    border-bottom: 1px solid #1e293b;
    position: sticky; top: 0; z-index: 100;
}
header nav {
    max-width: 1000px; margin: 0 auto; padding: 0.7rem 1.25rem;
    display: flex; justify-content: space-between; align-items: center;
}
.site-name {
    font-weight: 700; font-size: 1.1rem; color: #f1f5f9;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.site-logo { width: 26px; height: 26px; flex-shrink: 0; }

.nav-links { display: flex; gap: 0.25rem; align-items: center; font-size: 0.85rem; }
.nav-links a, .nav-links span {
    padding: 0.3rem 0.65rem; border-radius: 6px; color: #94a3b8;
    transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: #f1f5f9; background: #1e293b; }
.nav-user { color: #10b981; }
.nav-links button {
    background: none; border: none; cursor: pointer; font: inherit;
    color: #94a3b8; padding: 0.3rem 0.65rem; border-radius: 6px;
}
.nav-links button:hover { color: #f1f5f9; background: #1e293b; }
form.inline { display: inline; }

.nav-cta {
    background: #10b981 !important; color: #021a0f !important;
    font-weight: 600; border-radius: 6px;
}
.nav-cta:hover { background: #34d399 !important; }

/* ── Flash messages ──────────────────────────────────────────────── */
.flash {
    max-width: 1000px; margin: 0.75rem auto; padding: 0.6rem 1rem;
    border-radius: 6px; font-size: 0.85rem; font-weight: 500;
    border-left: 3px solid;
}
.flash-error { background: rgba(239,68,68,0.1); color: #fca5a5; border-color: #ef4444; }
.flash-success { background: rgba(16,185,129,0.1); color: #6ee7b7; border-color: #10b981; }

/* ── Layout ──────────────────────────────────────────────────────── */
main { max-width: 1000px; margin: 0 auto; padding: 2rem 1.25rem; }
section { margin-bottom: 2.5rem; }
h1 { font-size: 1.75rem; font-weight: 700; color: #f1f5f9; margin-bottom: 0.4rem; letter-spacing: -0.02em; }
h2 { font-size: 1rem; font-weight: 600; color: #f1f5f9; margin-bottom: 0.6rem; }

.section-label {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: #10b981; margin-bottom: 0.35rem;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero {
    padding: 3rem 0 2.5rem; border-bottom: 1px solid #1e293b;
    margin-bottom: 2.5rem;
}
.hero-eyebrow {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.12em;
    color: #10b981; background: rgba(16,185,129,0.1);
    padding: 0.25rem 0.65rem; border-radius: 4px;
    margin-bottom: 0.75rem;
}
.hero h1 { font-size: 2.25rem; line-height: 1.2; }
.hero p { color: #64748b; font-size: 1rem; margin-top: 0.5rem; }

/* ── Featured row ────────────────────────────────────────────────── */
.featured-row {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.featured-item {
    background: #1e293b; border: 1px solid #334155; border-radius: 10px;
    padding: 1.15rem; transition: border-color 0.2s, background 0.2s;
}
.featured-item:hover { border-color: #10b981; background: #172033; }
.featured-name { font-weight: 700; color: #f1f5f9; margin-bottom: 0.3rem; font-size: 0.95rem; }
.featured-desc { font-size: 0.8rem; color: #64748b; margin-bottom: 0.6rem; line-height: 1.5; }

/* ── Pills (badges) ──────────────────────────────────────────────── */
.pill {
    display: inline-block; font-size: 0.65rem; padding: 0.15rem 0.55rem;
    border-radius: 4px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.04em; font-family: 'JetBrains Mono', monospace;
    background: #1e293b; color: #64748b; border: 1px solid #334155;
}
.pill-free { color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.pill-freemium { color: #93c5fd; border-color: rgba(59,130,246,0.3); }
.pill-free_trial { color: #fdba74; border-color: rgba(251,146,60,0.3); }
.pill-paid, .pill-subscription { color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.pill-usage_based { color: #c4b5fd; border-color: rgba(139,92,246,0.3); }
.pill-contact { color: #67e8f9; border-color: rgba(6,182,212,0.3); }

/* ── Tag cloud (categories) ──────────────────────────────────────── */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
    display: inline-block; padding: 0.3rem 0.7rem; border-radius: 6px;
    font-size: 0.8rem; font-weight: 500;
    background: #1e293b; color: #94a3b8; border: 1px solid #334155;
    transition: all 0.15s;
}
.tag:hover { color: #10b981; border-color: #10b981; background: rgba(16,185,129,0.08); }
.tag-hidden { display: none; }
.tag-hidden.tag-show { display: inline-block; }

.link-btn {
    background: none; border: none; cursor: pointer;
    font: inherit; font-size: 0.8rem; font-weight: 600;
    color: #10b981; margin-top: 0.5rem; padding: 0;
}
.link-btn:hover { color: #34d399; }

/* ── Tool list (directory rows) ──────────────────────────────────── */
.tool-list { display: flex; flex-direction: column; }
.tool-row {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.85rem 0; border-bottom: 1px solid #1e293b;
    transition: background 0.15s;
}
.tool-row:first-child { border-top: 1px solid #1e293b; }
.tool-row:hover { background: rgba(30,41,59,0.5); }
.tool-row-main { flex: 1; min-width: 0; }
.tool-row-name { font-weight: 600; color: #f1f5f9; font-size: 0.95rem; }
.tool-row-desc {
    display: block; font-size: 0.8rem; color: #64748b;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 0.1rem;
}
.view-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; color: #475569; white-space: nowrap;
}
.arrow { color: #334155; font-size: 1.1rem; transition: color 0.15s; flex-shrink: 0; }
.tool-row:hover .arrow { color: #10b981; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pager { display: flex; gap: 0.75rem; align-items: center; justify-content: center; margin-top: 2rem; }
.pager-btn {
    padding: 0.4rem 1rem; border: 1px solid #334155; border-radius: 6px;
    font-weight: 600; font-size: 0.85rem; color: #10b981; transition: all 0.15s;
}
.pager-btn:hover { background: #10b981; color: #0b1120; border-color: #10b981; }
.pager-info { color: #475569; font-size: 0.85rem; }

/* ── Tool detail ─────────────────────────────────────────────────── */
.detail {
    background: #111827; border: 1px solid #1e293b; border-radius: 12px;
    padding: 2rem;
}
.detail-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.detail-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.meta-price { color: #64748b; font-size: 0.85rem; }

.cta-btn {
    display: inline-block; padding: 0.5rem 1.25rem;
    background: #10b981; color: #021a0f; border-radius: 6px;
    font-size: 0.9rem; font-weight: 700; border: none; cursor: pointer;
    transition: background 0.15s; white-space: nowrap;
}
.cta-btn:hover { background: #34d399; }
.full-width { width: 100%; text-align: center; }

.detail-img {
    width: 100%; max-height: 240px; object-fit: cover;
    border-radius: 8px; margin-bottom: 1.5rem; border: 1px solid #1e293b;
}
.detail-body { margin-bottom: 1.5rem; }
.detail-desc { font-size: 1rem; color: #e2e8f0; line-height: 1.7; }
.detail-long { margin-top: 0.75rem; color: #94a3b8; line-height: 1.7; }

.detail-section { margin-bottom: 1.5rem; padding-top: 1rem; border-top: 1px solid #1e293b; }
.detail-section h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
    color: #10b981; margin-bottom: 0.6rem;
}
.detail-section ul { list-style: none; margin-left: 0; }
.detail-section li {
    position: relative; padding-left: 1.25rem; margin-bottom: 0.35rem;
    color: #cbd5e1; line-height: 1.6; font-size: 0.9rem;
}
.detail-section li::before {
    content: ''; position: absolute; left: 0; top: 0.6em;
    width: 5px; height: 5px; border-radius: 50%;
    background: #10b981; opacity: 0.6;
}

/* ── Reviews (detail page) ───────────────────────────────────────── */
.vote-bar { display: flex; gap: 0.75rem; margin-bottom: 1rem; }
.vote {
    font-weight: 700; font-size: 0.9rem;
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.6rem; border-radius: 6px;
}
.vote-up { color: #6ee7b7; background: rgba(16,185,129,0.1); }
.vote-down { color: #fca5a5; background: rgba(239,68,68,0.1); }

.review-form {
    display: flex; flex-direction: column; gap: 0.65rem;
    padding: 1.25rem; border-radius: 8px;
    background: #0b1120; border: 1px solid #1e293b;
    margin-bottom: 1.25rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.form-field { display: flex; flex-direction: column; gap: 0.2rem; }
.form-field label { font-size: 0.8rem; font-weight: 600; color: #94a3b8; }
.optional { font-weight: 400; color: #475569; }
.form-field input, .form-field textarea {
    padding: 0.55rem 0.7rem; border: 1px solid #334155; border-radius: 6px;
    background: #1e293b; color: #f1f5f9; font: inherit; font-size: 0.9rem;
    transition: border-color 0.15s;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #475569; }
.form-field input:focus, .form-field textarea:focus {
    outline: none; border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16,185,129,0.15);
}

.vote-pick { display: flex; gap: 0.6rem; margin-bottom: 0.15rem; }
.vote-option input[type="radio"] { display: none; }
.vote-btn {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.4rem 0.8rem; border: 1px solid #334155;
    border-radius: 6px; cursor: pointer; font-size: 0.85rem;
    font-weight: 600; transition: all 0.15s; background: #1e293b; color: #94a3b8;
}
.vote-btn:hover { border-color: #475569; }
.vote-option input:checked + .vote-btn-up { background: rgba(16,185,129,0.15); border-color: #10b981; color: #6ee7b7; }
.vote-option input:checked + .vote-btn-down { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #fca5a5; }

.form-error {
    color: #fca5a5; font-size: 0.8rem; margin: 0;
    padding: 0.35rem 0.6rem; background: rgba(239,68,68,0.1); border-radius: 4px;
}
.muted { color: #475569; font-size: 0.85rem; font-style: italic; }

.reviews-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
.review-item { padding: 0.75rem 0; border-bottom: 1px solid #1e293b; }
.review-item:last-child { border-bottom: none; }
.review-top { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.review-top .vote { font-size: 0.75rem; padding: 0.1rem 0.4rem; }
.review-date { color: #475569; font-size: 0.75rem; margin-left: auto; }
.review-body { margin-top: 0.3rem; font-size: 0.85rem; color: #94a3b8; line-height: 1.6; }

/* ── Auth pages ──────────────────────────────────────────────────── */
.auth-card {
    max-width: 400px; margin: 3rem auto;
    background: #111827; border: 1px solid #1e293b; border-radius: 12px;
    padding: 2rem;
}
.auth-card h1 { text-align: center; margin-bottom: 0.25rem; }
.auth-sub { text-align: center; color: #64748b; margin-bottom: 1.25rem; font-size: 0.9rem; }
.auth-card form { display: flex; flex-direction: column; gap: 0.65rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: #64748b; }
.auth-footer a { color: #10b981; font-weight: 600; }
.auth-footer a:hover { color: #34d399; }

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
    border-top: 1px solid #1e293b; margin-top: 3rem;
    padding: 1.5rem 1.25rem; text-align: center;
}
.footer-inner { font-size: 0.75rem; color: #475569; }
.footer-sep { margin: 0 0.4rem; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .hero h1 { font-size: 1.6rem; }
    .form-row { grid-template-columns: 1fr; }
    .detail-top { flex-direction: column; }
    .tool-row { flex-wrap: wrap; }
    .tool-row-desc { white-space: normal; }
}
