/* ==============================================================================
   Bajhi SearXNG Search - Stylesheet
   Modern Glassmorphic Dark UI & Developer Dashboard
   ============================================================================== */

:root {
    --bsearch-bg: #09090b;
    --bsearch-sidebar: #09090b;
    --bsearch-card: #18181b;
    --bsearch-surface: #121214;
    --bsearch-primary: #ffffff;
    --bsearch-primary-hover: #f4f4f5;
    --bsearch-accent: #60a5fa;
    --bsearch-accent-glow: rgba(96, 165, 250, 0.25);
    --bsearch-text: #fafafa;
    --bsearch-muted: #a1a1aa;
    --bsearch-border: #27272a;
    --bsearch-border-light: rgba(255, 255, 255, 0.08);
    --bsearch-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --bsearch-success: #22c55e;
    --bsearch-warning: #f59e0b;
    --bsearch-danger: #ef4444;
    color-scheme: dark;
}

/* Base Root Container */
#bajhi-search-root {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 24px auto !important;
    min-height: 800px !important;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bsearch-text);
    background: var(--bsearch-bg);
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: var(--bsearch-shadow) !important;
    border: 1px solid var(--bsearch-border) !important;
    position: relative !important;
}

#bajhi-search-root *,
.bajhi-search-landing * {
    box-sizing: border-box;
}

/* ==============================================================================
   Sidebar Styles
   ============================================================================== */
.bajhi-search-sidebar {
    width: 250px;
    min-width: 250px;
    background: var(--bsearch-sidebar);
    border-right: 1px solid var(--bsearch-border);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.bajhi-search-logo {
    padding: 24px 20px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--bsearch-border);
    letter-spacing: -0.5px;
}

.bajhi-search-logo i {
    color: var(--bsearch-accent);
    font-size: 20px;
}

.bajhi-search-nav {
    display: flex;
    flex-direction: column;
    padding: 20px 12px;
    gap: 6px;
    flex: 1;
}

.bajhi-nav-item {
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--bsearch-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bajhi-nav-item:hover {
    background: #18181b;
    color: #fff;
}

.bajhi-nav-item.active {
    background: #27272a;
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.bajhi-nav-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.bajhi-sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--bsearch-border);
}

.bajhi-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bajhi-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
}

.bajhi-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bajhi-user-info .name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bajhi-user-info .tier {
    font-size: 10px;
    color: var(--bsearch-accent);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ==============================================================================
   Main Content & Topbar
   ============================================================================== */
.bajhi-search-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bsearch-bg);
    overflow-y: auto;
    min-width: 0;
    padding: 18px 18px;
}

.bajhi-stat-card .value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.bajhi-stat-card .label {
    font-size: 0.75rem;
    color: var(--bsearch-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tab Panels */
.bajhi-tab-panel {
    display: none;
    padding: 0;
    flex: 1;
}

.bajhi-tab-panel.active {
    display: block;
}

.bajhi-card {
    background: var(--bsearch-card);
    border: 1px solid var(--bsearch-border);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.bajhi-card h3 {
    margin: 0 0 6px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

.card-desc {
    margin: 0 0 20px 0;
    color: var(--bsearch-muted);
    font-size: 0.9rem;
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* ==============================================================================
   Quota Banner & Progress Bar
   ============================================================================== */
.bajhi-quota-banner {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bsearch-border);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.quota-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--bsearch-muted);
    margin-bottom: 8px;
}

.quota-text strong {
    color: #fff;
}

.bajhi-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 99px;
    transition: width 0.4s ease;
}

/* ==============================================================================
   Category Pills & Search Inputs
   ============================================================================== */
.bajhi-category-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.cat-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--bsearch-border);
    color: var(--bsearch-muted);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.cat-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.cat-pill.active {
    background: #fff;
    color: #09090b;
    font-weight: 600;
    border-color: #fff;
}

/* Search Input Box */
.bajhi-search-input-box {
    margin-bottom: 24px;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 12px;
    padding: 6px 8px 6px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--bsearch-accent);
    box-shadow: 0 0 0 3px var(--bsearch-accent-glow);
}

.input-wrapper .search-icon {
    color: var(--bsearch-muted);
    font-size: 16px;
    margin-right: 12px;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
}

.filter-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bsearch-border);
    color: var(--bsearch-muted);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.15s;
}

.filter-toggle-btn:hover,
.filter-toggle-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.search-submit-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    border-radius: 8px;
}

.search-filters-drawer {
    display: flex;
    gap: 16px;
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-top: 10px;
}

.filter-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.filter-col label {
    font-size: 0.75rem;
    color: var(--bsearch-muted);
    font-weight: 600;
}

.filter-col select {
    background: var(--bsearch-card);
    border: 1px solid var(--bsearch-border);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
}

/* ==============================================================================
   Buttons
   ============================================================================== */
.bajhi-btn {
    background: var(--bsearch-primary);
    color: #09090b !important;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1;
}

.bajhi-btn:hover {
    background: var(--bsearch-primary-hover);
    transform: translateY(-1px);
}

.bajhi-btn.btn-sec {
    background: rgba(255, 255, 255, 0.08);
    color: #fff !important;
    border: 1px solid var(--bsearch-border);
}

.bajhi-btn.btn-sec:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
}

.bajhi-btn.btn-sm {
    padding: 6px 12px;
    font-size: 0.78rem;
}

/* ==============================================================================
   Results View & Cards
   ============================================================================== */
.results-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bsearch-border);
    margin-bottom: 20px;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#results-count-badge {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.latency-badge {
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: var(--bsearch-accent);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.results-actions {
    display: flex;
    gap: 8px;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-card {
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    transition: all 0.2s ease;
}

.result-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.result-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    position: relative;
}

.result-site-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

.result-favicon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.result-site-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.result-site-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.2;
}

.result-site-breadcrumb {
    font-size: 12px;
    color: #bdc1c6;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.result-card-copy-btn {
    background: transparent !important;
    border: none !important;
    color: #9aa0a6 !important;
    cursor: pointer;
    font-size: 15px;
    padding: 6px;
    border-radius: 50%;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-card-copy-btn:hover {
    color: #ffffff !important;
    background: transparent !important;
}

.result-title {
    margin: 4px 0 8px 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
}

.result-title a {
    color: #8ab4f8 !important;
    text-decoration: none;
}

.result-title a:hover {
    text-decoration: underline;
}

.result-snippet {
    margin: 0;
    color: #bdc1c6;
    font-size: 14px;
    line-height: 1.58;
}

/* ==============================================================================
   API Documentation & Playground
   ============================================================================== */
.api-key-box {
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 28px;
}

.api-key-label {
    display: block;
    font-size: 0.8rem;
    color: var(--bsearch-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.api-key-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.api-key-field code {
    flex: 1;
    background: var(--bsearch-bg);
    border: 1px solid var(--bsearch-border);
    padding: 10px 14px;
    border-radius: 8px;
    color: #38bdf8;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.api-playground-box {
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 28px;
}

.api-playground-box h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: #fff;
}

.playground-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.bajhi-input {
    width: 100%;
    background: var(--bsearch-card);
    border: 1px solid var(--bsearch-border);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
}

.json-viewer {
    background: #09090b;
    border: 1px solid var(--bsearch-border);
    border-radius: 8px;
    padding: 16px;
    max-height: 350px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #a5f3fc;
}

.api-endpoints-docs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.api-endpoint-item {
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 10px;
    padding: 20px;
}

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

.method {
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

.method.get { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.method.post { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

.route {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #fff;
}

.endpoint-desc {
    margin: 0 0 14px 0;
    color: var(--bsearch-muted);
    font-size: 0.85rem;
}

.code-snippet-box {
    background: transparent !important;
    border: 1px solid var(--bsearch-border);
    border-radius: 8px;
    padding: 14px;
    position: relative;
}

.snippet-label {
    display: block;
    font-size: 0.72rem;
    color: var(--bsearch-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
}

.code-snippet-box pre {
    background: transparent !important;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: #e4e4e7;
    overflow-x: auto;
}

/* ==============================================================================
   Tables (Query History)
   ============================================================================== */
.bajhi-table-wrapper {
    overflow-x: auto;
}

.bajhi-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #d4d4d8;
}

.bajhi-table th {
    text-align: left;
    padding: 12px 14px;
    background: var(--bsearch-surface);
    color: var(--bsearch-muted);
    border-bottom: 1px solid var(--bsearch-border);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.bajhi-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.bajhi-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.loading-cell {
    text-align: center;
    padding: 30px !important;
    color: var(--bsearch-muted);
}

/* ==============================================================================
   Pricing & Plans Grid
   ============================================================================== */
.bajhi-billing-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.bajhi-billing-toggle {
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 99px;
    padding: 4px;
    display: inline-flex;
}

.bajhi-billing-toggle-btn {
    background: transparent;
    border: none;
    color: var(--bsearch-muted);
    padding: 8px 20px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.bajhi-billing-toggle-btn.active {
    background: #fff;
    color: #09090b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.save-tag {
    background: #22c55e;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 99px;
    font-weight: 700;
    margin-left: 4px;
}

.bajhi-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.plan-item-card {
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s ease;
}

.plan-item-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.plan-item-card.popular {
    border-color: #3b82f6;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.15);
}

.plan-item-card.active {
    border-color: #22c55e;
}

.plan-badge {
    position: absolute;
    top: -10px;
    right: 20px;
    background: #3b82f6;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 99px;
    letter-spacing: 0.5px;
}

.plan-header h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.plan-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
}

.plan-price span {
    font-size: 0.85rem;
    color: var(--bsearch-muted);
    font-weight: 500;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    font-size: 0.82rem;
    color: #d4d4d8;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.plan-features li i {
    color: #22c55e;
    font-size: 12px;
}

.plan-lead-limit {
    font-weight: 700;
    color: #fff;
}

.plan-footer {
    margin-top: auto;
}

.plan-footer .bajhi-btn {
    width: 100%;
    justify-content: center;
}

/* ==============================================================================
   Engine Matrix Grid (Tab 5)
   ============================================================================== */
.engines-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.engine-category-box {
    background: var(--bsearch-surface);
    border: 1px solid var(--bsearch-border);
    border-radius: 12px;
    padding: 20px;
}

.engine-category-box h4 {
    margin: 0 0 14px 0;
    font-size: 0.95rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.engine-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.engine-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bsearch-border);
    color: #e4e4e7;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ==============================================================================
   GUEST LANDING PAGE
   ============================================================================== */
.bajhi-search/* ==============================================================================
   GUEST LANDING PAGE (SEARCH API / METASEARCH)
   ============================================================================== */
.bajhi-search-landing,
.bajhi-landing {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 30px;
    font-family: 'Inter', sans-serif;
    color: var(--bsearch-text);
}

.bajhi-search-hero,
.bajhi-landing-hero {
    text-align: center;
    padding: 40px 16px 30px;
    max-width: 860px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: #93c5fd;
    padding: 6px 16px;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.bajhi-search-hero h1,
.bajhi-landing-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.8px;
    margin: 0 0 16px 0;
    color: #fff;
}

.bajhi-search-hero h1 span,
.bajhi-landing-hero h1 span {
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--bsearch-muted);
    margin: 0 auto 28px;
    max-width: 680px;
}

.hero-search-preview-box {
    max-width: 650px;
    margin: 0 auto 28px;
}

.hero-input-wrapper,
.hero-search-form {
    display: flex;
    align-items: center;
    background: var(--bsearch-card);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 6px 6px 6px 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    gap: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hero-input-wrapper:focus-within,
.hero-search-form:focus-within {
    border-color: var(--bsearch-accent);
    box-shadow: 0 0 0 3px var(--bsearch-accent-glow);
}

.hero-input-wrapper i,
.hero-search-form .search-icon {
    color: var(--bsearch-muted);
    font-size: 16px;
    flex-shrink: 0;
}

.hero-input-wrapper input,
.hero-search-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    min-width: 0;
}

.hero-input-wrapper button,
.hero-search-btn {
    flex-shrink: 0;
}

.hero-preview-results {
    background: var(--bsearch-card);
    border: 1px solid var(--bsearch-border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

.hero-cta-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hero-note {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--bsearch-muted);
    font-size: 0.82rem;
    flex-wrap: wrap;
}

.hero-note span i {
    color: #22c55e;
    margin-right: 4px;
}

/* Landing Stats */
.bajhi-stats-grid,
.bajhi-landing-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: var(--bsearch-card);
    border: 1px solid var(--bsearch-border);
    border-radius: 14px;
    padding: 24px;
    margin: 30px auto;
    max-width: 1000px;
    text-align: center;
}

.bajhi-stat-card .num,
.bajhi-landing-stat .stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.bajhi-stat-card .lbl,
.bajhi-landing-stat .stat-lbl {
    font-size: 0.78rem;
    color: var(--bsearch-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Landing Features */
.bajhi-features-section,
.bajhi-landing-features {
    padding: 45px 12px;
    text-align: center;
}

.bajhi-features-section h2,
.bajhi-code-section h2,
.bajhi-pricing-section h2,
.bajhi-bottom-cta h2,
.bajhi-landing-features h2,
.bajhi-landing-code-section h2,
.bajhi-landing-pricing h2,
.bajhi-landing-cta h2 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0 0 10px 0;
}

.section-sub {
    color: var(--bsearch-muted);
    font-size: 0.95rem;
    margin: 0 auto 32px;
    max-width: 600px;
    line-height: 1.5;
}

.bajhi-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    text-align: left;
}

.feature-card,
.bajhi-feature-card {
    background: var(--bsearch-card);
    border: 1px solid var(--bsearch-border);
    border-radius: 14px;
    padding: 24px;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover,
.bajhi-feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
}

.fc-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(96, 165, 250, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bsearch-accent);
    font-size: 20px;
    margin-bottom: 16px;
}

.feature-card h4,
.bajhi-feature-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.feature-card p,
.bajhi-feature-card p {
    margin: 0 0 14px 0;
    color: var(--bsearch-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.fc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fc-tag {
    background: rgba(255, 255, 255, 0.05);
    color: #d4d4d8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
}

/* Landing Code Section */
.bajhi-code-section,
.bajhi-landing-code-section {
    padding: 30px 0;
    text-align: center;
}

.code-box-wrapper {
    max-width: 850px;
    margin: 0 auto;
    background: transparent !important;
    border: 1px solid var(--bsearch-border);
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
}

.code-box-tabs {
    display: flex;
    background: transparent !important;
    border-bottom: 1px solid var(--bsearch-border);
    padding: 4px 8px 0;
    overflow-x: auto;
}

.code-tab-btn {
    background: transparent;
    border: none;
    color: var(--bsearch-muted);
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.code-tab-btn.active {
    color: #fff;
    border-bottom-color: #3b82f6;
}

.code-box-content {
    padding: 20px;
    background: transparent !important;
}

.code-block {
    display: none;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #e4e4e7;
    line-height: 1.6;
    background: transparent !important;
    overflow-x: auto;
}

.code-block code {
    background: transparent !important;
}

.code-block.active {
    display: block;
}

/* Landing Pricing */
.bajhi-pricing-section,
.bajhi-landing-pricing {
    padding: 45px 12px;
    text-align: center;
}

.bajhi-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 30px;
    text-align: left;
}

.bajhi-bottom-cta,
.bajhi-landing-cta {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 45px 20px;
    text-align: center;
    margin: 30px auto;
    max-width: 900px;
}

.bajhi-bottom-cta p,
.bajhi-landing-cta p {
    color: var(--bsearch-muted);
    font-size: 1rem;
    margin: 0 auto 24px;
    max-width: 500px;
}

/* Loading Spinner */
.bajhi-loading-status {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bspin 0.8s linear infinite;
    margin: 0 auto 12px;
}

@keyframes bspin {
    to { transform: rotate(360deg); }
}

/* ─── RESPONSIVE MEDIA QUERIES ─── */
@media (max-width: 991px) {
    #bajhi-search-root {
        flex-direction: column !important;
        margin: 10px auto !important;
        border-radius: 12px !important;
        min-height: auto !important;
    }
    .bajhi-search-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--bsearch-border) !important;
    }
    .bajhi-search-logo {
        padding: 14px 18px;
        font-size: 1.1rem;
    }
    .bajhi-search-nav {
        flex-direction: row !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding: 8px 12px !important;
        gap: 6px !important;
        white-space: nowrap !important;
    }
    .bajhi-nav-item {
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
        flex-shrink: 0 !important;
    }
    .bajhi-sidebar-footer {
        display: none !important;
    }
    .bajhi-search-content {
        padding: 18px 14px !important;
    }
    .bajhi-stats-grid,
    .bajhi-landing-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 16px !important;
    }
    .playground-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .bajhi-search-hero h1,
    .bajhi-landing-hero h1 {
        font-size: 1.85rem !important;
    }
    .hero-sub {
        font-size: 0.92rem !important;
    }
    .hero-input-wrapper {
        flex-direction: column !important;
        padding: 12px !important;
        gap: 10px !important;
    }
    .hero-input-wrapper input {
        width: 100% !important;
    }
    .hero-input-wrapper button {
        width: 100% !important;
        justify-content: center;
    }
    .hero-cta-row button {
        width: 100% !important;
        justify-content: center;
    }
    .bajhi-stats-grid,
    .bajhi-landing-stats {
        grid-template-columns: 1fr !important;
    }
    .bajhi-features-grid {
        grid-template-columns: 1fr !important;
    }
    .bajhi-plans-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ─── MODAL OVERLAY & POPUP CHECKOUT ─── */
.bajhi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bajhi-modal-container {
    background: #18181b;
    border: 1px solid var(--bsearch-border);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    height: 85vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    position: relative;
    display: flex;
    flex-direction: column;
}

.bajhi-modal-header {
    padding: 14px 20px;
    background: #09090b;
    border-bottom: 1px solid var(--bsearch-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bajhi-modal-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.bajhi-modal-close {
    background: none;
    border: none;
    color: var(--bsearch-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.15s;
}

.bajhi-modal-close:hover {
    color: #fff;
}

.bajhi-modal-body {
    flex: 1;
    height: calc(85vh - 55px);
    background: #ffffff;
}

.bajhi-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ─── GUEST CONTINUOUS 1-PAGE MODE ─── */
#bajhi-search-root.bajhi-guest-mode .bajhi-tab-panel {
    display: block !important;
    margin-bottom: 45px;
    scroll-margin-top: 30px;
}

#bajhi-search-root.bajhi-guest-mode #tab-overview {
    margin-bottom: 30px;
}
