/* ==========================================================================
   Sence? - Modern Social Media & Mobile App Design System
   Inspired by Instagram, Tumblr, and iOS Native Design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg: #f8fafc;
    --card: #ffffff;
    --card-hover: #ffffff;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-soft: rgba(99, 102, 241, 0.08);
    --primary-light: rgba(99, 102, 241, 0.15);
    
    /* Social Media Gradients */
    --insta-gradient: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --poll-gradient: linear-gradient(90deg, rgba(99, 102, 241, 0.12) 0%, rgba(217, 70, 239, 0.15) 100%);
    --poll-selected-gradient: linear-gradient(90deg, rgba(99, 102, 241, 0.22) 0%, rgba(217, 70, 239, 0.25) 100%);
    
    /* Semantic Colors */
    --like-red: #ff3040;
    --like-soft: rgba(255, 48, 64, 0.1);
    --text: #0f172a;
    --text-secondary: #64748b;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --line: #f1f5f9;
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.1);
    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.1);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
    --shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
    --shadow-md: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -4px rgba(15, 23, 42, 0.12), 0 8px 16px -2px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 8px 24px -4px rgba(220, 39, 67, 0.35);
    --shadow-primary-glow: 0 8px 24px -4px rgba(99, 102, 241, 0.4);

    /* Radii */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-full: 9999px;

    /* Glass & Header backgrounds */
    --header-bg: rgba(255, 255, 255, 0.88);
    --mobile-nav-bg: rgba(255, 255, 255, 0.94);
    --input-bg: #f1f5f9;
    --subtle-bg: #f8fafc;
    --modal-card-bg: #ffffff;
    --option-bg: #f8fafc;
}

/* ==========================================================================
   Dark Theme (Native App Dark Mode)
   ========================================================================== */
[data-theme="dark"] {
    --bg: #090d16;
    --card: #131b2e;
    --card-hover: #17223b;
    --primary: #818cf8;
    --primary-hover: #93c5fd;
    --primary-soft: rgba(129, 140, 248, 0.15);
    --primary-light: rgba(129, 140, 248, 0.25);
    
    --poll-gradient: linear-gradient(90deg, rgba(129, 140, 248, 0.22) 0%, rgba(217, 70, 239, 0.25) 100%);
    --poll-selected-gradient: linear-gradient(90deg, rgba(129, 140, 248, 0.35) 0%, rgba(217, 70, 239, 0.40) 100%);
    
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --muted: #64748b;
    --border: #1e293b;
    --border-light: #1e293b;
    --line: #1e293b;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.45);
    --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 20px 40px -4px rgba(0, 0, 0, 0.7);

    --header-bg: rgba(15, 23, 42, 0.88);
    --mobile-nav-bg: rgba(15, 23, 42, 0.94);
    --input-bg: #0f172a;
    --subtle-bg: #0b1120;
    --modal-card-bg: #131b2e;
    --option-bg: #0f172a;
}

[data-theme="dark"] #user-search-input {
    background: var(--input-bg);
}

[data-theme="dark"] .meta-time,
[data-theme="dark"] .btn-ghost {
    background: var(--subtle-bg);
    color: var(--text);
}

[data-theme="dark"] .option-btn:hover:not(:disabled) {
    background: #17223b;
}

[data-theme="dark"] .profile-privacy-box,
[data-theme="dark"] .profile-darkmode-box {
    background: var(--subtle-bg) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .notif-question-link {
    background: var(--subtle-bg);
    color: var(--text-secondary);
}

/* ==========================================================================
   Global Resets & App Shell Layout
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Consistent App Shell width across desktop and mobile */
.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container {
        padding: 24px 20px;
    }
}

/* ==========================================================================
   Header & Navigation (Consistent on all desktop & mobile pages)
   ========================================================================== */

header {
    position: sticky;
    top: 0;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: all 0.25s ease;
    width: 100%;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 12px;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Modern Instagram Gradient Logo */
.logo {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.8px;
    text-decoration: none;
    background: var(--insta-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    user-select: none;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
    opacity: 0.95;
    text-decoration: none;
}

.logo::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ec4899;
    margin-left: -2px;
    margin-top: 6px;
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-links a:hover {
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Notification Badge (Instagram style red badge & dot) */
.nav-notif-link {
    position: relative;
}

.nav-notif-link .icon,
.mobile-nav-item .icon {
    position: relative;
}

.notif-badge-dot {
    position: absolute;
    top: -2px;
    right: -3px;
    width: 9px;
    height: 9px;
    background-color: var(--like-red);
    border-radius: 50%;
    border: 2px solid var(--card);
    box-shadow: 0 0 0 1px rgba(255, 48, 64, 0.4);
    animation: badgePulse 2s infinite ease-in-out;
}

.notif-badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--like-red);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    margin-left: 4px;
    vertical-align: middle;
}

.mobile-nav-item .notif-badge-dot {
    top: -1px;
    right: -2px;
    width: 10px;
    height: 10px;
    border: 2px solid #ffffff;
}

[data-theme="dark"] .mobile-nav-item .notif-badge-dot,
[data-theme="dark"] .notif-badge-dot {
    border-color: var(--bg);
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.18);
    }
}

/* User Search Box in Header */
.user-search-container {
    position: relative;
    flex: 1;
    max-width: 220px;
    margin: 0 8px;
}

#user-search-input {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    background: #f1f5f9;
    color: var(--text);
    outline: none;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

#user-search-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

#user-search-results,
#category-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 380px;
    overflow-y: auto;
    z-index: 1000;
    animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#user-search-results a,
#category-search-results a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease;
}

#user-search-results a:hover,
#category-search-results a:hover {
    background: #f8fafc;
}

#user-search-results a:last-child,
#category-search-results a:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Mobile Bottom Navigation (Native App Shell)
   ========================================================================== */

@media (max-width: 767px) {
    .nav-links {
        display: none;
    }
    
    .user-search-container {
        display: block;
        flex: 1;
        max-width: none;
        margin: 0 0 0 10px;
        position: relative;
    }

    #user-search-input {
        padding: 7px 12px;
        font-size: 13px;
        height: 36px;
        border-radius: var(--radius-full);
        background: #f1f5f9;
    }
    
    #user-search-results {
        position: fixed;
        top: 56px;
        left: 12px;
        right: 12px;
        max-height: 60vh;
        border-radius: var(--radius-lg);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    }
    
    body {
        padding-bottom: 84px;
    }
    
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--mobile-nav-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid var(--border);
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 6px 4px 10px;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 4px 6px;
        text-decoration: none;
        color: var(--text-secondary);
        flex: 1;
        min-width: 0;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        -webkit-tap-highlight-color: transparent;
        border-radius: var(--radius-sm);
        user-select: none;
    }
    
    .mobile-nav-item .icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        margin-bottom: 3px;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .mobile-nav-item .icon svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        transition: all 0.2s ease;
    }
    
    .mobile-nav-item .label {
        font-size: 10px;
        font-weight: 600;
        line-height: 1.1;
        display: block;
        text-align: center;
        white-space: nowrap;
        letter-spacing: -0.2px;
        transition: color 0.2s ease;
    }

    .mobile-nav-item:active .icon {
        transform: scale(0.88);
    }
    
    .mobile-nav-item.active {
        color: var(--primary);
    }

    .mobile-nav-item.active .icon svg {
        stroke: var(--primary);
        stroke-width: 2.3;
    }

    .mobile-nav-item.active .label {
        color: var(--primary);
        font-weight: 700;
    }

    .mobile-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: var(--primary);
    }
    
    /* Instagram / TikTok Style Floating Ask Button */
    .mobile-nav-item.ask {
        position: relative;
        margin-top: -14px;
        flex: 1;
    }
    
    .mobile-nav-item.ask .icon {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: var(--insta-gradient);
        box-shadow: var(--shadow-glow);
        color: #ffffff;
        margin-bottom: 2px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    }

    .mobile-nav-item.ask .icon svg {
        width: 24px;
        height: 24px;
        stroke: #ffffff;
        stroke-width: 2.5;
    }

    .mobile-nav-item.ask:active .icon {
        transform: scale(0.92);
        box-shadow: 0 4px 12px rgba(220, 39, 67, 0.5);
    }

    .mobile-nav-item.ask .label {
        color: #dc2743;
        font-weight: 700;
        font-size: 10px;
    }

    .mobile-nav-item.ask::after {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
    body {
        padding-bottom: 40px;
    }
}

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
    border: none;
    border-radius: var(--radius-full);
    padding: 9px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    line-height: 1.25;
    letter-spacing: -0.2px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:active { 
    transform: scale(0.97); 
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.45);
    transform: translateY(-1.5px);
    color: #ffffff;
    text-decoration: none;
}

.btn-ghost {
    background: #f1f5f9;
    color: var(--text);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: var(--primary-soft);
    color: var(--primary);
    transform: translateY(-1px);
    text-decoration: none;
}

.btn.sm { 
    padding: 6px 13px; 
    font-size: 12.5px;
    font-weight: 600;
}

/* ==========================================================================
   Cards (Post / Poll Feeds)
   ========================================================================== */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 18px;
    position: relative;
    overflow: visible;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.22);
}

/* Post Meta (Author, Category, Time Badge) */
.meta {
    display: flex;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
    font-weight: 500;
}

.meta a {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.meta a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* Modern Aesthetic Time Badge */
.meta-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.1px;
}

.meta-time svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Meta separator dot */
.meta-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--muted);
    margin: 0 1px;
}

/* Category Pills & Badges (Tumblr Inspired) */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3.5px 11px;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: -0.1px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    transition: all 0.2s ease;
}

.pill:hover {
    background: rgba(99, 102, 241, 0.15);
}

.meta .pill {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.12);
}

.tag {
    color: var(--text-secondary);
    font-size: 13.5px;
    line-height: 1.5;
}

/* Instagram-style Hashtag Link */
.hashtag-link {
    color: var(--primary) !important;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    padding: 1px 4px;
    margin: 0 1px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.hashtag-link:hover {
    background: var(--primary-soft);
    text-decoration: underline;
    transform: translateY(-0.5px);
}

/* Question Title & Content */
.question-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.4;
    color: var(--text);
    letter-spacing: -0.4px;
}

.card > a > img,
.card img[alt*="fotoğraf"] {
    width: 100%;
    max-height: 480px;
    border-radius: var(--radius-md);
    margin-top: 14px;
    margin-bottom: 6px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.2s ease;
}

/* ==========================================================================
   Poll Options (Instagram & Tumblr Poll Experience)
   ========================================================================== */

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0 14px;
}

.option-btn {
    position: relative;
    border: 1.5px solid var(--border);
    background: var(--option-bg);
    color: var(--text);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.option-btn:hover:not(:disabled) { 
    border-color: var(--primary);
    background: #f0f4ff;
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.option-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.option-btn .tag {
    font-weight: 700;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12.5px;
    white-space: nowrap;
    margin-left: 12px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.option-btn:hover .tag {
    background: var(--primary);
    color: #ffffff;
}

/* Voted / Selected State */
.option-btn[style*="border-color: var(--primary)"],
.option-btn[data-selected-option] {
    border-color: var(--primary) !important;
    background: #f0f4ff !important;
    font-weight: 700;
    box-shadow: 0 0 0 1px var(--primary);
}

.option-btn[data-selected-option] .tag,
.option-btn[style*="border-color: var(--primary)"] .tag {
    background: var(--primary) !important;
    color: #ffffff !important;
    font-weight: 800;
}

.progress {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: var(--radius-full);
    background: #f1f5f9;
    overflow: hidden;
    margin-top: 8px;
}

.progress span {
    display: block;
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.option-result {
    padding: 14px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.option-result .tag {
    font-weight: 800;
    color: var(--primary);
    font-size: 14px;
}

/* ==========================================================================
   Interaction Bar (Instagram Style Like, Comment, Save, Share)
   ========================================================================== */

.stat-row {
    display: flex;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
    align-items: center;
}

.stat-row > span {
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
}

.stat-row .btn-ghost {
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-row .btn-ghost:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

/* Like Button */
.stat-row .btn-ghost[data-like]::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
    vertical-align: middle;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-row .btn-ghost[data-like].liked,
.stat-row .btn-ghost[data-like][data-liked="true"],
.stat-row .btn-ghost[data-like][style*="color: var(--primary)"],
.stat-row .btn-ghost[data-like][style*="color: var(--like-red)"] {
    color: var(--like-red) !important;
    background: var(--like-soft) !important;
    border-color: rgba(255, 48, 64, 0.28) !important;
}

.stat-row .btn-ghost[data-like].liked::before,
.stat-row .btn-ghost[data-like][data-liked="true"]::before,
.stat-row .btn-ghost[data-like][style*="color: var(--primary)"]::before,
.stat-row .btn-ghost[data-like][style*="color: var(--like-red)"]::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") no-repeat center / contain;
    animation: heartPop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); }
    100% { transform: scale(1); }
}

.stat-row .btn-ghost[data-save]::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
    vertical-align: middle;
}

.stat-row .btn-ghost[data-share]::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'%3E%3C/line%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'%3E%3C/polygon%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'%3E%3C/line%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'%3E%3C/polygon%3E%3C/svg%3E") no-repeat center / contain;
    vertical-align: middle;
}

.stat-row .btn-ghost[data-report]::before {
    content: '';
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'%3E%3C/path%3E%3Cline x1='4' y1='22' x2='4' y2='15'%3E%3C/line%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z'%3E%3C/path%3E%3Cline x1='4' y1='22' x2='4' y2='15'%3E%3C/line%3E%3C/svg%3E") no-repeat center / contain;
    vertical-align: middle;
}

.comments-toggle-btn {
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Comments & Discussion Thread
   ========================================================================== */

.comments-section {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.comment-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s ease;
}

.comment-input,
.reply-input {
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-size: 14px;
    background: #f8fafc;
    color: var(--text);
    outline: none;
    transition: all 0.2s ease;
}

.comment-input:focus,
.reply-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   Profile Section (Instagram Style Profile Header)
   ========================================================================== */

.profile-header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 24px 20px;
}

.avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 34px;
    color: var(--primary);
    flex-shrink: 0;
    position: relative;
    padding: 3px;
    background: var(--insta-gradient);
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.avatar > img,
img.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    background: #ffffff;
}

div.avatar {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(217, 70, 239, 0.15));
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px var(--primary);
}

.profile-header > div {
    flex: 1;
    min-width: 0;
}

.profile-header .section-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

.profile-header .meta {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.profile-header .meta > span,
.profile-header .meta > a > span {
    padding: 5px 12px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
}

.question-menu-btn,
.profile-settings-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.question-menu-btn:hover,
.profile-settings-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
    transform: rotate(90deg);
}

.question-menu-btn:active,
.profile-settings-btn:active {
    transform: scale(0.92);
}

/* ==========================================================================
   Modals & Action Sheets (DEFAULT: DISPLAY NONE!)
   ========================================================================== */

/* Dynamic Question Menu Modal (only created and added to DOM on demand) */
.question-menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex !important;
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    animation: fadeInModal 0.2s ease;
}

/* Static Profile Settings Modal (in HTML by default, hidden until toggled) */
.profile-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    animation: fadeInModal 0.2s ease;
}

.profile-settings-modal.active,
.profile-settings-modal.show {
    display: flex !important;
}

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

@media (min-width: 640px) {
    .question-menu-modal,
    .profile-settings-modal {
        align-items: center;
    }
}

.question-menu-card,
.profile-settings-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    max-width: 380px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.question-menu-card h3 {
    margin: 0 0 14px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
}

.question-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.question-menu-actions button {
    padding: 13px 18px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.question-menu-actions .btn-hide {
    background: #f1f5f9;
    color: var(--text);
}

.question-menu-actions .btn-hide:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.question-menu-actions .btn-delete {
    background: var(--danger-soft);
    color: var(--danger);
}

.question-menu-actions .btn-delete:hover {
    background: var(--danger);
    color: #ffffff;
}

.question-menu-actions .btn-activate {
    background: var(--success-soft);
    color: var(--success);
}

.question-menu-actions .btn-cancel {
    background: #f1f5f9;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==========================================================================
   Toggle Switch (iOS / Instagram Style)
   ========================================================================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-gradient);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.profile-settings-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 14.5px;
    transition: background 0.15s ease;
    cursor: pointer;
}

.profile-settings-item:hover {
    background: var(--primary-soft);
    color: var(--primary);
    text-decoration: none;
}

.profile-settings-item-danger {
    color: var(--danger);
}

.profile-settings-item-danger:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */

form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

input, textarea, select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 14.5px;
    font-weight: 500;
    width: 100%;
    background: var(--input-bg);
    color: var(--text);
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(99, 102, 241, 0.15);
}

input::placeholder, textarea::placeholder {
    color: var(--muted);
    font-weight: 400;
}

textarea { 
    resize: vertical; 
    min-height: 110px;
    line-height: 1.5;
}

input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    cursor: pointer;
    accent-color: var(--primary);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-status {
    font-size: 13.5px;
    min-height: 20px;
    font-weight: 600;
    margin-top: 4px;
}

/* ==========================================================================
   Floating Action Button (Desktop FAB)
   ========================================================================== */

.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--insta-gradient);
    color: #ffffff;
    font-size: 28px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    text-decoration: none;
    z-index: 90;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 10px 28px rgba(220, 39, 67, 0.5);
    color: #ffffff;
    text-decoration: none;
}

@media (max-width: 767px) {
    .fab {
        display: none;
    }
}

/* ==========================================================================
   Page Loading Overlay & Spinner (Centered in Screen)
   ========================================================================== */

.page-loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-loading-overlay.show {
    opacity: 1 !important;
    pointer-events: all !important;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(226, 232, 240, 0.7);
    border-top: 4px solid var(--primary);
    border-right: 4px solid #ec4899;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
    box-shadow: 0 4px 24px rgba(99, 102, 241, 0.25);
}

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

.success-popup {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-24px);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.success-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.success-popup-content {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 14px 22px;
    border-radius: var(--radius-full);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    font-weight: 700;
    font-size: 14px;
}

.success-icon {
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 44px 20px;
    font-size: 15px;
    font-weight: 500;
    background: var(--card);
    border-radius: var(--radius-lg);
    border: 1.5px dashed var(--border);
}

.section-title {
    margin: 0 0 16px;
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    letter-spacing: -0.5px;
}

.grid {
    display: grid;
    gap: 14px;
}

@media (min-width: 640px) {
    .grid.two {
        grid-template-columns: 1fr 1fr;
    }
}

.disclaimer {
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    padding: 32px 16px 20px;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.disclaimer a {
    color: var(--text-secondary);
    font-weight: 600;
}

.disclaimer a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Smooth Transitions & Accessibility
   ========================================================================== */

button, a, .card, input, textarea, select {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2.5px;
}

::selection {
    background: rgba(99, 102, 241, 0.2);
    color: var(--text);
}

/* ==========================================================================
   Modern Notifications (Instagram / Tumblr App Style)
   ========================================================================== */

.notif-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 15px 18px;
    margin-bottom: 11px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-card:hover {
    box-shadow: var(--shadow-md);
}

.notif-card.unread {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.22);
    border-left: 3.5px solid var(--primary);
}

.notif-avatar-col {
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-single-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

/* Stacked avatars for 2+ users */
.notif-stacked-avatars {
    position: relative;
    width: 48px;
    height: 44px;
}

.notif-stacked-avatars .avatar-front {
    position: absolute;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-stacked-avatars .avatar-back {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 1;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.09);
    background: #e2e8f0;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-badge-icon {
    position: absolute;
    bottom: -2px;
    right: -3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-text {
    font-size: 14px;
    line-height: 1.45;
    color: var(--text);
    margin-bottom: 2px;
    word-break: break-word;
}

.notif-user-link {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s ease;
}

.notif-user-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.notif-count-text {
    font-weight: 700;
    color: var(--primary);
}

.notif-question-link {
    display: inline-block;
    max-width: 100%;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-top: 4px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 3px 10px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 2px solid var(--primary);
    transition: all 0.15s ease;
}

.notif-question-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.notif-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.notif-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* ==========================================================================
   Admin Analytics Dashboard Styles
   ========================================================================== */

.admin-header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 9999px;
    margin-left: 5px;
    vertical-align: middle;
}

.admin-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.admin-dash-title {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.6px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-dash-subtitle {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.admin-time-filters {
    display: inline-flex;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    gap: 4px;
}

.admin-time-btn {
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
    background: transparent;
    cursor: pointer;
}

.admin-time-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}

.admin-time-btn.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .admin-time-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .admin-time-btn.active {
    background: var(--card-alt);
    color: #818cf8;
}

/* KPI Stat Cards Grid */
.analytics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--insta-gradient));
}

.kpi-card.blue { --card-accent: linear-gradient(90deg, #3b82f6, #06b6d4); }
.kpi-card.purple { --card-accent: linear-gradient(90deg, #8b5cf6, #ec4899); }
.kpi-card.amber { --card-accent: linear-gradient(90deg, #f59e0b, #ef4444); }
.kpi-card.emerald { --card-accent: linear-gradient(90deg, #10b981, #059669); }

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.kpi-card.blue .kpi-icon-box { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.kpi-card.purple .kpi-icon-box { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.kpi-card.amber .kpi-icon-box { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.kpi-card.emerald .kpi-icon-box { background: rgba(16, 185, 129, 0.12); color: #059669; }

.kpi-trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    background: #ecfdf5;
    color: #059669;
}

.kpi-trend-pill.alert {
    background: #fef2f2;
    color: #dc2626;
}

.kpi-trend-pill.neutral {
    background: #f1f5f9;
    color: var(--text-secondary);
}

[data-theme="dark"] .kpi-trend-pill {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}
[data-theme="dark"] .kpi-trend-pill.alert {
    background: rgba(239, 68, 68, 0.18);
    color: #f87171;
}
[data-theme="dark"] .kpi-trend-pill.neutral {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.kpi-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.8px;
}

.kpi-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.kpi-sub-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--text-secondary);
}

.kpi-sub-badge {
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

/* Charts Grid */
.analytics-charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 960px) {
    .analytics-charts-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-charts-grid.two-cols {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 800px) {
    .analytics-charts-grid.two-cols {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

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

.chart-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    margin: 2px 0 0;
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    min-height: 280px;
    flex: 1;
}

/* Tables & Lists Grid */
.analytics-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 960px) {
    .analytics-tables-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-table-wrap {
    overflow-x: auto;
}

.analytics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13.5px;
}

.analytics-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.analytics-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.analytics-table tr:last-child td {
    border-bottom: none;
}

.analytics-table tr:hover td {
    background: rgba(99, 102, 241, 0.03);
}

[data-theme="dark"] .analytics-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.analytics-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
}

.analytics-badge.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.analytics-badge.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.analytics-badge.green { background: rgba(16, 185, 129, 0.12); color: #059669; }
.analytics-badge.amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.analytics-badge.red { background: rgba(239, 68, 68, 0.12); color: #dc2626; }

[data-theme="dark"] .analytics-badge.green { color: #34d399; }
[data-theme="dark"] .analytics-badge.amber { color: #fbbf24; }
[data-theme="dark"] .analytics-badge.red { color: #f87171; }

.analytics-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.analytics-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--insta-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.analytics-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.analytics-user-meta {
    line-height: 1.3;
}

.analytics-user-name {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
}

.analytics-user-handle {
    font-size: 11.5px;
    color: var(--text-secondary);
}

.analytics-q-title {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    display: block;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s ease;
}

.analytics-q-title:hover {
    color: var(--primary);
}

.analytics-action-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 6px;
    background: var(--primary-soft);
    transition: all 0.15s ease;
}

.analytics-action-link:hover {
    background: var(--primary);
    color: #ffffff;
}
