/*
Theme Name: TaskBoosters
Theme URI: https://taskboosters.com
Author: TaskBoosters Team
Author URI: https://taskboosters.com
Description: The Ultimate AI Tools Directory Theme — Multilingual (EN/AR/ZH), Payment Ready, Coins System, Submit & Advertise. Inspired by Toolify.ai with full Arabic RTL support.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: taskboosters
Tags: ai-tools, directory, multilingual, rtl-language, e-commerce, custom-colors, custom-logo, featured-images, full-width-template, theme-options, translation-ready
*/

/* ============================================================
   TASKBOOSTERS — MAIN STYLESHEET
   Colors: Gray + Purple (Toolify-inspired)
   Fonts: Inter (EN/ZH) + Cairo (AR)
   ============================================================ */

:root {
    /* === PRIMARY COLORS === */
    --tb-purple:        #7C3AED;
    --tb-purple-light:  #8B5CF6;
    --tb-purple-dark:   #6D28D9;
    --tb-purple-pale:   #EDE9FE;
    --tb-purple-bg:     #F5F3FF;

    /* === GRAY PALETTE (Toolify style) === */
    --tb-bg:            #F9FAFB;
    --tb-bg-white:      #FFFFFF;
    --tb-surface:       #FFFFFF;
    --tb-surface2:      #F3F4F6;
    --tb-border:        #E5E7EB;
    --tb-border2:       #D1D5DB;

    /* === TEXT === */
    --tb-text:          #111827;
    --tb-text2:         #374151;
    --tb-text3:         #6B7280;
    --tb-text4:         #9CA3AF;

    /* === STATUS COLORS === */
    --tb-green:         #059669;
    --tb-green-bg:      #ECFDF5;
    --tb-amber:         #D97706;
    --tb-amber-bg:      #FFFBEB;
    --tb-red:           #DC2626;
    --tb-red-bg:        #FEF2F2;
    --tb-blue:          #2563EB;
    --tb-blue-bg:       #EFF6FF;

    /* === SPONSORED / COINS === */
    --tb-gold:          #F59E0B;
    --tb-gold-bg:       #FEF3C7;

    /* === LAYOUT === */
    --tb-radius:        12px;
    --tb-radius-sm:     8px;
    --tb-radius-lg:     16px;
    --tb-radius-full:   9999px;
    --tb-shadow:        0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --tb-shadow-md:     0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --tb-shadow-lg:     0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --tb-shadow-purple: 0 4px 14px rgba(124,58,237,0.25);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--tb-bg);
    color: var(--tb-text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Arabic RTL */
body.rtl,
html[lang="ar"] body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
}

/* Chinese */
html[lang="zh"] body {
    font-family: 'Noto Sans SC', 'PingFang SC', sans-serif;
}

a { color: var(--tb-purple); text-decoration: none; }
a:hover { color: var(--tb-purple-dark); }
img { max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--tb-surface2); }
::-webkit-scrollbar-thumb { background: var(--tb-border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--tb-purple-light); }

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    color: var(--tb-text);
    line-height: 1.3;
    font-weight: 700;
}
h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p { color: var(--tb-text2); margin-bottom: 1rem; }

/* === CONTAINER === */
.tb-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.tb-container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* === BUTTONS === */
.tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.tb-btn-primary {
    background: var(--tb-purple);
    color: #fff;
    box-shadow: var(--tb-shadow-purple);
}
.tb-btn-primary:hover {
    background: var(--tb-purple-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,0.35);
    color: #fff;
}

.tb-btn-secondary {
    background: var(--tb-bg-white);
    color: var(--tb-purple);
    border: 1.5px solid var(--tb-purple);
}
.tb-btn-secondary:hover {
    background: var(--tb-purple-bg);
    color: var(--tb-purple-dark);
}

.tb-btn-ghost {
    background: transparent;
    color: var(--tb-text2);
    border: 1.5px solid var(--tb-border);
}
.tb-btn-ghost:hover {
    background: var(--tb-surface2);
    border-color: var(--tb-border2);
    color: var(--tb-text);
}

.tb-btn-sm { padding: 7px 14px; font-size: 13px; }
.tb-btn-lg { padding: 13px 28px; font-size: 16px; }

/* === BADGES === */
.tb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--tb-radius-full);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.tb-badge-free     { background: var(--tb-green-bg);  color: var(--tb-green); }
.tb-badge-paid     { background: var(--tb-red-bg);    color: var(--tb-red); }
.tb-badge-freemium { background: var(--tb-amber-bg);  color: var(--tb-amber); }
.tb-badge-new      { background: var(--tb-blue-bg);   color: var(--tb-blue); }
.tb-badge-sponsored{ background: var(--tb-gold-bg);   color: var(--tb-gold); border: 1px solid #FCD34D; }
.tb-badge-featured { background: var(--tb-purple-pale); color: var(--tb-purple); }

/* === HEADER / NAV === */
#tb-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow);
}

.tb-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 64px;
}

.tb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--tb-text);
    text-decoration: none;
    flex-shrink: 0;
}

.tb-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--tb-purple), var(--tb-purple-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.tb-logo span { color: var(--tb-purple); }

.tb-nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex: 1;
}

.tb-nav-menu a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--tb-text2);
    transition: all 0.2s;
    text-decoration: none;
}

.tb-nav-menu a:hover,
.tb-nav-menu li.current-menu-item > a {
    background: var(--tb-purple-bg);
    color: var(--tb-purple);
}

/* Dropdown */
.tb-nav-menu li { position: relative; }
.tb-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--tb-bg-white);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-lg);
    min-width: 220px;
    z-index: 100;
    padding: 6px;
}
.tb-nav-menu li:hover > .tb-dropdown { display: block; }
.tb-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--tb-radius-sm);
    font-size: 13.5px;
    color: var(--tb-text2);
}
.tb-dropdown a:hover {
    background: var(--tb-purple-bg);
    color: var(--tb-purple);
}

/* Nav Search */
.tb-nav-search {
    position: relative;
    flex: 1;
    max-width: 340px;
}
.tb-nav-search input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    background: var(--tb-surface2);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    color: var(--tb-text);
    outline: none;
    transition: all 0.2s;
}
.tb-nav-search input:focus {
    border-color: var(--tb-purple);
    background: var(--tb-bg-white);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.tb-nav-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tb-text4);
    font-size: 16px;
    pointer-events: none;
}

/* Nav Actions */
.tb-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Language Switcher */
.tb-lang-switcher {
    position: relative;
}
.tb-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--tb-surface2);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--tb-text2);
    cursor: pointer;
    transition: all 0.2s;
}
.tb-lang-btn:hover { border-color: var(--tb-purple); color: var(--tb-purple); }
.tb-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--tb-bg-white);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    box-shadow: var(--tb-shadow-lg);
    min-width: 150px;
    z-index: 100;
    padding: 6px;
}
.tb-lang-switcher:hover .tb-lang-dropdown { display: block; }
.tb-lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 13.5px;
    color: var(--tb-text2);
    border-radius: var(--tb-radius-sm);
    transition: all 0.2s;
}
.tb-lang-dropdown a:hover { background: var(--tb-purple-bg); color: var(--tb-purple); }
.tb-lang-dropdown a.active { color: var(--tb-purple); font-weight: 700; }

/* Coins Balance in Nav */
.tb-coins-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    background: var(--tb-gold-bg);
    border: 1px solid #FCD34D;
    border-radius: var(--tb-radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--tb-amber);
    cursor: pointer;
    transition: all 0.2s;
}
.tb-coins-badge:hover { background: #FEF3C7; }

/* === HERO SECTION === */
.tb-hero {
    background: linear-gradient(135deg, #FAFAFA 0%, #F5F3FF 50%, #FAFAFA 100%);
    border-bottom: 1px solid var(--tb-border);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tb-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.tb-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--tb-bg-white);
    border: 1.5px solid rgba(124,58,237,0.3);
    color: var(--tb-purple);
    padding: 6px 16px;
    border-radius: var(--tb-radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--tb-shadow);
}

.tb-hero-badge .dot {
    width: 7px;
    height: 7px;
    background: var(--tb-purple);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.tb-hero h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.tb-hero h1 em {
    color: var(--tb-purple);
    font-style: normal;
}

.tb-hero-desc {
    font-size: 1.1rem;
    color: var(--tb-text3);
    max-width: 580px;
    margin: 0 auto 2rem;
}

.tb-hero-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.tb-hero-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid var(--tb-border);
    max-width: 650px;
    margin: 0 auto;
}

.tb-stat strong {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--tb-purple);
}

.tb-stat span {
    font-size: 12px;
    color: var(--tb-text4);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === SECTION HEADERS === */
.tb-section { padding: 2.5rem 0; }
.tb-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.tb-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tb-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.tb-section-link {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tb-purple);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--tb-purple-bg);
    border-radius: var(--tb-radius-full);
    transition: all 0.2s;
}
.tb-section-link:hover { background: var(--tb-purple-pale); color: var(--tb-purple-dark); }

/* === TOOL CARDS GRID === */
.tb-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

/* === TOOL CARD === */
.tb-tool-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1.25rem;
    transition: all 0.25s ease;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    display: block;
    color: inherit;
}

.tb-tool-card:hover {
    border-color: rgba(124,58,237,0.4);
    transform: translateY(-3px);
    box-shadow: var(--tb-shadow-lg);
    color: inherit;
}

.tb-tool-card.is-featured {
    border-color: rgba(124,58,237,0.3);
    background: linear-gradient(135deg, rgba(124,58,237,0.02), var(--tb-bg-white));
}

.tb-tool-card.is-sponsored {
    border-color: rgba(245,158,11,0.4);
}

.tb-card-sponsored-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Card Header */
.tb-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.tb-tool-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--tb-border);
}

.tb-tool-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.tb-card-meta { flex: 1; min-width: 0; }

.tb-card-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--tb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.tb-card-category {
    font-size: 12px;
    color: var(--tb-purple);
    font-weight: 600;
}

/* Card Description */
.tb-card-desc {
    font-size: 13.5px;
    color: var(--tb-text3);
    line-height: 1.55;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Tags */
.tb-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.tb-tag {
    background: var(--tb-surface2);
    color: var(--tb-text3);
    font-size: 11.5px;
    padding: 3px 9px;
    border-radius: var(--tb-radius-full);
    font-weight: 500;
}

/* Card Stats (visitors + likes + stars) */
.tb-card-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--tb-border);
    margin-bottom: 10px;
}

.tb-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    color: var(--tb-text3);
    font-weight: 500;
}

.tb-stat-item .icon { font-size: 13px; }
.tb-stat-item strong { color: var(--tb-text2); font-weight: 700; }
.tb-stat-visitors strong { color: var(--tb-green); }

/* Card Footer */
.tb-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tb-visit-btn {
    background: var(--tb-purple);
    color: white;
    border: none;
    padding: 7px 16px;
    border-radius: var(--tb-radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.tb-visit-btn:hover { background: var(--tb-purple-dark); color: white; transform: translateY(-1px); }

.tb-save-btn {
    background: transparent;
    border: 1.5px solid var(--tb-border);
    color: var(--tb-text3);
    padding: 7px 10px;
    border-radius: var(--tb-radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.tb-save-btn:hover, .tb-save-btn.saved {
    background: var(--tb-red-bg);
    border-color: #FCA5A5;
    color: var(--tb-red);
}

/* === CATEGORIES GRID === */
.tb-cats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.tb-cat-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tb-cat-card:hover {
    border-color: rgba(124,58,237,0.4);
    background: var(--tb-purple-bg);
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow-md);
    color: inherit;
}

.tb-cat-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.tb-cat-name { font-weight: 700; font-size: 13.5px; color: var(--tb-text); margin-bottom: 3px; }
.tb-cat-count { font-size: 12px; color: var(--tb-text4); }

/* === RANKING TABLE === */
.tb-rank-table {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    overflow: hidden;
}

.tb-rank-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 1.25rem;
    border-bottom: 1px solid var(--tb-border);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

.tb-rank-row:last-child { border-bottom: none; }
.tb-rank-row:hover { background: var(--tb-purple-bg); color: inherit; }

.tb-rank-num {
    font-weight: 800;
    font-size: 1rem;
    color: var(--tb-text4);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.tb-rank-num.gold { color: #F59E0B; }
.tb-rank-num.silver { color: #9CA3AF; }
.tb-rank-num.bronze { color: #D97706; }

.tb-rank-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 1px solid var(--tb-border);
    overflow: hidden;
}

.tb-rank-info { flex: 1; min-width: 0; }
.tb-rank-name { font-weight: 700; font-size: 14px; color: var(--tb-text); }
.tb-rank-cat { font-size: 12px; color: var(--tb-text4); }
.tb-rank-traffic { font-size: 13.5px; color: var(--tb-green); font-weight: 700; flex-shrink: 0; }

.tb-trend-up   { background: var(--tb-green-bg); color: var(--tb-green); }
.tb-trend-new  { background: var(--tb-blue-bg); color: var(--tb-blue); }
.tb-trend-hot  { background: #FEF2F2; color: #EF4444; }

/* === TABS === */
.tb-tabs {
    display: flex;
    gap: 3px;
    background: var(--tb-surface2);
    border-radius: var(--tb-radius-sm);
    padding: 4px;
    width: fit-content;
    margin-bottom: 1.5rem;
    border: 1px solid var(--tb-border);
}

.tb-tab {
    padding: 8px 20px;
    border-radius: var(--tb-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tb-text3);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
}

.tb-tab:hover { color: var(--tb-purple); }
.tb-tab.active {
    background: var(--tb-bg-white);
    color: var(--tb-purple);
    box-shadow: var(--tb-shadow);
}

/* === TOOL DETAIL PAGE === */
.tb-tool-header {
    background: var(--tb-bg-white);
    border-bottom: 1px solid var(--tb-border);
    padding: 2rem 0;
}

.tb-tool-header-inner {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.tb-tool-big-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    border: 1.5px solid var(--tb-border);
    overflow: hidden;
}

.tb-tool-big-logo img { width: 100%; height: 100%; object-fit: contain; }

.tb-tool-header-info { flex: 1; }
.tb-tool-header-info h1 { margin-bottom: 4px; }
.tb-tool-short-desc { color: var(--tb-text3); font-size: 15px; margin-bottom: 10px; }

.tb-tool-header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}

.tb-tool-monthly-visits {
    font-size: 13px;
    color: var(--tb-text4);
    text-align: right;
}
.tb-tool-monthly-visits strong { color: var(--tb-green); font-size: 15px; }

/* Tool Tabs Navigation */
.tb-tool-tabs-nav {
    background: var(--tb-bg-white);
    border-bottom: 1px solid var(--tb-border);
    position: sticky;
    top: 64px;
    z-index: 100;
}

.tb-tool-tabs-nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    overflow-x: auto;
}

.tb-tool-tabs-nav li a {
    display: block;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tb-text3);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: all 0.2s;
}

.tb-tool-tabs-nav li a:hover,
.tb-tool-tabs-nav li.active a {
    color: var(--tb-purple);
    border-bottom-color: var(--tb-purple);
}

/* Tool Body Layout */
.tb-tool-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem 0;
}

/* Tool Sidebar */
.tb-sidebar-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.tb-sidebar-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--tb-text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tb-border);
}

.tb-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--tb-border);
    font-size: 13.5px;
}
.tb-info-row:last-child { border-bottom: none; }
.tb-info-label { color: var(--tb-text4); }
.tb-info-value { font-weight: 600; color: var(--tb-text2); }

/* Tool Sections */
.tb-tool-section { margin-bottom: 2rem; }
.tb-tool-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--tb-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-screenshot {
    width: 100%;
    border-radius: var(--tb-radius);
    border: 1.5px solid var(--tb-border);
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/9;
    background: var(--tb-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tb-screenshot img { width: 100%; height: 100%; object-fit: cover; }

/* Features List */
.tb-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tb-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: var(--tb-surface2);
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    color: var(--tb-text2);
    border: 1px solid var(--tb-border);
}

.tb-features-list li::before {
    content: '✓';
    color: var(--tb-green);
    font-weight: 800;
    flex-shrink: 0;
}

/* Pros & Cons */
.tb-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tb-pros, .tb-cons {
    background: var(--tb-surface2);
    border-radius: var(--tb-radius);
    padding: 1rem;
    border: 1px solid var(--tb-border);
}

.tb-pros h4 { color: var(--tb-green); margin-bottom: 10px; }
.tb-cons h4 { color: var(--tb-red); margin-bottom: 10px; }

.tb-pros ul, .tb-cons ul { list-style: none; }
.tb-pros ul li, .tb-cons ul li {
    font-size: 13.5px;
    color: var(--tb-text2);
    padding: 5px 0;
    display: flex;
    gap: 7px;
    align-items: flex-start;
}
.tb-pros ul li::before { content: '✓'; color: var(--tb-green); font-weight: 700; }
.tb-cons ul li::before { content: '✗'; color: var(--tb-red); font-weight: 700; }

/* Use Cases */
.tb-usecases {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tb-usecase-chip {
    background: var(--tb-purple-bg);
    border: 1px solid rgba(124,58,237,0.2);
    color: var(--tb-purple);
    padding: 7px 16px;
    border-radius: var(--tb-radius-full);
    font-size: 13.5px;
    font-weight: 600;
}

/* Reviews */
.tb-review-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.tb-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.tb-reviewer-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--tb-purple-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--tb-purple);
}

.tb-stars { color: #F59E0B; letter-spacing: 1px; font-size: 14px; }
.tb-review-text { font-size: 14px; color: var(--tb-text2); line-height: 1.6; }

/* Prompts */
.tb-prompt-card {
    background: var(--tb-surface2);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.tb-prompt-card pre {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 13px;
    color: var(--tb-text2);
    white-space: pre-wrap;
    line-height: 1.6;
}

.tb-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--tb-bg-white);
    border: 1px solid var(--tb-border);
    padding: 5px 10px;
    border-radius: var(--tb-radius-sm);
    font-size: 12px;
    cursor: pointer;
    color: var(--tb-text3);
    transition: all 0.2s;
}
.tb-copy-btn:hover { color: var(--tb-purple); border-color: var(--tb-purple); }

/* === PRICING TABLE === */
.tb-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.tb-pricing-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1.5rem;
    text-align: center;
}

.tb-pricing-card.popular {
    border-color: var(--tb-purple);
    position: relative;
}

.tb-pricing-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tb-purple);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--tb-radius-full);
    white-space: nowrap;
}

.tb-price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: var(--tb-text);
    margin: 10px 0;
}

.tb-price-period { font-size: 13px; color: var(--tb-text4); }

/* === ALTERNATIVES === */
.tb-alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.tb-alt-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.tb-alt-card:hover {
    border-color: rgba(124,58,237,0.4);
    transform: translateY(-2px);
    box-shadow: var(--tb-shadow-md);
    color: inherit;
}

/* === Q&A === */
.tb-qa-item {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.tb-qa-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.tb-qa-question:hover { background: var(--tb-purple-bg); }
.tb-qa-answer {
    padding: 0 1.25rem 1rem;
    font-size: 14px;
    color: var(--tb-text2);
    line-height: 1.65;
    display: none;
}
.tb-qa-item.open .tb-qa-answer { display: block; }

/* === EMAIL CAPTURE === */
.tb-email-section {
    background: linear-gradient(135deg, var(--tb-purple) 0%, var(--tb-purple-light) 100%);
    border-radius: var(--tb-radius-lg);
    padding: 3rem 2.5rem;
    text-align: center;
    color: white;
    margin: 2.5rem 0;
    position: relative;
    overflow: hidden;
}

.tb-email-section h2 { color: white; font-size: 1.75rem; margin-bottom: 0.75rem; }
.tb-email-section p { color: rgba(255,255,255,0.85); max-width: 480px; margin: 0 auto 1.5rem; }

.tb-email-form {
    display: flex;
    gap: 10px;
    max-width: 440px;
    margin: 0 auto;
}

.tb-email-form input {
    flex: 1;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 16px;
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    outline: none;
}

.tb-email-form input::placeholder { color: rgba(255,255,255,0.6); }
.tb-email-form input:focus { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.6); }

.tb-email-form button {
    background: white;
    color: var(--tb-purple);
    border: none;
    padding: 12px 22px;
    border-radius: var(--tb-radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tb-email-form button:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* === SUBMIT & ADVERTISE PAGE === */
.tb-pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tb-plan-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.25s;
}

.tb-plan-card:hover { transform: translateY(-4px); box-shadow: var(--tb-shadow-lg); }

.tb-plan-card.featured {
    border-color: var(--tb-purple);
    box-shadow: 0 0 0 2px rgba(124,58,237,0.2);
    position: relative;
}

.tb-plan-popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--tb-purple);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: var(--tb-radius-full);
    white-space: nowrap;
}

.tb-plan-name { font-size: 1rem; font-weight: 700; color: var(--tb-text2); margin-bottom: 0.5rem; }
.tb-plan-price { font-size: 2.5rem; font-weight: 800; color: var(--tb-text); }
.tb-plan-price span { font-size: 1rem; font-weight: 500; color: var(--tb-text4); }
.tb-plan-desc { font-size: 13.5px; color: var(--tb-text4); margin: 0.75rem 0 1.25rem; }

.tb-plan-features { list-style: none; text-align: left; margin-bottom: 1.5rem; }
.tb-plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13.5px;
    color: var(--tb-text2);
    border-bottom: 1px solid var(--tb-border);
}
.tb-plan-features li:last-child { border-bottom: none; }
.tb-plan-features li::before { content: '✓'; color: var(--tb-green); font-weight: 800; flex-shrink: 0; }

/* === COINS SYSTEM === */
.tb-coins-packages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tb-coins-card {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    border-radius: var(--tb-radius);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.tb-coins-card:hover { border-color: var(--tb-gold); transform: translateY(-2px); box-shadow: var(--tb-shadow-md); }
.tb-coins-card.popular { border-color: var(--tb-gold); }

.tb-coins-icon { font-size: 2rem; margin-bottom: 8px; }
.tb-coins-amount { font-size: 1.8rem; font-weight: 800; color: var(--tb-amber); }
.tb-coins-price { font-size: 1.1rem; font-weight: 700; color: var(--tb-text); margin: 4px 0; }
.tb-coins-save { font-size: 12px; color: var(--tb-green); font-weight: 600; }

/* === SEARCH PAGE === */
.tb-search-hero {
    background: linear-gradient(135deg, #F9FAFB 0%, #F5F3FF 100%);
    border-bottom: 1px solid var(--tb-border);
    padding: 2.5rem 0;
}

.tb-search-big {
    display: flex;
    gap: 10px;
    max-width: 680px;
}

.tb-search-big input {
    flex: 1;
    background: var(--tb-bg-white);
    border: 2px solid var(--tb-border);
    color: var(--tb-text);
    padding: 14px 18px;
    border-radius: var(--tb-radius);
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

.tb-search-big input:focus {
    border-color: var(--tb-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.tb-search-big button {
    background: var(--tb-purple);
    color: white;
    border: none;
    padding: 14px 26px;
    border-radius: var(--tb-radius);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}
.tb-search-big button:hover { background: var(--tb-purple-dark); }

/* Filters Bar */
.tb-filters-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--tb-border);
}

.tb-filter-select {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    color: var(--tb-text2);
    padding: 8px 14px;
    border-radius: var(--tb-radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}
.tb-filter-select:focus { border-color: var(--tb-purple); }

.tb-filter-pill {
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    color: var(--tb-text2);
    padding: 7px 16px;
    border-radius: var(--tb-radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tb-filter-pill:hover,
.tb-filter-pill.active {
    background: var(--tb-purple);
    color: white;
    border-color: var(--tb-purple);
}

/* === PAGE HEADER === */
.tb-page-header {
    background: var(--tb-bg-white);
    border-bottom: 1px solid var(--tb-border);
    padding: 2rem 0;
}

.tb-page-header h1 { margin-bottom: 4px; }
.tb-page-header p { color: var(--tb-text4); font-size: 14px; margin: 0; }

/* === BREADCRUMBS === */
.tb-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tb-text4);
    margin-bottom: 1rem;
}
.tb-breadcrumb a { color: var(--tb-purple); }
.tb-breadcrumb span { color: var(--tb-text4); }

/* === FORMS === */
.tb-form-group { margin-bottom: 1.25rem; }
.tb-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--tb-text2);
    margin-bottom: 6px;
}
.tb-input, .tb-select, .tb-textarea {
    width: 100%;
    background: var(--tb-bg-white);
    border: 1.5px solid var(--tb-border);
    color: var(--tb-text);
    padding: 10px 14px;
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}
.tb-input:focus, .tb-select:focus, .tb-textarea:focus {
    border-color: var(--tb-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.tb-textarea { min-height: 100px; resize: vertical; }

/* === ALERTS === */
.tb-alert {
    padding: 12px 16px;
    border-radius: var(--tb-radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tb-alert-success { background: var(--tb-green-bg); color: var(--tb-green); border: 1px solid #A7F3D0; }
.tb-alert-error   { background: var(--tb-red-bg);   color: var(--tb-red);   border: 1px solid #FCA5A5; }
.tb-alert-info    { background: var(--tb-blue-bg);  color: var(--tb-blue);  border: 1px solid #BFDBFE; }
.tb-alert-warning { background: var(--tb-amber-bg); color: var(--tb-amber); border: 1px solid #FDE68A; }

/* === FOOTER === */
#tb-footer {
    background: #111827;
    color: rgba(255,255,255,0.6);
    padding: 3.5rem 0 1.5rem;
    margin-top: 4rem;
}

.tb-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.tb-footer-brand h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.tb-footer-brand p { font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,0.5); }

.tb-footer-col h4 {
    color: white;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tb-footer-col ul { list-style: none; }
.tb-footer-col ul li { margin-bottom: 6px; }
.tb-footer-col ul li a {
    font-size: 13.5px;
    color: rgba(255,255,255,0.5);
    transition: color 0.2s;
}
.tb-footer-col ul li a:hover { color: var(--tb-purple-light); }

.tb-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}

.tb-footer-bottom a { color: var(--tb-purple-light); }

/* === NOTICE BAR (Top of site) === */
.tb-notice-bar {
    background: var(--tb-purple);
    color: white;
    text-align: center;
    padding: 8px 1rem;
    font-size: 13.5px;
    font-weight: 500;
}
.tb-notice-bar a { color: white; text-decoration: underline; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .tb-tool-body { grid-template-columns: 1fr 280px; }
    .tb-footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .tb-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    .tb-nav-menu { display: none; }
    .tb-nav-search { max-width: 200px; }
    .tb-tool-body { grid-template-columns: 1fr; }
    .tb-tool-header-inner { flex-wrap: wrap; }
    .tb-tool-header-actions { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
    .tb-pros-cons { grid-template-columns: 1fr; }
    .tb-footer-grid { grid-template-columns: 1fr 1fr; }
    .tb-hero-stats { gap: 1.5rem; }
    .tb-email-form { flex-direction: column; }
}

@media (max-width: 480px) {
    .tb-tools-grid { grid-template-columns: 1fr; }
    .tb-cats-grid { grid-template-columns: repeat(2, 1fr); }
    .tb-footer-grid { grid-template-columns: 1fr; }
    .tb-nav-search { display: none; }
    .tb-tabs { width: 100%; overflow-x: auto; }
}

/* === RTL OVERRIDES === */
body.rtl .tb-breadcrumb { flex-direction: row-reverse; }
body.rtl .tb-card-sponsored-badge { right: auto; left: 10px; }
body.rtl .tb-copy-btn { right: auto; left: 10px; }
body.rtl .tb-tool-header-actions { align-items: flex-start; }
body.rtl .tb-plan-features { text-align: right; }
body.rtl .tb-dropdown { left: auto; right: 0; }
body.rtl .tb-lang-dropdown { right: 0; left: auto; }
body.rtl .tb-footer-grid { direction: rtl; }

/* === UTILITIES === */
.tb-text-center { text-align: center; }
.tb-text-purple { color: var(--tb-purple); }
.tb-text-green  { color: var(--tb-green); }
.tb-text-muted  { color: var(--tb-text4); }
.tb-mt-1 { margin-top: 0.5rem; }
.tb-mt-2 { margin-top: 1rem; }
.tb-mt-3 { margin-top: 1.5rem; }
.tb-mb-1 { margin-bottom: 0.5rem; }
.tb-mb-2 { margin-bottom: 1rem; }
.tb-mb-3 { margin-bottom: 1.5rem; }
.tb-hidden { display: none; }
.tb-flex { display: flex; }
.tb-items-center { align-items: center; }
.tb-gap-2 { gap: 0.5rem; }
.tb-gap-3 { gap: 0.75rem; }
.tb-w-full { width: 100%; }

/* Loading Spinner */
.tb-spinner {
    width: 20px; height: 20px;
    border: 2px solid var(--tb-border);
    border-top-color: var(--tb-purple);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton Loading */
.tb-skeleton {
    background: linear-gradient(90deg, var(--tb-surface2) 25%, var(--tb-border) 50%, var(--tb-surface2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--tb-radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
