/* ==========================================================================
   Mobile Home & QFeed Experience (App-Like Native Design for Web)
   ========================================================================== */

:root {
    --fb-bg: #f8fafc;
    --fb-card: #ffffff;
    --fb-option-bg: #ffffff;
    --fb-text: #101828;
    --fb-text-2: #667085;
    --fb-border: #e4e7ec;
    --fb-divider: #d0d5dd;
    --fb-hover: #f5f7fa;
    --fb-input-bg: #f2f4f7;
    --fb-input-hover: #e9ecf1;
    --fb-correct-bg: #ecfdf3;
    --fb-correct-border: #17b26a;
    --fb-correct-text: #067647;
    --fb-correct-key: #17b26a;
    --fb-wrong-bg: #fef3f2;
    --fb-wrong-border: #f04438;
    --fb-wrong-text: #b42318;
    --fb-wrong-key: #f04438;
    --fb-exp-bg: #faf8ff;
    --fb-exp-border: #eadbff;
    --fb-exp-text: #344054;
    --fb-blue: #6366f1;
    --fb-tag-bg: #eef2ff;
    --fb-tag-text: #4338ca;
    --fb-key-bg: #f2f4f7;
    --fb-key-text: #475467;
}

.mobile-app-home-view {
    background: #f8fafc;
    min-height: calc(100vh - 60px);
    padding: 12px 12px 90px;
    font-family: 'Hind Siliguri', 'Inter', sans-serif;
}

/* ══════════════════════════════════════════════════════════════════════════
   1. Quick Action Feature Icons (4x2 App Grid)
   ══════════════════════════════════════════════════════════════════════════ */
.mob-quick-actions-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px 10px 14px;
    margin-bottom: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
}

.mob-quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 6px;
    text-align: center;
}

.mob-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: #1e293b;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.mob-action-item:active {
    transform: scale(0.92);
}

.mob-action-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 21px;
    margin-bottom: 7px;
    box-shadow: 0 4px 14px -2px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mob-action-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    line-height: 1.25;
    text-align: center;
    letter-spacing: -0.01em;
}

/* Vibrant App Icon Gradients */
.action-grad-model {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.action-grad-streak {
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}
.action-grad-ask {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}
.action-grad-chapter {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.action-grad-class {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}
.action-grad-job {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.action-grad-ai {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    box-shadow: 0 4px 14px rgba(236, 72, 153, 0.35);
}
.action-grad-package {
    background: linear-gradient(135deg, #eab308, #ca8a04);
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.35);
}

/* ══════════════════════════════════════════════════════════════════════════
   2. Horizontal Scrolling Category Filter Pills
   ══════════════════════════════════════════════════════════════════════════ */
.mob-category-scroll-wrap {
    margin: 0 -12px 14px;
    padding: 0 12px;
    overflow: hidden;
}

.mob-category-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.mob-category-scroll::-webkit-scrollbar {
    display: none;
}

.mob-cat-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    -webkit-tap-highlight-color: transparent;
}

.mob-cat-chip:active {
    transform: scale(0.95);
}

.mob-cat-chip.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

/* ══════════════════════════════════════════════════════════════════════════
   3. Feed Section Header
   ══════════════════════════════════════════════════════════════════════════ */
.mob-feed-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 0 4px;
}

.mob-feed-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mob-feed-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: livePulse 2s infinite ease-in-out;
}

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

.mob-feed-heading {
    font-size: 15.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.mob-feed-see-all {
    font-size: 12.5px;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.mob-feed-see-all:hover {
    color: #4f46e5;
}

/* ══════════════════════════════════════════════════════════════════════════
   4. QFeed Card Styles (Full Parity with questions-feed.php & Android FeedCard)
   ══════════════════════════════════════════════════════════════════════════ */
.fb-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
}

.fb-reshared-banner {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8b5cf6;
    background: #f5f3ff;
    padding: 4px 10px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.fb-post-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 0 6px;
}

.fb-profile-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.fb-avatar {
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6 50%, #d946ef);
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    user-select: none;
}

.fb-avatar-md {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px #e0e7ff;
}

.fb-avatar-img {
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.fb-post-meta {
    flex: 1;
    min-width: 0;
}

.fb-author {
    font-weight: 700;
    font-size: 0.92rem;
    color: #0f172a;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.fb-author-verified {
    color: #6366f1;
    font-size: 0.76rem;
}

.fb-you-badge {
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    margin-left: 2px;
}

.fb-time {
    font-size: 0.72rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.fb-post-menu {
    position: relative;
}

.fb-menu-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #94a3b8;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Tags */
.fb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 0 8px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    background: #eef2ff;
    color: #4338ca;
    font-weight: 600;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #dfe7ff;
}

.tag-badge.subject-tag {
    background: #fffaeb;
    color: #b54708;
    border-color: #fde3b3;
}

.tag-badge.chapter-tag {
    background: #fdf2f8;
    color: #c11574;
    border-color: #fbc7e3;
}

/* Question text */
.fb-question {
    font-family: 'Kalpurush', sans-serif;
    font-size: 16.5px;
    line-height: 1.55;
    color: #0f172a;
    font-weight: 600;
    padding: 2px 2px 8px;
    margin: 0;
    word-break: break-word;
    white-space: pre-line;
}

/* Options */
.fb-options {
    display: grid;
    gap: 7px;
    padding-bottom: 4px;
}

.fb-options.fb-options-4col {
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
}

.fb-options.fb-options-2col {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.fb-options.fb-options-1col {
    grid-template-columns: 1fr;
    gap: 6px;
}

.fb-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    margin: 1px 0;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #0f172a;
    font-family: 'Kalpurush', sans-serif;
    font-weight: 500;
    font-size: 14px;
    user-select: none;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.fb-options.fb-options-4col .fb-option {
    padding: 5px;
    gap: 4px;
    font-size: 12.5px;
}

.fb-option-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.fb-options.fb-options-4col .fb-option-key {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 11.5px;
}

.fb-option-text {
    flex: 1;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fb-options.fb-options-4col .fb-option-text {
    white-space: nowrap;
}

.fb-option.feed-option-clickable:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.fb-option.feed-option-correct {
    background: #ecfdf3 !important;
    border-color: #17b26a !important;
    color: #067647 !important;
    font-weight: 600;
}

.fb-option.feed-option-correct .fb-option-key {
    background: #17b26a !important;
    color: #ffffff !important;
    border-radius: 50%;
}

.fb-option.feed-option-incorrect {
    background: #fef3f2 !important;
    border-color: #f04438 !important;
    color: #b42318 !important;
    font-weight: 600;
}

.fb-option.feed-option-incorrect .fb-option-key {
    background: #f04438 !important;
    color: #ffffff !important;
    border-radius: 50%;
}

.fb-option.feed-option-disabled {
    cursor: default;
}

/* Explanation */
.fb-explanation {
    background: #faf8ff;
    border: 1px solid #eadbff;
    border-left: 3px solid #7c3aed;
    border-radius: 12px;
    padding: 10px 12px;
    margin-top: 8px;
}

.fb-explanation-head {
    font-weight: 700;
    font-size: 0.82rem;
    color: #7c3aed;
}

.explanation-content {
    font-family: 'Kalpurush', sans-serif;
    font-size: 13.5px;
    color: #334155;
    line-height: 1.55;
    word-break: break-word;
}

/* Unified Action Bar */
.fb-footer {
    padding: 6px 0 0;
    border-top: 1px solid #f1f5f9;
    margin-top: 6px;
    position: relative;
}

.fb-unified-actionbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 0;
}

.fb-action-left {
    display: flex;
    align-items: center;
    gap: 2px;
}

.fb-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 5px 6px;
    border: none;
    background: transparent !important;
    color: #64748b;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.fb-action-btn:active {
    transform: scale(0.92);
}

.fb-action-ico {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.fb-action-ico-on { display: none; }
.fb-action-btn.fb-action-active .fb-action-ico-on { display: inline-block; }
.fb-action-btn.fb-action-active .fb-action-ico-off { display: none; }
.fb-action-btn.fb-action-active { color: #7c3aed !important; }

.fb-action-count {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.fb-action-btn.fb-action-active .fb-action-count {
    color: #7c3aed;
}

.fb-stats-right {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 2px;
}

.fb-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
}

.fb-stat-correct { color: #16a34a; }
.fb-stat-wrong { color: #dc2626; }
.fb-stat-views { color: #64748b; }

/* AI Scanner & Aurora Effects */
.fb-card.ai-card-scanning {
    border-color: transparent !important;
    animation: aiBorderPulse 2s ease-in-out infinite !important;
}
@keyframes aiBorderPulse {
    0%, 100% { box-shadow: 0 0 0 2.5px #8b5cf6, 0 8px 24px -4px rgba(139, 92, 246, 0.35); }
    33% { box-shadow: 0 0 0 2.5px #38bdf8, 0 8px 24px -4px rgba(56, 189, 248, 0.4); }
    66% { box-shadow: 0 0 0 2.5px #ec4899, 0 8px 24px -4px rgba(236, 72, 153, 0.35); }
}

.fb-card.ai-card-liquid-aurora {
    border-color: transparent !important;
    animation: appleBorderPulse 1.8s ease-in-out infinite !important;
}
@keyframes appleBorderPulse {
    0%, 100% { box-shadow: 0 0 0 2.5px #38bdf8, 0 8px 24px -4px rgba(56, 189, 248, 0.45); }
    33% { box-shadow: 0 0 0 2.5px #f43f5e, 0 8px 24px -4px rgba(244, 63, 94, 0.45); }
    66% { box-shadow: 0 0 0 2.5px #fb923c, 0 8px 24px -4px rgba(251, 146, 60, 0.45); }
}

.fb-regen-exp-btn .fb-regen-ico-on { display: none !important; }
.fb-regen-exp-btn.spin-anim .fb-regen-ico-off { display: none !important; }
.fb-regen-exp-btn.spin-anim .fb-regen-ico-on {
    display: block !important;
    animation: regenSpin 0.9s linear infinite;
    transform-origin: center;
}
@keyframes regenSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mob-load-more-btn {
    border-radius: 999px;
    padding: 9px 24px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}
