:root {
    --ig-gradient: var(--color-ig-gradient, linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f77737 100%));
    --ig-purple: var(--color-ig-purple, #764ba2);
    --ig-blue: var(--color-ig-blue, #667eea);
    --ig-orange: var(--color-ig-orange, #f77737);
    --card-bg: var(--color-bg-white, #ffffff);
    --body-bg: var(--color-bg-light, #f8fafc);
    --border: var(--color-border-light, #e2e8f0);
    --text-muted: var(--color-slate-muted, #64748b);

    --brand-purple: #764ba2;
    --brand-purple-light: #667eea;
    --brand-coral: #764ba2;
    --brand-orange: #667eea;
}

body { background: var(--body-bg); color: var(--color-slate-dark, #0f172a); font-family: 'Inter', -apple-system, sans-serif; }

.ig-subnav {
    background: var(--color-bg-white, #fff); border-bottom: 1px solid var(--border);
    padding: 0 16px; display: flex; align-items: center; gap: 2px; overflow-x: auto;
    position: sticky; top: 0; z-index: 90;
}
.ig-subnav a {
    display: flex; align-items: center; gap: 6px;
    padding: 13px 14px; color: var(--text-muted); text-decoration: none;
    font-size: 13px; font-weight: 600; border-bottom: 3px solid transparent;
    white-space: nowrap; transition: all 0.2s;
}
.ig-subnav a:hover { color: var(--ig-purple); }
.ig-subnav a.active { color: var(--ig-purple); border-bottom-color: var(--ig-purple); }
.ig-subnav .nav-brand {
    padding: 8px 14px 8px 0; margin-right: 8px;
    border-right: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--color-slate-dark, #0f172a);
    white-space: nowrap; flex-shrink: 0;
}
.ig-subnav .nav-brand .icon {
    width: 32px; height: 32px; border-radius: 9px;
    background: var(--ig-gradient); display: flex; align-items: center;
    justify-content: center; color: var(--color-bg-white, #fff); font-size: 15px; flex-shrink: 0;
}

.page-wrapper { padding: 28px 0 60px; min-height: calc(100vh - 120px); }
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.page-header p { color: var(--text-muted); margin: 0; font-size: 14px; }
.section-title { font-size: 15px; font-weight: 800; margin: 0 0 14px; color: var(--color-slate-dark, #0f172a); }

.btn-ig {
    background: var(--ig-gradient); color: var(--color-bg-white, #fff); border: none;
    padding: 9px 20px; border-radius: 10px; font-weight: 700; font-size: 13px;
    transition: all 0.25s; display: inline-flex; align-items: center; gap: 7px;
    cursor: pointer;
}
.btn-ig:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(118,75,162,0.3); color: var(--color-bg-white, #fff); }
.btn-ig-outline {
    background: var(--color-bg-white, #fff); color: var(--ig-purple); border: 2px solid var(--border);
    padding: 9px 20px; border-radius: 10px; font-weight: 700; font-size: 13px;
    transition: all 0.25s; display: inline-flex; align-items: center; gap: 7px;
    cursor: pointer; text-decoration: none;
}
.btn-ig-outline:hover { border-color: var(--ig-purple); color: var(--ig-purple); }

.btn-black {
    background: var(--color-slate-dark, #0f172a); color: var(--color-bg-white, #fff); border: none;
    padding: 9px 20px; border-radius: 10px; font-weight: 700; font-size: 13px;
    transition: all 0.25s; display: inline-flex; align-items: center; gap: 7px;
    cursor: pointer; text-decoration: none;
}
.btn-black:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.15); color: var(--color-bg-white, #fff); background: #000; }

.ig-card {
    background: var(--card-bg); border-radius: 14px;
    border: 1px solid var(--border); overflow: hidden; transition: all 0.25s;
}
.ig-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.ig-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; }
.ig-card-body { padding: 20px; }

.stat-card { background: var(--card-bg); border-radius: 14px; padding: 20px; border: 1px solid var(--border); transition: all 0.25s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.06); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px; }
.stat-icon.purple { background: rgba(118,75,162,0.12); color: var(--ig-purple); }
.stat-icon.blue   { background: rgba(102,126,234,0.12); color: var(--ig-blue); }
.stat-icon.orange { background: rgba(247,119,55,0.12);  color: var(--ig-orange); }
.stat-icon.green  { background: var(--color-green-bg, #d1fae5);  color: var(--color-green, #10b981); }
.stat-icon.red    { background: var(--color-red-bg, #fee2e2);    color: var(--color-red, #ef4444); }
.stat-value { font-size: 26px; font-weight: 900; line-height: 1; margin-bottom: 3px; }
.stat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }

.empty-state { text-align: center; padding: 60px 20px; background: var(--card-bg); border-radius: 16px; border: 2px dashed var(--border); }
.empty-state .empty-icon { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1)); display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--ig-purple); margin: 0 auto 18px; }
.empty-state h4 { font-weight: 800; margin-bottom: 8px; font-size: 18px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; max-width: 360px; margin-left: auto; margin-right: auto; font-size: 14px; }

.alert-banner { padding: 12px 20px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--color-green-bg, #d1fae5); color: var(--color-green-dark, #047857); border: 1px solid var(--color-green-light, #34d399); }
.alert-error   { background: var(--color-red-bg, #fee2e2);  color: var(--color-red-dark, #b91c1c); border: 1px solid var(--color-red-light, #f87171); }

/* User Card Popup */
#igCardPopup {
    display: none;
    position: absolute;
    z-index: 9999;
    min-width: 340px;
    max-width: 370px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 1.5px 4px rgba(0,0,0,0.12);
    background: var(--color-bg-white);
    font-family: 'Segoe UI', Arial, sans-serif;
    border: 1px solid var(--color-border-light);
}
.ig-card-header {
    background: var(--color-ig-header-gradient);
    height: 60px;
    position: relative;
}
.ig-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--color-bg-white);
    position: absolute;
    left: 16px;
    top: 30px;
    background: var(--color-bg-subtle);
    object-fit: cover;
}
.ig-card-body {
    padding: 56px 20px 20px 20px;
}
.ig-card-username {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-slate-dark);
    margin-bottom: 2px;
}
.ig-card-name {
    color: var(--color-slate-muted);
    font-size: 0.98rem;
    margin-bottom: 8px;
}
.ig-card-bio {
    font-size: 0.98rem;
    color: var(--color-slate-dark);
    margin-bottom: 10px;
    white-space: pre-line;
}
.ig-card-meta {
    display: flex;
    gap: 18px;
    margin-bottom: 10px;
}
.ig-card-meta-item {
    text-align: center;
}
.ig-card-meta-item span {
    display: block;
    font-weight: 600;
    color: var(--color-slate-dark);
}
.ig-card-meta-item label {
    font-size: 0.85em;
    color: var(--color-slate-muted);
}
.ig-card-footer {
    border-top: 1px solid var(--color-border-subtle);
    padding-top: 10px;
    font-size: 0.95em;
    color: var(--color-slate-muted);
}
.ig-card-verified {
    color: var(--color-primary);
    margin-left: 4px;
    vertical-align: middle;
}
.ig-card-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}
.ig-card-link:hover {
    text-decoration: underline;
}
.ig-card-topics {
    margin-bottom: 8px;
}
.ig-card-topic-badge {
    background: var(--color-bg-light);
    color: var(--color-slate-dark);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 0.92em;
    margin-right: 4px;
    margin-bottom: 2px;
    display: inline-block;
}

/* ── Landing Page (index.php) Styles ───────────────────────── */
.hero-section {
    background: var(--color-bg-white);
    background-image: 
        linear-gradient(rgba(118, 75, 162, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(118, 75, 162, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    color: var(--color-slate-dark);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.hero-badge {
    display: inline-flex; align-items: center; background: var(--color-bg-white);
    border: 1px solid var(--color-border-subtle); border-radius: 50px;
    padding: 4px 16px; font-size: 14px; font-weight: 500; margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.hero-badge i { color: #ffc107; margin: 0 4px; }
.hero-headline { font-size: 3.5rem; line-height: 1.2; font-weight: 800; margin-bottom: 24px; }
.gradient-text {
    background: linear-gradient(90deg, #764ba2 0%, #ff5e62 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-subheadline { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 48px; max-width: 700px; margin-left: auto; margin-right: auto; }

.search-container { max-width: 800px; margin: 0 auto 40px; position: relative; z-index: 20; }
.custom-search-bar {
    background: var(--color-bg-white); border: 2px solid var(--color-border-subtle); border-radius: 100px;
    padding: 8px; display: flex; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.3s ease;
}
.custom-search-bar:focus-within { border-color: var(--brand-purple); box-shadow: 0 10px 40px rgba(118, 75, 162, 0.15); }
.platform-selector { display: flex; align-items: center; padding: 0 24px; border-right: 1px solid var(--color-border-subtle); gap: 10px; cursor: pointer; }
.platform-selector i { color: #E1306C; font-size: 20px; }
.platform-selector span { font-weight: 600; color: var(--color-slate-dark); }
.search-input-wrapper { flex-grow: 1; padding: 0 20px; }
.search-input-wrapper input { border: none; width: 100%; font-size: 16px; padding: 10px 0; outline: none; background: transparent; }
.search-btn-sparkle {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); color: white; border: none;
    width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.search-btn-sparkle:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3); }

.hero-actions .btn-find {
    background: linear-gradient(90deg, #764ba2 0%, #ff5e62 100%); color: white; border: none;
    padding: 14px 44px; border-radius: 12px; font-weight: 700; font-size: 18px; transition: all 0.3s; display: inline-block;
}
.hero-actions .btn-find:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(118, 75, 162, 0.2); color: white; }

.floating-elements { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.floating-avatar { position: absolute; width: 60px; height: 60px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.1); animation: float 6s ease-in-out infinite; }
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-20px); } 100% { transform: translateY(0px); } }
.avatar-1 { top: 15%; left: 10%; animation-delay: 0s; }
.avatar-2 { top: 60%; left: 8%; animation-delay: 1s; }
.avatar-3 { top: 20%; right: 12%; animation-delay: 2s; }
.avatar-4 { top: 70%; right: 10%; animation-delay: 3s; }
.avatar-5 { top: 40%; left: 20%; animation-delay: 4s; width: 45px; height: 45px;}
.avatar-6 { top: 45%; right: 22%; animation-delay: 5s; width: 50px; height: 50px;}

.feature-container { margin-top: -60px; position: relative; z-index: 10; }
.feature-box { background: white; border-radius: 16px; padding: 40px; box-shadow: 0 15px 50px rgba(0,0,0,0.06); height: 100%; transition: all 0.3s ease; border: 1px solid #f0f0f0; }
.feature-box:hover { transform: translateY(-8px); box-shadow: 0 20px 60px rgba(0,0,0,0.1); }
.feature-icon-wrapper { width: 56px; height: 56px; background: #f8f9fa; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.feature-icon-wrapper i { font-size: 1.75rem; color: #333; }
.feature-badge { display: inline-flex; align-items: center; padding: 8px 18px; border-radius: 50px; font-size: 0.9rem; font-weight: 600; color: white; background: linear-gradient(90deg, #ff9966 0%, #ff5e62 100%); margin: 0 10px 14px 0; }
.feature-badge i { font-size: 11px; margin-right: 8px; }
.try-btn { background: #fff; border: 1px solid #eee; padding: 12px 24px; border-radius: 10px; font-weight: 700; color: #1a1a1a; text-decoration: none; transition: all 0.2s; }
.try-btn:hover { background: #f8f9fa; border-color: #ddd; color: #000; }
.learn-more-link { color: #888; text-decoration: none; font-weight: 600; margin-left: 20px; font-size: 1rem; }
.learn-more-link:hover { color: #1a1a1a; }
.stat-number { font-size: 3.5rem; font-weight: 800; color: #1a1a1a; letter-spacing: -1px; }
.stat-label { font-size: 1rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 1px; }

/* ── Influencer List & Filter Styles (list.php) ─────────────── */
.search-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 40px 0 30px; }
.filter-card { background: white; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); margin-top: -30px; position: relative; z-index: 10; }
.filter-header { font-size: 0.9rem; font-weight: 600; color: var(--color-slate-body); margin-bottom: 15px; }
.advanced-toggle-btn { background: white; border: 2px solid var(--ig-blue); color: var(--ig-blue); border-radius: 8px; padding: 10px 20px; font-weight: 600; font-size: 0.95rem; width: 100%; transition: all 0.3s ease; }
.advanced-toggle-btn:hover { background: var(--ig-blue); color: white; }
.search-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; color: white; border-radius: 8px; padding: 10px 20px; font-weight: 600; font-size: 0.95rem; width: 100%; }
.influencer-list-item { background: white; border-radius: 12px; padding: 20px; margin-bottom: 15px; border: 1px solid var(--color-border-light); transition: all 0.3s ease; }
.influencer-list-item:hover { box-shadow: 0 5px 20px rgba(0,0,0,0.1); transform: translateX(5px); }
.influencer-avatar { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid var(--color-bg-light); }
.stat-item { text-align: center; padding: 0 15px; }
.stat-value { font-size: 1.1rem; font-weight: 700; color: var(--ig-blue); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.topic-badge { background: var(--color-bg-light); border: 1px solid var(--color-border-medium); border-radius: 20px; padding: 4px 12px; font-size: 0.75rem; color: var(--color-slate-body); display: inline-block; margin: 2px; }
.verified-badge { color: #3897f0; }
.view-profile-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; color: white; border-radius: 8px; padding: 8px 24px; font-weight: 600; font-size: 0.9rem; }
.update-date { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; }
.select2-container--default .select2-selection--single { height: 38px; border: 1px solid var(--color-border-medium); border-radius: 0.375rem; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; color: var(--color-slate-body); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }