/* ================================================
   AptitudePro — Interactive Preview Styles
   Duolingo-Style Diagnostic & Learning Experience
   ================================================ */

/* ---------- Preview Overlay ---------- */
.preview-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #0A0A12;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.16) 0%, rgba(139, 92, 246, 0.04) 35%, transparent 70%),
        radial-gradient(circle at 95% 100%, rgba(255, 92, 122, 0.09) 0%, rgba(255, 92, 122, 0.02) 20%, transparent 45%);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.preview-overlay.active {
    display: flex;
    animation: previewFadeIn 0.4s ease;
}

@keyframes previewFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ---------- Preview Top Bar ---------- */
.preview-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: transparent;
    border-bottom: none;
    flex-shrink: 0;
}

.preview-back-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-back-btn:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
}

.preview-progress-wrap {
    flex: 1;
    height: 14px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-full);
    overflow: hidden;
    position: relative;
}

.preview-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #58cc02, #78e018);
    border-radius: var(--border-radius-full);
    transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 0%;
    position: relative;
}

.preview-progress-bar::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 8px;
    right: 8px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.preview-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.preview-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.preview-stat .stat-icon {
    font-size: 1.1rem;
}

.preview-stat .stat-val {
    color: var(--text-primary);
}

/* ---------- Preview Main Content ---------- */
.preview-main {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px 140px;
    position: relative;
}

/* ---------- Screen Transitions ---------- */
.preview-screen {
    display: none;
    width: 100%;
    max-width: 600px;
    animation: screenSlideIn 0.4s ease;
}

.preview-screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes screenSlideIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Mascot ---------- */
.mascot-wrap {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 40px;
    width: 100%;
}

.mascot-svg {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.3));
    transition: transform 0.3s ease;
}

.mascot-svg.bounce {
    animation: mascotBounce 0.5s ease;
}

@keyframes mascotBounce {
    0%, 100% { transform: translateY(0); }
    40% { transform: translateY(-12px); }
    60% { transform: translateY(-4px); }
}

.mascot-bubble {
    background: var(--bg-tertiary);
    border: 1px solid var(--bg-glass-border);
    border-radius: 18px 18px 18px 4px;
    padding: 16px 22px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
    position: relative;
    max-width: 420px;
}

/* ---------- Option Cards ---------- */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.option-card {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 18px 24px;
    background: var(--bg-tertiary);
    border: 2px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.option-card:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(30, 30, 60, 0.8);
    transform: scale(1.015);
}

.option-card.selected {
    border-color: #58cc02;
    background: rgba(88, 204, 2, 0.08);
}

.option-card.correct {
    border-color: #58cc02;
    background: rgba(88, 204, 2, 0.12);
    pointer-events: none;
}

.option-card.incorrect {
    border-color: #ff4b4b;
    background: rgba(255, 75, 75, 0.08);
    pointer-events: none;
}

.option-card .option-level {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
}

.option-card .option-level .bar {
    width: 4px;
    border-radius: 2px;
    background: var(--text-muted);
    transition: background 0.2s ease;
}

.option-card:hover .option-level .bar,
.option-card.selected .option-level .bar {
    background: #58cc02;
}

/* ---------- Feedback Drawer ---------- */
.feedback-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 24px 24px 32px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feedback-drawer.show {
    transform: translateY(0);
}

.feedback-drawer.correct-drawer {
    background: linear-gradient(180deg, rgba(88, 204, 2, 0.15), rgba(7, 7, 14, 0.98));
    border-top: 2px solid #58cc02;
}

.feedback-drawer.incorrect-drawer {
    background: linear-gradient(180deg, rgba(255, 75, 75, 0.15), rgba(7, 7, 14, 0.98));
    border-top: 2px solid #ff4b4b;
}

.feedback-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.feedback-drawer.correct-drawer .feedback-title {
    color: #58cc02;
}

.feedback-drawer.incorrect-drawer .feedback-title {
    color: #ff4b4b;
}

.feedback-explanation {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: center;
    max-width: 500px;
    margin-bottom: 20px;
}

.feedback-btn {
    padding: 14px 48px;
    border: none;
    border-radius: var(--border-radius-full);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.correct-drawer .feedback-btn {
    background: #58cc02;
    color: #fff;
}

.correct-drawer .feedback-btn:hover {
    background: #4caf00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 204, 2, 0.3);
}

.incorrect-drawer .feedback-btn {
    background: #ff4b4b;
    color: #fff;
}

.incorrect-drawer .feedback-btn:hover {
    background: #e04343;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 75, 75, 0.3);
}

/* ---------- Bottom Action Bar ---------- */
.preview-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 16px 24px 24px;
    background: linear-gradient(180deg, transparent, var(--bg-primary) 30%);
    display: flex;
    justify-content: center;
}

.preview-action-bar.hidden {
    display: none;
}

.preview-check-btn {
    padding: 16px 64px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--border-radius-full);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: not-allowed;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.25s ease;
    min-width: 260px;
}

.preview-check-btn.enabled {
    background: #58cc02;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(88, 204, 2, 0.3);
}

.preview-check-btn.enabled:hover {
    background: #4caf00;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(88, 204, 2, 0.4);
}

/* ---------- Post-Diagnostic Choice Screen & Topic Picker Page ---------- */
.choice-screen-wrap {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 10px 16px 50px;
}

.choice-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
}

.choice-card-option {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 22px 24px;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.choice-card-option:hover {
    transform: translateY(-3px);
    border-color: rgba(168, 85, 247, 0.6);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.25);
    background: var(--bg-tertiary);
}

.choice-card-option.recommended {
    border-color: #a855f7;
    background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(168,85,247,0.08));
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.3);
}

.choice-card-option.recommended:hover {
    background: linear-gradient(135deg, rgba(124,58,237,0.25), rgba(168,85,247,0.14));
    box-shadow: 0 14px 32px rgba(124, 58, 237, 0.4);
}

.choice-icon-wrap {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.choice-card-option.recommended .choice-icon-wrap {
    background: var(--accent-gradient-vibrant);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.5);
    color: #fff;
}

.choice-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.choice-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.choice-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.choice-badge-rec {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: linear-gradient(135deg, #58cc02, #46a302);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(88, 204, 2, 0.4);
    margin-bottom: 4px;
}

/* ---------- Topic Picker Modal / Card (Exact Reference Match) ---------- */
.topic-picker-wrap {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 14px 60px;
}

.topic-picker-card {
    background: #18181b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 28px 26px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    position: relative;
}

.picker-top-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.picker-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.picker-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.picker-title {
    font-size: 1.38rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    margin: 0 auto 26px;
    letter-spacing: -0.02em;
}

.picker-pills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    min-height: 260px;
    align-content: flex-start;
}

.picker-pill {
    padding: 10px 16px;
    background: #27272a;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #e4e4e7;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.34, 1.2, 0.64, 1);
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.picker-pill:hover {
    background: #3f3f46;
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-2px);
}

.picker-pill.active {
    background: rgba(168, 85, 247, 0.22);
    border-color: #a855f7;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
}

.picker-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.picker-page-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #d4d4d8;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.picker-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.picker-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.picker-page-indicator {
    font-size: 0.82rem;
    font-weight: 700;
    color: #a1a1aa;
}

.picker-continue-btn {
    margin-top: 28px;
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    background: #3f3f46;
    color: #a1a1aa;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    cursor: not-allowed;
    transition: all 0.25s ease;
}

.picker-continue-btn.enabled {
    background: var(--accent-gradient-vibrant);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
}

.picker-continue-btn.enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.7);
}

/* ---------- Study Page (Post Selection) ---------- */
.study-page-wrap {
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    padding: 10px 16px 60px;
}

.study-section-card {
    background: var(--bg-card);
    border: 1.5px solid var(--bg-glass-border);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 24px;
    text-align: left;
}

.study-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.study-formula-box {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 14px;
    padding: 16px 20px;
    font-family: var(--font-mono, monospace);
    font-size: 1.05rem;
    color: #e9d5ff;
    margin: 14px 0;
}

.study-example-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #58cc02;
    border-radius: 0 12px 12px 0;
    padding: 16px 20px;
    margin: 14px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ---------- Results Screen ---------- */
.results-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--border-radius-xl);
    padding: 36px;
    text-align: center;
}

.results-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.results-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.results-bars {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.result-bar-item {
    text-align: left;
}

.result-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-bar-track {
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-full);
    overflow: hidden;
}

.result-bar-fill {
    height: 100%;
    border-radius: var(--border-radius-full);
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    width: 0%;
}

.result-bar-fill.good { background: linear-gradient(90deg, #58cc02, #78e018); }
.result-bar-fill.medium { background: linear-gradient(90deg, #ffc800, #ffdb4d); }
.result-bar-fill.weak { background: linear-gradient(90deg, #ff4b4b, #ff7676); }

.results-cta {
    padding: 16px 48px;
    background: var(--accent-gradient-vibrant);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-full);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.results-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow-strong);
}

/* ---------- Lesson Screen ---------- */
.lesson-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--border-radius-xl);
    padding: 36px;
}

.lesson-step-tag {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(88, 204, 2, 0.1);
    border: 1px solid rgba(88, 204, 2, 0.2);
    border-radius: var(--border-radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    color: #58cc02;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.lesson-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.lesson-body {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
}

.lesson-body .highlight {
    color: #58cc02;
    font-weight: 700;
}

.lesson-code {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--border-radius-md);
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 2;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.lesson-code .step {
    color: var(--accent-3);
    font-weight: 600;
}

.lesson-code .answer {
    color: #58cc02;
    font-weight: 700;
    font-size: 1rem;
}

.lesson-next-btn {
    width: 100%;
    padding: 16px;
    background: #58cc02;
    color: #fff;
    border: none;
    border-radius: var(--border-radius-full);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
}

.lesson-next-btn:hover {
    background: #4caf00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 204, 2, 0.3);
}

/* ---------- XP Popup ---------- */
.xp-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 10001;
    background: var(--bg-secondary);
    border: 2px solid #ffc800;
    border-radius: var(--border-radius-xl);
    padding: 40px 60px;
    text-align: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.xp-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.xp-popup-value {
    font-size: 3rem;
    font-weight: 900;
    color: #ffc800;
    margin-bottom: 4px;
}

.xp-popup-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 640px) {
    .preview-topbar {
        padding: 10px 16px;
    }

    .preview-stats {
        gap: 10px;
    }

    .preview-stat {
        font-size: 0.78rem;
    }

    .preview-main {
        padding: 24px 16px 140px;
    }

    .mascot-svg {
        width: 60px;
        height: 60px;
    }

    .mascot-bubble {
        font-size: 0.92rem;
        padding: 14px 18px;
    }

    .option-card {
        padding: 14px 18px;
        font-size: 0.88rem;
    }

    .path-node-circle {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .results-card, .lesson-card {
        padding: 24px;
    }
}

/* =========================================
   ANDROID NATIVE UI ADJUSTMENTS
   ========================================= */

/* Prevent code block scrolling overflow */
.lesson-code {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 480px) {
    /* Scale down large typography for modals */
    .xp-popup {
        padding: 30px 20px;
    }
    .xp-popup-value {
        font-size: 2rem !important;
    }
    
    /* Optimize feedback drawer size */
    .feedback-drawer {
        padding: 16px;
    }
    
    /* Optimize action bar for bottom nav compatibility */
    .preview-action-bar {
        padding: 12px 16px 16px;
    }

    /* Option card lists */
    .choice-card-option {
        padding: 16px;
    }

    /* Topic picker cards */
    .topic-picker-card {
        padding: 20px;
    }

    /* Buttons */
    .preview-check-btn {
        min-width: 100%;
    }
}

/* =========================================
   LOGGED-IN HOME UI (SMM-Model Inspired Layout)
   ========================================= */

.user-home-wrap {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 10px 16px 120px;
    box-sizing: border-box;
    color: #ffffff;
    font-family: inherit;
    text-align: left;
}

.user-home-hero {
    margin-bottom: 24px;
}

.user-home-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    color: #F5F5FA;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}

.highlight-violet {
    color: #8B5CF6;
    background: linear-gradient(135deg, #8B5CF6 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-home-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: rgba(255, 92, 122, 0.14);
    border: 1px solid rgba(255, 92, 122, 0.35);
    border-radius: 20px;
    color: #FF5C7A;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(255, 92, 122, 0.2);
}

.pill-refresh {
    margin-left: 2px;
    font-size: 0.85rem;
}

/* Automated Continuous Marquee Ticker (Right-to-Left) */
.horizontal-chips-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 10px;
    animation: marqueeTranslate 25s linear infinite;
}

.row-marquee-2 {
    animation-duration: 32s;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-content {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

@keyframes marqueeTranslate {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Quieter Topic Chips (Filtered look, #9E9EB0 muted text, thin outline) */
.topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #9E9EB0;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.topic-chip:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: #F5F5FA;
    transform: translateY(-1px);
}

.chip-icon {
    font-size: 0.95rem;
}

/* Section Header */
.user-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.user-section-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.section-filter-icon {
    font-size: 1.2rem;
    color: #94a3b8;
    cursor: pointer;
}

/* Company Target Cards Grid (Identical #15151F Dark Cards) */
.company-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    width: 100%;
    margin-bottom: 24px;
}

.company-card {
    background: #15151F;
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 20px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.company-card:hover {
    background: #1E1E2C;
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

/* Small 56px Rounded Square Icon Badge */
.company-card-illustration-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.company-card-illustration-wrap.bg-purple {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.company-card-illustration-wrap.bg-pink {
    background: rgba(255, 92, 122, 0.15);
    border: 1px solid rgba(255, 92, 122, 0.3);
}

.company-card-illustration-wrap.bg-indigo {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.company-card-illustration-wrap.bg-teal {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.company-card-icon {
    font-size: 1.6rem;
}

.company-card-content h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
}

.company-card-content p {
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

/* App Title in Topbar */
.preview-app-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    pointer-events: none;
}

.preview-profile-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
}

.preview-profile-btn:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.6);
}

/* Floating Levitating Glassmorphism Bottom Navigation Bar */
.overlay-bottom-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 360px;
    height: 60px;
    background: rgba(18, 18, 28, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 9999;
    box-shadow: 
        0 16px 36px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(139, 92, 246, 0.12);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.app-bottom-nav-item {
    position: relative;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #9E9EB0;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 18px;
    border-radius: 22px;
    transition: all 0.25s ease;
    flex: 1;
    max-width: 100px;
    outline: none;
}

.app-bottom-nav-item:active {
    transform: scale(0.94);
}

.app-bottom-nav-item.active {
    color: #8B5CF6;
    background: rgba(139, 92, 246, 0.16);
    box-shadow: 0 2px 12px rgba(139, 92, 246, 0.25);
}

.app-bottom-nav-item:hover:not(.active) {
    color: #F5F5FA;
}

.app-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.app-bottom-nav-item.active .app-nav-icon {
    transform: translateY(-1px);
}
}


 
/* Desktop App Layout (Phone Emulator) */
@media (min-width: 768px) {
    .preview-overlay {
        width: 414px !important;
        height: 850px !important;
        max-height: 95vh !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        border-radius: 36px !important;
        border: 10px solid #1a1a24;
        box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9), 0 0 0 100vw rgba(0,0,0,0.7);
        overflow: hidden;
    }

    /* Constrain fixed elements inside the container to its width */
    .overlay-bottom-nav, .preview-topbar, .preview-action-bar, .action-bar {
        position: absolute !important;
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
    }

    .overlay-bottom-nav {
        bottom: 0 !important;
        border-radius: 0 0 26px 26px !important;
        margin: 0 !important;
        padding-bottom: 20px !important;
    }

    .preview-action-bar, .action-bar {
        bottom: 0 !important;
        padding-bottom: 24px !important;
        border-radius: 0 0 26px 26px !important;
    }
}

 / *   H i d e   s c r o l l b a r   f o r   C h r o m e ,   S a f a r i   a n d   O p e r a   i n s i d e   t h e   a p p   v i e w   * / 
 . p r e v i e w - m a i n : : - w e b k i t - s c r o l l b a r   { 
         d i s p l a y :   n o n e ; 
 } 
 / *   H i d e   s c r o l l b a r   f o r   I E ,   E d g e   a n d   F i r e f o x   * / 
 . p r e v i e w - m a i n   { 
         - m s - o v e r f l o w - s t y l e :   n o n e ;     / *   I E   a n d   E d g e   * / 
         s c r o l l b a r - w i d t h :   n o n e ;     / *   F i r e f o x   * / 
 } 
  
 
/* Hide scrollbar for Chrome, Safari and Opera inside the app view */
.preview-main::-webkit-scrollbar {
    display: none;
}
/* Hide scrollbar for IE, Edge and Firefox */
.preview-main {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
