/* ═══════════════════════════════════════════════════════════
   Entire AI Apps — Custom Stylesheet  (Aurora Theme)
   Primary: Emerald #10b981 / #059669
   Dark header: #0d1117
   ═══════════════════════════════════════════════════════════ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; }

html { font-family: 'Inter', system-ui, -apple-system, sans-serif; scroll-behavior: smooth; }

body { background: #f8fafc; color: #0f172a; }

/* ── Line clamp ───────────────────────────────────────────── */
.line-clamp-1 { display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden; }
.line-clamp-2 { display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.line-clamp-3 { display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden; }

/* ── Dark header ──────────────────────────────────────────── */
.site-header {
    background: #0d1117;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}
.site-header a, .site-header button { color: rgba(255,255,255,0.85) !important; }
.site-header a:hover { color: #fff !important; }
.header-cta { color: #fff !important; }
.header-logo { color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.header-logo .logo-dot { color: #10b981; }

/* Search bar in header */
.header-search {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9999px;
    color: #fff;
    transition: background .2s, border-color .2s;
}
.header-search::placeholder { color: rgba(255,255,255,0.4); }
.header-search:focus {
    background: rgba(255,255,255,0.1);
    border-color: #10b981;
    outline: none;
    box-shadow: 0 0 0 3px rgba(16,185,129,.18);
}

/* CTA button in header */
.header-cta {
    background: #10b981;
    color: #fff !important;
    border-radius: 9999px;
    padding: .45rem 1.1rem;
    font-weight: 600;
    font-size: .85rem;
    transition: background .2s, transform .15s;
}
.header-cta:hover { background: #059669; transform: translateY(-1px); }

/* User avatar circle */
.header-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    color: #fff !important;
    font-size: .75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ── Hero section ─────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #0d1117 0%, #0d2d1f 50%, #0f2027 100%) !important;
    padding: 5rem 1rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(16,185,129,.18) 0%, transparent 70%);
    pointer-events: none;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: -.03em;
}
.hero-title em {
    font-style: normal;
    background: linear-gradient(90deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    color: rgba(255,255,255,.6);
    font-size: 1.1rem;
    margin-top: .75rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}
.hero-stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #10b981;
    line-height: 1;
}
.hero-stat-label {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    margin-top: .2rem;
}

/* ── Tool cards ───────────────────────────────────────────── */
.tool-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s;
    display: flex;
    flex-direction: column;
}
.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,.08);
    border-color: #10b981;
}
.tool-card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: .75rem;
    object-fit: contain;
    border: 1px solid #f1f5f9;
    background: #f8fafc;
}
.tool-card-name {
    font-weight: 700;
    font-size: .95rem;
    color: #0f172a;
    margin-top: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.tool-card-desc {
    font-size: .8rem;
    color: #64748b;
    margin-top: .3rem;
    line-height: 1.5;
}
.badge-price {
    display: inline-flex;
    align-items: center;
    font-size: .68rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge-free     { background:#dcfce7; color:#15803d; }
.badge-freemium { background:#fef9c3; color:#a16207; }
.badge-paid     { background:#fee2e2; color:#b91c1c; }
.badge-contact  { background:#e0f2fe; color:#0369a1; }
.badge-opensource{ background:#f3e8ff; color:#7c3aed; }

/* ── Section headings ─────────────────────────────────────── */
.section-heading {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.02em;
}
.section-sub {
    font-size: .9rem;
    color: #64748b;
    margin-top: .25rem;
}

/* ── Filter pills ─────────────────────────────────────────── */
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .4rem .9rem;
    border-radius: 9999px;
    font-size: .82rem;
    font-weight: 500;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}
.filter-pill:hover, .filter-pill.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: #0d1117;
    color: rgba(255,255,255,.7);
    margin-top: 5rem;
    padding: 4rem 1rem 2rem;
}
.footer-logo { color: #fff; font-weight: 800; font-size: 1.1rem; }
.footer-logo .logo-dot { color: #10b981; }
.footer-heading { color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.footer-link { color: rgba(255,255,255,.5); font-size: .85rem; display: block; margin-bottom: .4rem; text-decoration: none; transition: color .15s; }
.footer-link:hover { color: #10b981; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.06); margin-top: 3rem; padding-top: 1.5rem; font-size: .75rem; color: rgba(255,255,255,.3); }
.newsletter-input {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: .5rem;
    color: #fff;
    padding: .55rem .8rem;
    font-size: .85rem;
    flex: 1;
    min-width: 0;
}
.newsletter-input::placeholder { color: rgba(255,255,255,.35); }
.newsletter-input:focus { outline: none; border-color: #10b981; }
.newsletter-btn {
    background: #10b981;
    color: #fff;
    border-radius: .5rem;
    padding: .55rem 1.1rem;
    font-size: .85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.newsletter-btn:hover { background: #059669; }

/* ── Admin panel ──────────────────────────────────────────── */
.admin-sidebar {
    background: #0d1117;
    border-right: 1px solid rgba(255,255,255,.06);
    width: 14rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    border-radius: .6rem;
    font-size: .82rem;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.admin-nav-link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.admin-nav-link.active { background: rgba(16,185,129,.15); color: #10b981; font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: .6rem;
    padding: .6rem 1.3rem;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.btn-primary:hover { background: #059669; transform: translateY(-1px); color: #fff; }
.btn-secondary {
    background: transparent;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    border-radius: .6rem;
    padding: .55rem 1.2rem;
    font-size: .875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.btn-secondary:hover { border-color: #10b981; color: #10b981; }

/* ── Form controls ────────────────────────────────────────── */
.form-input {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: .6rem;
    padding: .6rem .85rem;
    font-size: .875rem;
    color: #0f172a;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}

/* ── Star rating ──────────────────────────────────────────── */
.stars { color: #f59e0b; letter-spacing: -.05em; }

/* ── Misc ─────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid #10b981; outline-offset: 2px; }
.prose p { margin: 0 0 1em; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
input[type=number] { -moz-appearance:textfield; }

/* Ad banner */
.ad-banner-wrap { position:relative; width:100%; text-align:center; }
.ad-banner-wrap small { display:block; font-size:.65rem; color:#94a3b8; text-transform:uppercase; letter-spacing:.06em; margin-bottom:.3rem; }

/* Category icon circles */
.cat-icon { width:2.8rem; height:2.8rem; border-radius:.75rem; background:linear-gradient(135deg,#ecfdf5,#d1fae5); display:flex; align-items:center; justify-content:center; font-size:1.2rem; }

/* Scroll top */
.scroll-to-top { position:fixed; bottom:1.5rem; right:1.5rem; background:#0d1117; color:#10b981; border:1px solid rgba(16,185,129,.3); border-radius:50%; width:2.5rem; height:2.5rem; display:none; align-items:center; justify-content:center; cursor:pointer; font-size:1rem; z-index:40; box-shadow:0 4px 12px rgba(0,0,0,.15); transition:all .2s; }
.scroll-to-top:hover { background:#10b981; color:#fff; }
.scroll-to-top.visible { display:flex; }

/* ── Tool card hover alias (used in tool-card.php) ───────── */
.tool-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,.08);
    border-color: #10b981;
}

/* ── Logo wordmark responsive ─────────────────────────────── */
@media (max-width: 400px) {
    .logo-wordmark { display: none; }
}

/* ── Category page header ─────────────────────────────────── */
.category-page-header {
    background: linear-gradient(135deg, #0d1117 0%, #0d2d1f 100%);
    padding: 2.5rem 1rem 2rem;
    margin-bottom: 0;
}
.category-page-header h1 { color: #fff; }
.category-page-header p  { color: rgba(255,255,255,.6); }
.category-page-header .tool-count { color: rgba(255,255,255,.4); font-size: .85rem; }

/* ── Filter bar selects ───────────────────────────────────── */
select.rounded-lg {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .65rem center;
    padding-right: 2rem;
    cursor: pointer;
}
select.rounded-lg:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
