/* Unified Header Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

.app-header {
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.2;
    height: 56px; background: white; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; position: relative; z-index: 1001; flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 20px; flex: 1; }
.header-brand { 
    display: flex; align-items: center; gap: 8px; 
    text-decoration: none; color: var(--text-primary); font-weight: 600; font-size: 15px;
    line-height: 1.2;
}
.header-tabs { display: flex; align-items: center; gap: 12px; margin-left: 10px; }
.header-tab {
    display: flex; align-items: center; gap: 6px; padding: 6px 12px;
    text-decoration: none; color: var(--text-secondary); font-size: 13px; font-weight: 500;
    border-radius: 6px; transition: all 0.15s; line-height: 1.2;
}
.header-tab:hover { background: var(--hover-bg); color: var(--text-primary); }
.header-tab.active { background: var(--lark-blue-bg); color: var(--lark-blue); }
.header-tab i { font-size: 14px; }
.header-count-badge {
    font-size: 10px; font-weight: 600; background: var(--lark-blue); color: white;
    padding: 1px 5px; border-radius: 10px; margin-left: 2px;
}

.header-right { display: flex; align-items: center; gap: 12px; }
.user-area { display: flex; align-items: center; }
.user-btn {
    display: flex; align-items: center; gap: 8px; padding: 4px 8px;
    border-radius: 20px; cursor: pointer; transition: background 0.15s;
}
.user-btn:hover { background: var(--hover-bg); }
.user-avatar {
    width: 28px; height: 28px; background: var(--lark-blue); color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
}
.user-name { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.user-btn i { font-size: 10px; color: var(--text-muted); }

/* Animated AI Brand Glow (Transparent Background) */
.ai-glow-badge {
    display: inline-flex;
    align-items: center; justify-content: center;
    margin: 0 1px;
    padding: 0 3px;
    position: relative;
    color: var(--lark-blue);
    font-weight: 700;
    background: transparent;
    border: 1px solid;
    border-radius: 6px;
    animation: neonGlow 3s linear infinite;
}

@keyframes neonGlow {
    0%   { border-color: #3370FF; box-shadow: 0 0 6px rgba(51, 112, 255, 0.4); text-shadow: 0 0 2px rgba(51, 112, 255, 0.2); }
    33%  { border-color: #8B5CF6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.4); text-shadow: 0 0 2px rgba(139, 92, 246, 0.2); }
    66%  { border-color: #EC4899; box-shadow: 0 0 6px rgba(236, 72, 153, 0.4); text-shadow: 0 0 2px rgba(236, 72, 153, 0.2); }
    100% { border-color: #3370FF; box-shadow: 0 0 6px rgba(51, 112, 255, 0.4); text-shadow: 0 0 2px rgba(51, 112, 255, 0.2); }
}

/* Header Login Button Fallback */
#btnLogin {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    background: var(--lark-blue); color: white; border: none;
    padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 500;
    cursor: pointer; transition: background 0.15s; height: 32px;
}
#btnLogin:hover { background: #2860e8; }
#btnLogin i { font-size: 14px; }

/* Dropdown UI */
.user-dropdown-container { position: relative; }
.dropdown-menu-custom {
    position: absolute; top: calc(100% + 10px); right: 0; background: #fff;
    border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 8px; width: 180px; display: none; flex-direction: column;
    padding: 6px 0; z-index: 2000;
}
.dropdown-menu-custom.show { display: flex; animation: slideIn 0.2s ease; }
.dropdown-item-custom {
    padding: 10px 16px; font-size: 13px; color: var(--text-primary);
    text-decoration: none; display: flex; align-items: center; gap: 10px;
    transition: background 0.15s; cursor: pointer;
}
.dropdown-item-custom:hover { background: var(--hover-bg); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.btn-menu-mobile {
    display: none; width: 32px; height: 32px; background: none; border: none;
    color: var(--text-primary); font-size: 18px; cursor: pointer;
}

@media (max-width: 768px) {
    .app-header { display: block; position: fixed; top: 0; left: 0; right: 0; height: 88px; padding: 0; z-index: 1010; background: white; }
    .header-left { display: block; width: 100%; height: 100%; }
    .btn-menu-mobile { position: absolute; left: 12px; top: 12px; height: 32px; display:flex; align-items:center; justify-content:center; }
    .header-brand { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); font-size: 15px;}
    .header-right { position: absolute; right: 12px; top: 16px; margin: 0; }
    
    .header-tabs { position: absolute; top: 48px; left: 0; width: 100%; height: 40px; display:flex; justify-content:center; gap:16px; border-top: 1px solid #f0f0f0; margin:0; padding: 0; background: #fafafa;}
    .header-tab { padding: 4px 8px; font-size: 12px; }
    .header-tab span { display: inline-block; } /* Keep text on mobile as requested */
    .header-tab i { font-size: 13px; }
    
    .user-name { display: none !important; } /* Hide username on mobile */
    .user-btn { padding: 0; }
    .user-btn i { display: none !important; }
}
